Add insert mutation with bulk insert
This commit is contained in:
@ -47,4 +47,79 @@ query {
|
||||
email
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
variables {
|
||||
"insert": {
|
||||
"name": "Hello",
|
||||
"description": "World",
|
||||
"created_at": "now",
|
||||
"updated_at": "now"
|
||||
},
|
||||
"user": 123
|
||||
}
|
||||
|
||||
mutation {
|
||||
products(insert: $insert) {
|
||||
id
|
||||
name
|
||||
description
|
||||
}
|
||||
}
|
||||
|
||||
variables {
|
||||
"insert": {
|
||||
"name": "Hello",
|
||||
"description": "World",
|
||||
"created_at": "now",
|
||||
"updated_at": "now"
|
||||
},
|
||||
"user": 123
|
||||
}
|
||||
|
||||
mutation {
|
||||
products(insert: $insert) {
|
||||
id
|
||||
}
|
||||
}
|
||||
|
||||
variables {
|
||||
"insert": {
|
||||
"description": "World3",
|
||||
"name": "Hello3",
|
||||
"created_at": "now",
|
||||
"updated_at": "now"
|
||||
},
|
||||
"user": 123
|
||||
}
|
||||
|
||||
{
|
||||
customers {
|
||||
id
|
||||
email
|
||||
payments {
|
||||
customer_id
|
||||
amount
|
||||
billing_details
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
variables {
|
||||
"insert": {
|
||||
"description": "World3",
|
||||
"name": "Hello3",
|
||||
"created_at": "now",
|
||||
"updated_at": "now"
|
||||
},
|
||||
"user": 123
|
||||
}
|
||||
|
||||
{
|
||||
me {
|
||||
id
|
||||
full_name
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -84,8 +84,9 @@ database:
|
||||
#log_level: "debug"
|
||||
|
||||
# Define variables here that you want to use in filters
|
||||
# sub-queries must be wrapped in ()
|
||||
variables:
|
||||
account_id: "select account_id from users where id = $user_id"
|
||||
account_id: "(select account_id from users where id = $user_id)"
|
||||
|
||||
# Define defaults to for the field key and values below
|
||||
defaults:
|
||||
@ -105,12 +106,12 @@ database:
|
||||
# This filter will overwrite defaults.filter
|
||||
# filter: ["{ id: { eq: $user_id } }"]
|
||||
|
||||
- name: products
|
||||
# Multiple filters are AND'd together
|
||||
filter: [
|
||||
"{ price: { gt: 0 } }",
|
||||
"{ price: { lt: 8 } }"
|
||||
]
|
||||
# - name: products
|
||||
# # Multiple filters are AND'd together
|
||||
# filter: [
|
||||
# "{ price: { gt: 0 } }",
|
||||
# "{ price: { lt: 8 } }"
|
||||
# ]
|
||||
|
||||
- name: customers
|
||||
# No filter is used for this field not
|
||||
|
@ -82,8 +82,9 @@ database:
|
||||
#log_level: "debug"
|
||||
|
||||
# Define variables here that you want to use in filters
|
||||
# sub-queries must be wrapped in ()
|
||||
variables:
|
||||
account_id: "select account_id from users where id = $user_id"
|
||||
account_id: "(select account_id from users where id = $user_id)"
|
||||
|
||||
# Define defaults to for the field key and values below
|
||||
defaults:
|
||||
|
Reference in New Issue
Block a user