Integer Field

Sample Integer Query

Query

{
products {
quantity
}
}

Output

{
"data": {
"products": [
{
"quantity": 100
},
{
"quantity": 50
}
]
}
}

Filtering by Integer

Integer filters support:

  • _not
  • _in
  • _not_in
  • _lt
  • _lte
  • _gt
  • _gte

quantity: Int

{
products(where: { quantity: 100 }) {
quantity
}
}

quantity_not: Int

All values that are not equal to given value.

{
products(where: { quantity_not: 1000 }) {
quantity
}
}

quantity_in: [Int!]

All values that are contained in given list.

{
products(where: { quantity_in: [10, 100, 1000] }) {
quantity
}
}

quantity_not_in: [Int!]

All values that are not contained in given list.

{
products(where: { quantity_not_in: [5, 50, 500] }) {
quantity
}
}

quantity_lt: Int

All values less than the given value.

{
products(where: { quantity_lt: 1000 }) {
quantity
}
}

quantity_lte: Int

All values less than or equal the given value.

{
products(where: { quantity_lte: 100 }) {
quantity
}
}

quantity_gt: Int

All values greater than the given value.

{
products(where: { quantity_gt: 99 }) {
quantity
}
}

quantity_gte: Int

All values

{
products(where: { quantity_gte: 100 }) {
quantity
}
}

Mutating a Integer

mutation {
updateProduct(where: { id: "123xyz" }, data: { quantity: 100 }) {
quantity
}
}

This site uses cookies to provide you with a better user experience. For more information, refer to our Privacy Policy