You are looking at the docs for the unreleased master branch of Dgraph. The latest version is v20.11.
Report Issue Edit Page

Reserved Names

The following names are reserved and can’t be used to define any other identifiers:

  • Int
  • Float
  • Boolean
  • String
  • DateTime
  • ID
  • uid
  • Subscription
  • as (case-insensitive)
  • Query
  • Mutation
  • Point
  • PointList
  • Polygon
  • MultiPolygon
  • Aggregate (as a suffix of any identifier name)

For each type, Dgraph generates a number of GraphQL types needed to operate the GraphQL API, these generated type names also can’t be present in the input schema. For example, for a type Author, Dgraph generates:

  • AuthorFilter
  • AuthorOrderable
  • AuthorOrder
  • AuthorRef
  • AddAuthorInput
  • UpdateAuthorInput
  • AuthorPatch
  • AddAuthorPayload
  • DeleteAuthorPayload
  • UpdateAuthorPayload
  • AuthorAggregateResult

Thus if Author is present in the input schema, all of those become reserved type names.

Continue the conversation on Discuss.