Scalar types

This is the documentation of the GraphQL Library version 6. For the long-term support (LTS) version 5, refer to GraphQL Library version 5 LTS.

Neo4j GraphQL supports all of the built-in GraphQL scalar types. The BigInt scalar type is an addition specific to the Neo4j database.

Scalar types

Type Description Example

Int

Supports up to 32-bit values.

type Person @node {
  age: Int!
}

BigInt

Supports up to 64 bit integers, serialized as strings in variables and in data responses. Shares the same Numerical operators as the other numeric types.

type File @node {
  size: BigInt
}

Can be passed as a number (does not need quotes) when used directly in a query or mutation.

query {
    files(where: { size_EQ: 9223372036854775807 }) {
        size
    }
}

Float

Represents signed double‐precision fractional values.

type Product @node {
  price: Float!
}

String

Stored as a string in the database and always returned as a string.

type Product @node {
  name: String!
}

Boolean

Represents true or false.

type Product @node {
  inStock: Boolean!
}

ID

Represents a unique identifier.

type Product @node {
  id: ID!
}