N1Developer docsv1

QC · v1

QUERY

qcRecords

Mock

Mock. This operation is part of the approved contract but its module is not built yet. Run Core with N1_API_MODE=mock N1_DEV_AUTH=stub to get deterministic demo-shop data from it. The real server answers NOT_IMPLEMENTED until it ships; the schema and examples here will not change when it does.

Quality checks already recorded, newest first

Checks already recorded, newest first. Owner, admin, supervisor and QC.

POST/graphqlapp audience

Who can call this. Owner, admin, supervisor, QC.

Headers

  • AuthorizationstringRequired

    Bearer <token>, issued for this endpoint's audience. The token decides the shop and roles; nothing in the request body can change them.

    Example: Bearer eyJhbGciOiJFZERTQSJ9…

  • Content-TypestringRequired

    Always application/json. Only POST is accepted.

    Example: application/json

  • X-Request-IdstringOptional

    Your id for this request (8–128 characters of A–Z a–z 0–9 . _ : -). Echoed back in the response header and in every error, so you can quote it when reporting a problem. Core makes one if you send none.

    Example: app-7f3c2a9e-checkout

Arguments

  • afterStringOptional

    endCursor of the previous page.

  • beforeStringOptional

    startCursor of the next page, when paging backwards.

  • filterQcRecordFilterOptional

    Narrow by job card, stage or result.

    Show children
    • jobCardIdIDOptional

      Only checks on this job card.

    • resultQcResultOptional

      Only PASS or only FAIL.

    • stageQcStageOptional

      Only checks at this stage.

  • firstIntOptional

    Page size, 1–100 (default 20).

    Example: 3

  • lastIntOptional

    Page size when paging backwards, 1–100.

