-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server: fix condition to classify requests to Apollo persisted querie…
…s (cherry-pick) Cherry picks PR: hasura/graphql-engine-mono#10514 PR-URL: hasura/graphql-engine-mono#10536 GitOrigin-RevId: b60c7a30766bcbfab09db9989c131712a46fc6d7
- Loading branch information
1 parent
1b1239b
commit 18d3035
Showing
3 changed files
with
55 additions
and
2 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
49 changes: 49 additions & 0 deletions
49
server/tests-py/queries/graphql_query/basic/select_query_with_extensions.yaml
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,49 @@ | ||
- description: Simple GraphQL object query on author, where the request includes extensions (normal request). | ||
url: /v1/graphql | ||
headers: | ||
X-Hasura-Role: admin | ||
status: 200 | ||
response: | ||
data: | ||
author: | ||
- id: 1 | ||
name: Author 1 | ||
- id: 2 | ||
name: Author 2 | ||
query: | ||
# https://graphql.org/learn/serving-over-http/#post-request | ||
operationName: chooseThisOne | ||
extensions: null | ||
query: | | ||
query chooseThisOne { | ||
author { | ||
id | ||
name | ||
} | ||
} | ||
- description: Simple GraphQL object query on author, where the request includes persisted query extension. | ||
url: /v1/graphql | ||
headers: | ||
X-Hasura-Role: admin | ||
status: 200 | ||
response: | ||
errors: | ||
- extensions: | ||
path: $ | ||
code: not-supported | ||
message: Automatic Persisted Queries is not enabled | ||
query: | ||
# https://graphql.org/learn/serving-over-http/#post-request | ||
operationName: chooseThisOne | ||
extensions: | ||
persistedQuery: | ||
version: 1 | ||
sha256Hash: randomhash | ||
query: | | ||
query chooseThisOne { | ||
author { | ||
id | ||
name | ||
} | ||
} |
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