1
0
mirror of https://github.com/hasura/graphql-engine.git synced 2024-12-19 13:31:43 +03:00
graphql-engine/server/tests-py/queries/remote_schemas/validation/field_validation.yaml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

69 lines
1.6 KiB
YAML
Raw Normal View History

- description: query the remote with a non-existing field 'non_existing_field', which should fail to validate
url: /v1/graphql
status: 200
query:
query: |
query {
user (id: 1) {
id
username
non_existing_field
}
}
response:
errors:
- extensions:
path: $.selectionSet.user.selectionSet.non_existing_field
code: validation-failed
message: "field \"non_existing_field\" not found in type: 'User'"
- description: query the remote with a non-existing field in an interface type
url: /v1/graphql
status: 200
query:
query: |
{
hero(episode: 4) {
id
name
... on Droid {
id
name
primaryFunction
non_existing_field
}
}
}
response:
errors:
- extensions:
path: $.selectionSet.hero.selectionSet.non_existing_field
code: validation-failed
message: "field \"non_existing_field\" not found in type: 'Droid'"
- description: query the remote with a non-existing field in an union type
url: /v1/graphql
status: 200
query:
query: |
{
search(episode: 2) {
__typename
... on Droid {
id
name
}
... on Human {
id
name
non_existing_field
}
}
}
response:
errors:
- extensions:
path: $.selectionSet.search.selectionSet.non_existing_field
code: validation-failed
message: "field \"non_existing_field\" not found in type: 'Human'"