graphql-engine/server/tests-py/queries/graphql_validation/null_variable_value.yaml
Antoine Leblanc 27e68517e7 server: unify parsing Postgres scalars
GitOrigin-RevId: f2a938758cb82b432ec209b0fb453a1d8b206bee
2021-05-13 20:13:49 +00:00

56 lines
1.1 KiB
YAML

- 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
}
}
}