Int
32-bit signed integer scalar type
Audience: Programmer
The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Format
32-bit signed integer
Range: -2,147,483,648 to 2,147,483,647
No decimal places
No thousand separators
Usage
type Stock {
quantity: Int!
ownQuantity: Int!
incomingStock: Int!
outgoingStock: Int!
}
query {
inventoryItems(
first: 10 # Int parameter
) {
edges {
node {
itemstocks {
quantity
}
}
}
}
}Common Int Fields
Quantities and counts
Pagination limits (
first,last)Array indices
Version numbers
Port numbers
Filtering
Int fields typically support:
field_GT- Greater thanfield_GTE- Greater than or equalfield_LT- Less thanfield_LTE- Less than or equalfield_IN- Match any value in list
Limitations
For values outside the Int range, consider:
Using
Floatfor larger numbersUsing
Stringfor arbitrary precisionCustom scalars for specific domains
See Also
Float - Floating-point numbers
Input Types - Numeric filters
Last updated
Was this helpful?
