Schema & Types

The basic unit of components of a GraphQL schema are object types - it represents an object you can fetch for and the definitions of what fields will be included in the response. A representation of GraphQL schema language may look like this in Identity API:

type SyntheticDevice {
  tokenId: Int!
  integrationId: Int!
  address: Address!
  mintedAt: Time!
}
  • SyntheticDevice is a GraphQL Object Type, meaning it's a type with some fields. Most of the types in your schema will be object types.

  • tokenId, integrationId, address, and mintedAt are fields on the SyntheticDevice type. That means these 4 fields can appear in any part of a GraphQL query that operates on the SyntheticDevice type.

  • Int is one of the built-in scalar types - these are types that resolve to a single scalar object, and can't have sub-selections in the query.

  • Int! means that the field is non-nullable, meaning that the DIMO GraphQL service promises to always return a value when queried.

Last updated

Was this helpful?