Skip to content
LogoLogo

Design system schema

See Management API schema for every domain, the endpoint and authentication.

Queries

designSystem

Reads a design system. Scope: ORGANIZATION_PROJECTS_READ.

designSystem(id: ID!): DesignSystem @auth

designSystems

Lists the design systems in a project. Scope: ORGANIZATION_PROJECTS_READ.

designSystems(
  projectId: ID!
  first: Int
  after: String
  """Text that the name contains, ignoring case."""
  search: String
  sortKey: DesignSystemSortKeys = NAME
  """Whether to reverse the order of `sortKey`."""
  reverse: Boolean = false
): DesignSystemConnection! @auth

Mutations

designSystemCreate

Creates a design system from a committed Markdown asset. Scope: ORGANIZATION_PROJECTS_UPDATE.

designSystemCreate(input: DesignSystemCreateInput!): DesignSystemCreatePayload! @auth

designSystemUpdate

Updates a design system's name or guidance asset. Scope: ORGANIZATION_PROJECTS_UPDATE.

designSystemUpdate(input: DesignSystemUpdateInput!): DesignSystemUpdatePayload! @auth

designSystemDelete

Deletes a design system. The asset that holds its guidance is kept. Scope: ORGANIZATION_PROJECTS_UPDATE.

designSystemDelete(input: DesignSystemDeleteInput!): DesignSystemDeletePayload! @auth

Types

DesignSystem

"""
A set of shared design decisions for a project, written as a Markdown file held in an asset.
"""
type DesignSystem {
  """The ID of the design system."""
  id: ID!
  """The name of the design system."""
  name: String!
  """The project that holds the design system."""
  project: Project!
  """The Markdown asset that holds the design guidance."""
  asset: Asset!
  """When the design system was created."""
  createdAt: DateTime!
  """When the design system last changed."""
  updatedAt: DateTime!
}

DesignSystemEdge

"""A design system in a page of results."""
type DesignSystemEdge {
  """The cursor of this edge."""
  cursor: String!
  """The design system."""
  node: DesignSystem!
}

DesignSystemConnection

"""A page of design systems."""
type DesignSystemConnection {
  """The edges in this page."""
  edges: [DesignSystemEdge!]!
  """The design systems in this page."""
  nodes: [DesignSystem!]!
  """Where this page sits in the list."""
  pageInfo: PageInfo!
  """
  The number of design systems in the project. `search` does not narrow it.
  """
  totalCount: Int!
}

DesignSystemSortKeys

"""The order of `designSystems`."""
enum DesignSystemSortKeys {
  """By name, A to Z."""
  NAME
  """By creation time, oldest first."""
  CREATED_AT
  """By last change, oldest first."""
  UPDATED_AT
}

DesignSystemCreateInput

"""The input of `designSystemCreate`."""
input DesignSystemCreateInput {
  """The ID of the project to create the design system in."""
  projectId: ID!
  """The name of the design system. It must not be blank."""
  name: String!
  """
  The ID of a committed Markdown asset in the same project that holds the design guidance.
  """
  assetId: ID!
}

DesignSystemCreatePayload

"""The result of `designSystemCreate`."""
type DesignSystemCreatePayload {
  """The created design system."""
  designSystem: DesignSystem
}

DesignSystemUpdateInput

"""The input of `designSystemUpdate`. Omit a field to keep its value."""
input DesignSystemUpdateInput {
  """The ID of the design system. Required."""
  id: ID!
  """The new name."""
  name: String
  """
  The ID of a committed Markdown asset in the same project that replaces the guidance.
  """
  assetId: ID
}

DesignSystemUpdatePayload

"""The result of `designSystemUpdate`."""
type DesignSystemUpdatePayload {
  """The updated design system."""
  designSystem: DesignSystem
}

DesignSystemDeleteInput

"""The input of `designSystemDelete`."""
input DesignSystemDeleteInput {
  """The ID of the design system."""
  id: ID!
}

DesignSystemDeletePayload

"""The result of `designSystemDelete`."""
type DesignSystemDeletePayload {
  """The ID of the deleted design system."""
  deletedDesignSystemId: ID
}