type Person {
firstName: String!,
lastName: String!,
age: Int!
}
How to query all people what are older than 18?
type Person {
firstName: String!,
lastName: String!,
age: Int!
}
How to query all people what are older than 18?
And libraries become part of other libraries and framework.They don't become framework
Right now to use graphql to full extend you can combine it with ORM'S like Hasura Or Graphile Or Prisma
query {
article(
where: {rating: {_gte: 4}}
) {
id
title
rating
}
}
query {
posts(where: {
AND: [{
title_in: ["My biggest Adventure", "My latest Hobbies"]
}]
}) {
id
title
}
}
Advice Do not use graphql directly/independently ,use it with above orm's
If you are using Prisma as backend, you could use the greater than operator (_gt), like so:
query {
persons(where: {age_gt: 18}) {
firstName
lastName
age
}
}
You can also use other operators like:
_gt (greater than)_lt (less than)_gte (greater than or equal to)_lte (less than or equal to)_in (equal to)_not_in (not equal to)They are compatible with any data types like Integer, Float, Double, Text, Boolean, Date, etc.