OBJECT

Query

Data fetch operations.

link GraphQL Schema definition

  • type Query {
  • # Retrieve a single model by ID.
  • #
  • # @error not.found: If no model with the given id exists.
  • # @error not.unique: If multiple models with the given id exist for this
  • # organization. Note this only applies when searching on a `field` other than
  • # `id`.
  • #
  • # Arguments
  • # id: The id of the model to retrieve.
  • # field: The id field to use, defaults to the primary identifier
  • # (id) but may also
  • # be a secondary identifier if that id is only applied to a single model.
  • # If you need to list models using a non-unique secondary identifier
  • # then use the models search instead which supports both exact and partial
  • # matches.
  • # For example to list all the models with an internalId of `test` the request
  • # would
  • # be `models(query: "internalId: test")`.
  • model(id: ID!, field: ModelIdField): Model
  • # Retrieve a page of models given an optional query.
  • #
  • # Arguments
  • # organizationIds: @internal
  • #
  • # A set of organizations to search over. The active session must have access to
  • # models
  • # within any of the specified organizations in order to see the results. This may
  • # happen
  • # either by being a member of the organization or with direct shares.
  • # include: In addition to active models, include modules with the
  • # following properies.
  • # query: A free text search for models. If unspecified all
  • # models within the current organization
  • # will be returned.
  • # sortBy: The order to return the results in, defaults to created
  • # time, descending.
  • # Default: [{ "field": created, order: desc }]
  • # pageSize: The maximum number of results to return in a single
  • # page.
  • # Default: 10
  • # offset: An offset id for the next page to retrieve. The value
  • # from `nextOffset` in the previous result should
  • # be used to grab the next page.
  • models(
  • organizationIds: [ID!],
  • include: [SearchInclusion!],
  • query: String,
  • sortBy: [ModelSort!],
  • pageSize: Int,
  • offset: String
  • ): ModelSearchResultList
  • }

link Require by

This element is not required by anyone