mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
4702ba514a
GitOrigin-RevId: 36ceb1852bc7779092cfb59c92035dd9635b2e3f
65 lines
1.4 KiB
YAML
65 lines
1.4 KiB
YAML
- description: throw error when executing query with the '__schema' field for a introspection disabled role
|
|
url: /v1/graphql
|
|
status: 200
|
|
headers:
|
|
X-Hasura-Role: introspection_disabled
|
|
response:
|
|
errors:
|
|
- extensions:
|
|
path: $
|
|
code: not-supported
|
|
message: "introspection is disabled for role: \"introspection_disabled\""
|
|
query:
|
|
query: |
|
|
query {
|
|
__schema {
|
|
types {
|
|
name
|
|
}
|
|
}
|
|
}
|
|
|
|
- description: throw error when executing query with the '__type' field for a introspection disabled role
|
|
url: /v1/graphql
|
|
status: 200
|
|
headers:
|
|
X-Hasura-Role: introspection_disabled
|
|
response:
|
|
errors:
|
|
- extensions:
|
|
path: $
|
|
code: not-supported
|
|
message: "introspection is disabled for role: \"introspection_disabled\""
|
|
query:
|
|
query: |
|
|
query {
|
|
__type (name: "authors") {
|
|
fields {
|
|
name
|
|
}
|
|
}
|
|
}
|
|
|
|
- description: allow '__typename' in the query for a introspection disabled role
|
|
url: /v1/graphql
|
|
status: 200
|
|
headers:
|
|
X-Hasura-Role: introspection_disabled
|
|
response:
|
|
data:
|
|
__typename: query_root
|
|
authors:
|
|
- __typename: authors
|
|
name: J.K.Rowling
|
|
- __typename: authors
|
|
name: Paulo Coelho
|
|
query:
|
|
query: |
|
|
query {
|
|
__typename
|
|
authors {
|
|
__typename
|
|
name
|
|
}
|
|
}
|