Make GraphQL parameters strict following Absinthe 1.7 validating

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-03-23 11:48:23 +01:00
parent 3d50f2d90d
commit a461674f9d
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773
5 changed files with 5 additions and 5 deletions

View file

@ -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,

View file

@ -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,

View file

@ -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

View file

@ -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
} }

View file

@ -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,