Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graphiql does not properly validate default values for required fields #719

Closed
slisaasquatch opened this issue Sep 21, 2018 · 1 comment
Closed
Labels

Comments

@slisaasquatch
Copy link

Here's the ticket for the new spec: graphql/graphql-spec#418
It allows the schema to be defined like this:

type Query {
  field(arg: Int! = 0): Int
}

For the example above, if you don't provide arg in the query, graphiql will consider the query invalid.

@acao acao added the graphiql label Dec 23, 2021
@thomasheyenbrock
Copy link
Collaborator

I tried to reproduce this exact example in the latest version, but couldn't. Both queries { field } and { field(arg: 42) } don't get any linter errors and execute fine. Closing this as the issue seems to have been fixed at some point in the past.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

3 participants