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

Validate enums in variables #48

Closed
vektah opened this issue Mar 15, 2018 · 0 comments
Closed

Validate enums in variables #48

vektah opened this issue Mar 15, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@vektah
Copy link
Collaborator

vektah commented Mar 15, 2018

validation isn't firing when posting an enum value in a variable:

query = mutation setState($state: State!) {
    setState(state: $state) { id }
}

variables = {"state": "INVALID_STATE"}

results in

"errors": []

should be something like

   errors: [
    {
      "message": "Argument \"state\" has invalid value {state: INVALID_STATE}.\nIn field \"state\": Expected type \"State\", found INVALID_STATE.",
      "locations": [
        {
          "line": 14,
          "column": 22
        }
      ]
    }
  ]
@vektah vektah added the bug Something isn't working label Mar 15, 2018
@vektah vektah mentioned this issue Mar 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant