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
|
||||
@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) {
|
||||
id,
|
||||
text,
|
||||
|
@ -75,7 +75,7 @@ defmodule Mobilizon.Web.Resolvers.EventTest do
|
||||
@create_event_mutation """
|
||||
mutation CreateEvent(
|
||||
$title: String!,
|
||||
$description: String,
|
||||
$description: String!,
|
||||
$begins_on: DateTime!,
|
||||
$ends_on: DateTime,
|
||||
$status: EventStatus,
|
||||
|
@ -177,7 +177,7 @@ defmodule Mobilizon.Web.Resolvers.FollowerTest do
|
||||
end
|
||||
|
||||
@update_follower_mutation """
|
||||
mutation UpdateFollower($id: ID!, $approved: Boolean) {
|
||||
mutation UpdateFollower($id: ID!, $approved: Boolean!) {
|
||||
updateFollower(id: $id, approved: $approved) {
|
||||
id
|
||||
approved
|
||||
|
@ -64,7 +64,7 @@ defmodule Mobilizon.GraphQL.Resolvers.PostTest do
|
||||
"""
|
||||
|
||||
@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) {
|
||||
...PostFragment
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ defmodule Mobilizon.GraphQL.Resolvers.ResourceTest do
|
||||
"""
|
||||
|
||||
@get_resource """
|
||||
query GetResource($path: String, $username: String) {
|
||||
query GetResource($path: String!, $username: String!) {
|
||||
resource(path: $path, username: $username) {
|
||||
id,
|
||||
title,
|
||||
|
Loading…
Reference in New Issue
Block a user