Documentation
Specifications
Schema Publication

Schema Publication

Technical details about publishing GraphQL schemas to Hive.

NameValue
Endpointhttps://app.graphql-hive.com/registry
HeaderX-API-Token: token-here
MethodPOST
BodyGraphQL Request - { query, operationName, variables }
input SchemaPublishInput {
  """
  Name of the service (applicable only for Federation and Stitching)
  """
  service: ID
  """
  An url of the service (applicable only for Federation and Stitching)
  """
  url: String
  """
  Schema definitions
  """
  sdl: String!
  """
  Author of the changes
  """
  author: String!
  """
  Unique identifier of the changes
  """
  commit: String!
  """
  Hive prevents from publishing breaking changes or broken schemas by default, use this flag to override this behavior.
  """
  force: Boolean @deprecated(reason: "No longer needed for new projects")
  """
}
 
mutation schemaPublish($input: SchemaPublishInput!) {
  schemaPublish(input: $input) {
    __typename
    ... on SchemaPublishSuccess {
      initial
      valid
      changes {
        nodes {
          message
          criticality
        }
        total
      }
    }
    ... on SchemaPublishError {
      valid
      changes {
        nodes {
          message
          criticality
        }
        total
      }
      errors {
        nodes {
          message
        }
        total
      }
    }
    ... on SchemaPublishMissingServiceError {
      message
    }
  }
}