Make GraphQL parameters strict following Absinthe 1.7 validating
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
3d50f2d90d
commit
a461674f9d
|
@ -19,7 +19,7 @@ defmodule Mobilizon.GraphQL.Resolvers.CommentTest do
|
||||||
|
|
||||||
describe "Comment Resolver" do
|
describe "Comment Resolver" do
|
||||||
@create_comment_mutation """
|
@create_comment_mutation """
|
||||||
mutation CreateComment($text: String!, $eventId: ID, $inReplyToCommentId: ID) {
|
mutation CreateComment($text: String!, $eventId: ID!, $inReplyToCommentId: ID) {
|
||||||
createComment(text: $text, eventId: $eventId, inReplyToCommentId: $inReplyToCommentId) {
|
createComment(text: $text, eventId: $eventId, inReplyToCommentId: $inReplyToCommentId) {
|
||||||
id,
|
id,
|
||||||
text,
|
text,
|
||||||
|
|
|
@ -75,7 +75,7 @@ defmodule Mobilizon.Web.Resolvers.EventTest do
|
||||||
@create_event_mutation """
|
@create_event_mutation """
|
||||||
mutation CreateEvent(
|
mutation CreateEvent(
|
||||||
$title: String!,
|
$title: String!,
|
||||||
$description: String,
|
$description: String!,
|
||||||
$begins_on: DateTime!,
|
$begins_on: DateTime!,
|
||||||
$ends_on: DateTime,
|
$ends_on: DateTime,
|
||||||
$status: EventStatus,
|
$status: EventStatus,
|
||||||
|
|
|
@ -177,7 +177,7 @@ defmodule Mobilizon.Web.Resolvers.FollowerTest do
|
||||||
end
|
end
|
||||||
|
|
||||||
@update_follower_mutation """
|
@update_follower_mutation """
|
||||||
mutation UpdateFollower($id: ID!, $approved: Boolean) {
|
mutation UpdateFollower($id: ID!, $approved: Boolean!) {
|
||||||
updateFollower(id: $id, approved: $approved) {
|
updateFollower(id: $id, approved: $approved) {
|
||||||
id
|
id
|
||||||
approved
|
approved
|
||||||
|
|
|
@ -64,7 +64,7 @@ defmodule Mobilizon.GraphQL.Resolvers.PostTest do
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@create_post """
|
@create_post """
|
||||||
mutation CreatePost($title: String!, $body: String, $attributedToId: ID!, $draft: Boolean) {
|
mutation CreatePost($title: String!, $body: String!, $attributedToId: ID!, $draft: Boolean) {
|
||||||
createPost(title: $title, body: $body, attributedToId: $attributedToId, draft: $draft) {
|
createPost(title: $title, body: $body, attributedToId: $attributedToId, draft: $draft) {
|
||||||
...PostFragment
|
...PostFragment
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ defmodule Mobilizon.GraphQL.Resolvers.ResourceTest do
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@get_resource """
|
@get_resource """
|
||||||
query GetResource($path: String, $username: String) {
|
query GetResource($path: String!, $username: String!) {
|
||||||
resource(path: $path, username: $username) {
|
resource(path: $path, username: $username) {
|
||||||
id,
|
id,
|
||||||
title,
|
title,
|
||||||
|
|
Loading…
Reference in a new issue