Refactor Super Graph into a library #26

This commit is contained in:
Vikram Rangnekar
2020-04-10 02:27:43 -04:00
parent e102da839e
commit 7831d27345
200 changed files with 3590 additions and 4447 deletions

21
core/corpus/1 Normal file
View File

@ -0,0 +1,21 @@
query {
products(
# returns only 30 items
limit: 30,
# starts from item 10, commented out for now
# offset: 10,
# orders the response items by highest price
order_by: { price: desc },
# no duplicate prices returned
distinct: [ price ]
# only items with an id >= 30 and < 30 are returned
where: { id: { and: { greater_or_equals: 20, lt: 28 } } }) {
id
name
price
}
}

14
core/corpus/2 Normal file
View File

@ -0,0 +1,14 @@
query {
products(
where: {
or: {
not: { id: { is_null: true } },
price: { gt: 10 },
price: { lt: 20 }
} }
) {
id
name
price
}
}

12
core/corpus/3 Normal file
View File

@ -0,0 +1,12 @@
query {
products(
where: {
and: {
not: { id: { is_null: true } },
price: { gt: 10 }
}}) {
id
name
price
}
}

12
core/corpus/4 Normal file
View File

@ -0,0 +1,12 @@
query {
products(
where: {
and: [
{ not: { id: { is_null: true } } },
{ price: { gt: 10 } },
] } ) {
id
name
price
}
}

6
core/corpus/5 Normal file
View File

@ -0,0 +1,6 @@
query {
product(id: $PRODUCT_ID, where: { price: { eq: $PRODUCT_PRICE } }) {
id
name
}
}

6
core/corpus/6 Normal file
View File

@ -0,0 +1,6 @@
query {
product(id: 15) {
id
name
}
}

6
core/corpus/7 Normal file
View File

@ -0,0 +1,6 @@
query {
products(search: "Imperial") {
id
name
}
}

22
core/corpus/8 Normal file
View File

@ -0,0 +1,22 @@
query {
products(
# returns only 30 items
limit: 30,
# starts from item 10, commented out for now
# offset: 10,
# orders the response items by highest price
order_by: { price: desc },
# only items with an id >= 30 and < 30 are returned
where: { id: { and: { greater_or_equals: 20, lt: 28 } } }) {
id
name
price
user {
full_name
picture : avatar
}
}
}