-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Validate
variables
to make sure they are a JSON object as expected.
The GraphQL gem internally raises an exception when given variables that are a string: ``` Query variables should be a Hash, not a String. Try JSON.parse to prepare variables. ``` This avoids that exception and returns a friendly 400 error when the client passes `variables` that are not an object as expected.
- Loading branch information
1 parent
15594ee
commit d0e5a51
Showing
2 changed files
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters