Skip to content

Should BAD_USER_INPUT raise a 400 error? #7460

Discussion options

You must be logged in to vote

Fair question, there's maybe some nuance to the language here. Assuming you're referring to:

If Apollo Server can't parse the request into a legal GraphQL document and validate it against your schema, it responds with a 400 status code
The parse and validate here refer specifically to the document - does it parse (is it valid graphql) and does it validate against the schema (can we execute it).

Invalid variables actually surface during execution, mostly as an unfortunate detail of graphql-js's variable resolution being baked into execution (described at length here):

// The first thing that exec…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@IodizedGabe
Comment options

@jessemyers
Comment options

@glasser
Comment options

@trevor-scheer
Comment options

Answer selected by IodizedGabe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants