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 committed by tykayn
parent 379e97107f
commit b849a63cc6
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,