1
0
mirror of https://github.com/hasura/graphql-engine.git synced 2024-12-21 06:21:39 +03:00
graphql-engine/server/tests-py/queries/graphql_validation/null_variable_value.yaml

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

56 lines
1.1 KiB
YAML
Raw Normal View History

- description: Passing null value for nullable type
url: /v1/graphql
status: 200
response:
data:
author: []
query:
variables:
limit: null
query: |
query author($limit: Int) {
author(limit: $limit) {
id
name
}
}
- description: Passing null value for non-nullable type with default value
url: /v1/graphql
status: 200
response:
data:
author: []
query:
variables:
limit: null
query: |
query author($limit: Int! = 1) {
author(limit: $limit) {
id
name
}
}
- description: Passing null value for non nullable type
url: /v1/graphql
status: 200
response:
errors:
- extensions:
path: $.selectionSet.update_author.args.where.id._eq
code: validation-failed
message: unexpected null value for type "Int"
query:
variables:
author_id: null
query: |
mutation update_author($author_id: Int!) {
update_author(where: {id: {_eq: $author_id}}, _set: {name: ""}) {
returning {
id
name
}
}
}