Scalar types

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 {
  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 {
  size: BigInt
}

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

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

Float

Represents signed double‐precision fractional values.

type Product {
  price: Float!
}

String

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

type Product {
  name: String!
}

Boolean

Represents true or false.

type Product {
  inStock: Boolean!
}

ID

Represents a unique identifier.

type Product {
  id: ID!
}