mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-19 05:21:47 +03:00
53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
|
- 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
|