Query {
authors { # fetches authors (1 query)
name
articles { # fetches articles for each author
title # (N queries for N) authors
}
}
}
query {
brands (order_by: ["name"], limit:5) {
id
name
products (order_by: ["rating"], limit: 10) {
id
name
img
}
}
}
mutation {
insert_product_tags(objects: [
{
product id: 1.
tag: "black"
},
{
product id: 1.
tag: "electronics"
}
]) {
affected rows
}
}
subscription fetchorder {
orders (where: {id: {eg: "XX-57"}}) {
id
payment
dispatched
}
}
Query {
authors { # fetches authors (1 query)
name
articles { # fetches articles for each author
title # (N queries for N) authors
}
}
}
query {
brands (order_by: ["name"], limit:5) {
id
name
products (order_by: ["rating"], limit: 10) {
id
name
img
}
}
}
mutation {
insert_product_tags(objects: [
{
product id: 1.
tag: "black"
},
{
product id: 1.
tag: "electronics"
}
]) {
affected rows
}
}
subscription fetchorder {
orders (where: {id: {eg: "XX-57"}}) {
id
payment
dispatched
}
}