pull --check makes that mismatch visible
before you ship a query based on outdated types.
What counts as a change?
- Database names and IDs.
- Property names and types.
- Select, status, and multi-select choices.
Choose when to check
Use both when editors and developers work independently. Check the same workspace
that supplies the application, and wait for synchronization to finish first.
Add the check to your workflow
Commit your generated schema, CLI configuration, and package lockfile. Install from that lockfile in CI so local development and CI use the same SDK/CLI version. Then run the check with credentials supplied as CI secrets:pull_request_target to work around that; it would expose credentials to untrusted code.
Schema names and choices can appear in logs, so choose an appropriately restricted repository.
When the check fails
Exit code0 means a match; 1 means drift or a failed check. Use the reported
message to decide the next step:
- Schema changed: finish synchronization, run
npx notcms pulllocally, and review the diff alongside affected queries before committing. - File missing or unsupported: regenerate it with
npx notcms pull. - Authentication or network error: fix the connection and rerun; regenerating types will not solve it.