-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5fa33a6
commit 876a39b
Showing
2 changed files
with
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Skipping some preprocessing steps | ||
|
||
It does not make much sense to revalidate persisted query—we did it earlier, so it can be disabled in the `#execute` call: | ||
|
||
```ruby | ||
GraphqlSchema.execute( | ||
params[:query], | ||
variables: ensure_hash(params[:variables]), | ||
context: { | ||
extensions: ensure_hash(params[:extensions]) | ||
}, | ||
operation_name: params[:operationName], | ||
validate: params[:query].present? | ||
) | ||
``` | ||
|
||
Moreover, some analyzers can be disabled as well: in order to do that just pass the same check `params[:query].present?` to the context and then add early exit to your analyzers based on this flag. |