mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-16 18:42:30 +03:00
513a3d0c19
Co-authored-by: Antoine Leblanc <antoine@hasura.io> GITHUB_PR_NUMBER: 6417 GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6417 GitOrigin-RevId: 37b67a4d04e0ed3b16fc5fc9bf025b24b1f1bf6e
126 lines
2.5 KiB
YAML
126 lines
2.5 KiB
YAML
- description: Run create_user sync action mutation with valid email
|
|
url: /v1/graphql
|
|
status: 200
|
|
query:
|
|
query: |
|
|
mutation {
|
|
create_user(email: "clarke@gmail.com", name: "Clarke"){
|
|
__typename
|
|
id
|
|
user {
|
|
__typename
|
|
name
|
|
email
|
|
is_admin
|
|
}
|
|
}
|
|
}
|
|
response:
|
|
data:
|
|
create_user:
|
|
__typename: UserId
|
|
id: 1
|
|
user:
|
|
__typename: user
|
|
name: Clarke
|
|
email: clarke@gmail.com
|
|
is_admin: false
|
|
|
|
- description: Use user_by_email to get our user and test array relationship
|
|
url: /v1/graphql
|
|
status: 200
|
|
query:
|
|
query: |
|
|
query {
|
|
get_user_by_email(email: "clarke@gmail.com"){
|
|
__typename
|
|
id
|
|
articles {
|
|
name
|
|
}
|
|
}
|
|
}
|
|
response:
|
|
data:
|
|
get_user_by_email:
|
|
__typename: UserId
|
|
id: 1
|
|
articles:
|
|
- name: foo
|
|
- name: bar
|
|
- name: bar
|
|
|
|
- description: Use user_by_email to get our user and test array relationship with limit input parameter
|
|
url: /v1/graphql
|
|
status: 200
|
|
query:
|
|
query: |
|
|
query {
|
|
get_user_by_email(email: "clarke@gmail.com"){
|
|
__typename
|
|
id
|
|
articles(limit: 1) {
|
|
name
|
|
}
|
|
}
|
|
}
|
|
response:
|
|
data:
|
|
get_user_by_email:
|
|
__typename: UserId
|
|
id: 1
|
|
articles:
|
|
- name: foo
|
|
|
|
|
|
- description: Use user_by_email to get our user and test array relationship with distinct input parameter
|
|
url: /v1/graphql
|
|
status: 200
|
|
query:
|
|
query: |
|
|
query {
|
|
get_user_by_email(email: "clarke@gmail.com"){
|
|
__typename
|
|
id
|
|
articles(distinct_on: name) {
|
|
name
|
|
}
|
|
}
|
|
}
|
|
response:
|
|
data:
|
|
get_user_by_email:
|
|
__typename: UserId
|
|
id: 1
|
|
articles:
|
|
- name: bar
|
|
- name: foo
|
|
|
|
|
|
- description: Use user_by_email to get our user and test aggregate array relationship
|
|
url: /v1/graphql
|
|
status: 200
|
|
query:
|
|
query: |
|
|
query {
|
|
get_user_by_email(email: "clarke@gmail.com"){
|
|
__typename
|
|
id
|
|
articles_aggregate {
|
|
aggregate {
|
|
max {
|
|
name
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
response:
|
|
data:
|
|
get_user_by_email:
|
|
__typename: UserId
|
|
id: 1
|
|
articles:
|
|
- name: bar
|
|
- name: foo
|