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

If a required variable is not set it returns the error and result as if the variable was zero state #272

Closed
jonlundy opened this issue Aug 7, 2018 · 1 comment

Comments

@jonlundy
Copy link
Contributor

jonlundy commented Aug 7, 2018

query getThing($required: ID!){ thing(required: $required) { things and stuff } }
variables: {}

Expected Behaviour

{
	"data":null,
	"errors":[
		{
			"message":"must be defined",
			"path":["variable","required"]
		}
	]
}

Actual Behavior

{
	"data":null,
	"errors":[
		{
			"message":"must be defined",
			"path":["variable","required"]
		}
	]
}
{
	"data":{ /* data as if required was = 0 */ }
}

Minimal graphql.schema and models to reproduce

@jonlundy
Copy link
Contributor Author

jonlundy commented Aug 7, 2018

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

No branches or pull requests

1 participant