Returns

  • qcRecordsQcRecordConnection!Required

    Checks already recorded, newest first. Owner, admin, supervisor and QC.

    Show children
    • edges[QcRecordEdge!]!Required

      The rows on this page, in order.

      Example: [{"cursor":"WyIyMDI2LTEwLTExVDIzOjAwOjAwLjAwMFoiLCIwMTkyZjBjMS0wMDAwLTcwMDAtODAwMC0wMDAwMDBkNTAwMTkiXQ","node":{"id":"0192f0c1-0000-7000-8000-000000d50019","jobCardId":"0192f0c1-0000-7000-8000-000000d200a2","jobOperationId":"0192f0c1-0000-7000-8000-000000d30655","qrValue":"JC-00032","operationName":"Turning","stage":"RAW_MATERIAL","result":"PASS","reason":null,"measurements":[{"name":"Outer diameter","value":40.01,"unit":"mm"},{"name":"Surface finish","value":1.6,"unit":"Ra"}],"recordedById":"0192f0c1-0000-7000-8000-0000000000a7","recordedByName":"Gita Demo","recordedAt":"2026-10-11T23:00:00.000Z"}},{"cursor":"WyIyMDI2LTEwLTExVDIzOjAwOjAwLjAwMFoiLCIwMTkyZjBjMS0wMDAwLTcwMDAtODAwMC0wMDAwMDBkNTAwMDciXQ","node":{"id":"0192f0c1-0000-7000-8000-000000d50007","jobCardId":"0192f0c1-0000-7000-8000-000000d2002a","jobOperationId":"0192f0c1-0000-7000-8000-000000d301a5","qrValue":"JC-00008","operationName":"Turning","stage":"RAW_MATERIAL","result":"PASS","reason":null,"measurements":[{"name":"Outer diameter","value":40.01,"unit":"mm"},{"name":"Surface finish","value":1.6,"unit":"Ra"}],"recordedById":"0192f0c1-0000-7000-8000-0000000000a7","recordedByName":"Gita Demo","recordedAt":"2026-10-11T23:00:00.000Z"}},{"cursor":"WyIyMDI2LTEwLTExVDIyOjAwOjAwLjAwMFoiLCIwMTkyZjBjMS0wMDAwLTcwMDAtODAwMC0wMDAwMDBkNTAwMWYiXQ","node":{"id":"0192f0c1-0000-7000-8000-000000d5001f","jobCardId":"0192f0c1-0000-7000-8000-000000d200d3","jobOperationId":"0192f0c1-0000-7000-8000-000000d3083f","qrValue":"JC-00042","operationName":"Drilling","stage":"RAW_MATERIAL","result":"PASS","reason":null,"measurements":[{"name":"Outer diameter","value":40.01,"unit":"mm"},{"name":"Surface finish","value":1.6,"unit":"Ra"}],"recordedById":"0192f0c1-0000-7000-8000-0000000000a7","recordedByName":"Gita Demo","recordedAt":"2026-10-11T22:00:00.000Z"}}]

      Show children
      • cursorString!Required

        Opaque position of this row in the list.

        Example: "WyIyMDI2LTEwLTExVDIzOjAwOjAwLjAwMFoiLCIwMTkyZjBjMS0wMDAwLTcwMDAtODAwMC0wMDAwMDBkNTAwMTkiXQ"

      • nodeQcRecord!Required

        The QcRecord.

        Example: {"id":"0192f0c1-0000-7000-8000-000000d50019","jobCardId":"0192f0c1-0000-7000-8000-000000d200a2","jobOperationId":"0192f0c1-0000-7000-8000-000000d30655","qrValue":"JC-00032","operationName":"Turning","stage":"RAW_MATERIAL","result":"PASS","reason":null,"measurements":[{"name":"Outer diameter","value":40.01,"unit":"mm"},{"name":"Surface finish","value":1.6,"unit":"Ra"}],"recordedById":"0192f0c1-0000-7000-8000-0000000000a7","recordedByName":"Gita Demo","recordedAt":"2026-10-11T23:00:00.000Z"}

        Show children
        • idID!Required

          Stable id (UUIDv7).

          Example: "0192f0c1-0000-7000-8000-000000d50019"

        • jobCardIdID!Required

          The job card checked.

          Example: "0192f0c1-0000-7000-8000-000000d200a2"

        • jobOperationIdID!Required

          The step checked.

          Example: "0192f0c1-0000-7000-8000-000000d30655"

        • measurements[QcMeasurement!]!Required

          The readings taken.

          Example: [{"name":"Outer diameter","value":40.01,"unit":"mm"},{"name":"Surface finish","value":1.6,"unit":"Ra"}]

          Show children
          • nameString!Required

            What was measured, such as “Bore diameter”.

            Example: "Outer diameter"

          • unitString!Required

            The unit, such as “mm”.

            Example: "mm"

          • valueFloat!Required

            The reading.

            Example: 40.01

        • operationNameString!Required

          What the step does.

          Example: "Turning"

        • qrValueString!Required

          The job card’s QR text.

          Example: "JC-00032"

        • reasonStringOptional

          Why it failed. Always set for FAIL.

          Example: null

        • recordedAtString!Required

          UTC time the check was recorded.

          Example: "2026-10-11T23:00:00.000Z"

        • recordedByIdID!Required

          Who made the check (User.id).

          Example: "0192f0c1-0000-7000-8000-0000000000a7"

        • recordedByNameString!Required

          That person’s name.

          Example: "Gita Demo"

        • resultQcResult!Required

          The outcome.

          Example: "PASS"

          • FAILOut of tolerance. A reason is required.
          • PASSWithin tolerance.
        • stageQcStage!Required

          When the check was made.

          Example: "RAW_MATERIAL"

          • FINALOn the finished part.
          • IN_PROCESSBetween operations.
          • RAW_MATERIALOn the material before work starts.
    • pageInfoPageInfo!Required

      Whether more pages exist, and the cursors to reach them.

      Example: {"hasNextPage":true,"hasPreviousPage":false,"endCursor":"WyIyMDI2LTEwLTExVDIyOjAwOjAwLjAwMFoiLCIwMTkyZjBjMS0wMDAwLTcwMDAtODAwMC0wMDAwMDBkNTAwMWYiXQ"}

      Show children
      • endCursorStringOptional

        Cursor of the last row; pass it as after to get the next page. Null when the page is empty.

        Example: "WyIyMDI2LTEwLTExVDIyOjAwOjAwLjAwMFoiLCIwMTkyZjBjMS0wMDAwLTcwMDAtODAwMC0wMDAwMDBkNTAwMWYiXQ"

      • hasNextPageBoolean!Required

        Whether another page follows this one.

        Example: true

      • hasPreviousPageBoolean!Required

        Whether another page comes before this one.

        Example: false

      • startCursorStringOptional

        Cursor of the first row; pass it as before to page backwards. Null when the page is empty.

    • totalCountInt!Required

      All rows matching the filter and search, not just this page.

      Example: 36

Errors

CodeHTTPWhen
VALIDATION_FAILED400Input failed Zod or route schema validation. details lists each field path and problem.
FORBIDDEN403Signed in, but the role or tenant does not allow the action.

Every error has the same body. See Errors.

Rate limit tier

Tier: per user. Over the limit you get RATE_LIMITED (HTTP 429) with a Retry-After header. See Response handling.

Search documentation

Search operations, types and errors from the generated contract.