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

View file

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

View file

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

View file

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

View file

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