graphql-engine/server/tests-py/queries/graphql_mutation/functions/smoke.yaml

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

53 lines
1.1 KiB
YAML
Raw Normal View History

- description: Volatile function as query (check)
url: /v1/graphql
status: 200
query:
query: |
query {
volatile_func1 {
name
}
}
response:
data:
volatile_func1:
- name: Starke Blake
- name: Bellamy Blake
- name: Dora Black
- description: Volatile function as query (ensure not in mutation)
url: /v1/graphql
status: 200
query:
query: |
mutation {
volatile_func1 {
name
}
}
response:
errors:
- extensions:
path: $.selectionSet.volatile_func1
code: validation-failed
message: "field \"volatile_func1\" not found in type: 'mutation_root'"
# In the future we may want to return an informational warning in these cases,
# as this is a footgun
- description: Volatile function as query (check)
url: /v1/graphql
status: 200
query:
query: |
mutation {
volatile_func2 {
name
}
}
response:
data:
volatile_func2:
- name: Starke Blake
- name: Bellamy Blake
- name: Dora Black