ProductionMu Mutation

createComponent

Topics: Jobs

Create a new component. Requires component:write permission.

Returns

UpsertComponentPayload!

Arguments

Component data

Examples

Add Printing Cover

mutation AddPrintingCover($input: CreateComponentInput!) {
  createComponent(input: $input) {
    component { id jobId name kind quantity }
    errors { path message }
  }
}

Variables

{
  "input": {
    "jobId": "job_0h248h248h848r248h248h248h",
    "componentNumber": "COVER",
    "name": "4-page cover",
    "kind": "COVER",
    "quantity": 5000,
    "description": "Cover component for the autumn brochure. Add the print specification before planning."
  }
}
Exact field SDL
"""Create a new component. Requires component:write permission."""
createComponent(
  """Component data"""
  input: CreateComponentInput!
): UpsertComponentPayload! @topic(names: ["jobs"]) @topic_example(names: ["production.add-cover"])

Declared on Mutation. Access is checked by the platform for each operation.