1
2
3
4
5
6
7
8
mutation {
insert_products(objects:[{
name: "Product 1",
image: "product1.jpg"
}]) {
id
}
}
1
2
3
4
5
6
7
8
subscription fetchOrder {
order ( where: {id: {_eq: “XX-56”}})
{
id
payment
dispatched
}
}
1
2
3
4
5
6
7
8
9
10
subscription notifyOrderPlaced {
orders(
where: {
id: {
},
placed: {
}
}
)
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
“_exists”: {
“_table”:
{ “schema”: “public”, “name”: “product” },
“_where”: {
“_and”: [
{ “id”: { “_ceq”: [“product_id”] } },
{ “orders”:
{ “order”: { “user_id”:
{ “_eq”: “X-Hasura-User-Id” } } } }
]
}
}
}