Skip to content

chore(tooling): move GraphQL schema to apps/cms, remove packages/contracts#57

Merged
tataihono merged 4 commits intomainfrom
chore/56-schema-to-cms
Feb 18, 2026
Merged

chore(tooling): move GraphQL schema to apps/cms, remove packages/contracts#57
tataihono merged 4 commits intomainfrom
chore/56-schema-to-cms

Conversation

@tataihono
Copy link
Copy Markdown
Contributor

@tataihono tataihono commented Feb 18, 2026

Resolves #56

Summary

Move GraphQL schema from packages/contracts to apps/cms/schema.graphql. Schema is auto-generated by Strapi; packages/contracts and validate-contracts were redundant.

Contracts Changed

  • yes
  • no

Regeneration Required

  • yes
  • no

Validation

  • Build passes
  • check:generated passes

Summary by CodeRabbit

  • Chores

    • Consolidated the canonical GraphQL schema into the CMS app and removed the legacy contracts package and its validation scripts.
    • Simplified CI by removing the contracts validation job and its dependency.
  • New Features

    • Expanded API schema with new scalar types, entity wrappers, pagination, richer filters, and many query/mutation endpoints (including auth flows: login, register, password reset).
  • Documentation

    • Updated ownership and guidance to reflect the schema relocation and new tooling locations.

tataihono and others added 3 commits February 18, 2026 15:09
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
….graphql

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 18, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

Removes packages/contracts, moves canonical GraphQL schema to apps/cms/schema.graphql (Strapi-generated), and updates CI, configs, scripts, and docs to stop referencing the removed contracts package.

Changes

Cohort / File(s) Summary
Contracts package removal
packages/contracts/AGENTS.md, packages/contracts/README.md, packages/contracts/package.json, packages/contracts/scripts/validate-contracts.mjs
Deleted the packages/contracts package, its docs, package metadata, and the contracts validation script.
CMS schema and plugin config
apps/cms/schema.graphql, apps/cms/config/plugins.ts, apps/cms/AGENTS.md
Pointed Strapi plugin artifacts at apps/cms/schema.graphql, removed references to shared contracts/typegen, and updated local CMS agent guidance to treat schema.graphql as canonical.
CI / scripts / package.json
.github/workflows/ci.yml, package.json
Removed the contracts CI job and the contracts:validate script; deleted the generated-code job dependency on contracts.
Repository docs & ownership
AGENTS.md, SECURITY.md, packages/README.md, apps/web/README.md, CODEOWNERS
Updated docs to reference apps/cms/schema.graphql instead of packages/contracts, removed contracts team ownership entry, and adjusted scope/boundary guidance.
Top-level README/packaging
packages/README.md
Removed mention of contracts and added note that the GraphQL schema lives in apps/cms/schema.graphql; documented codegen/tooling path.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore(tooling): move GraphQL schema to apps/cms, remove packages/contracts' directly and clearly summarizes the primary changes in the PR.
Linked Issues check ✅ Passed All coding requirements from issue #56 are met: schema moved to apps/cms/schema.graphql, packages/contracts deleted, contracts:validate removed, CI contracts job removed, and documentation updated.
Out of Scope Changes check ✅ Passed All changes are directly related to the objectives in issue #56; no out-of-scope modifications were introduced.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/56-schema-to-cms

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot added the cms label Feb 18, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
AGENTS.md (2)

48-48: ⚠️ Potential issue | 🟡 Minor

Stale "contracts" language in agent operating rules.

The rule "If contracts change: regenerate clients in same PR" should reference the schema since there is no longer a contracts package.

📝 Suggested fix
-  - If contracts change: regenerate clients in same PR.
+  - If the GraphQL schema (`apps/cms/schema.graphql`) changes: regenerate clients in same PR.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` at line 48, Update the stale rule text "If contracts change:
regenerate clients in same PR" to reference the schema instead; replace it with
something like "If schema changes: regenerate clients in the same PR" (or
similar wording) so the agent operating rules use "schema" rather than the
obsolete "contracts" terminology and ensure any related bullet/heading that
mentions contracts is updated to the word "schema".

9-9: ⚠️ Potential issue | 🟡 Minor

Ambiguous "Contracts" reference in non-negotiable invariants.

packages/contracts no longer exists, so line 9 is opaque to agents unfamiliar with the history. The intent is that apps/cms/schema.graphql is the authoritative source of truth for integrations.

📝 Suggested fix
-  - Contracts are source of truth for integrations.
+  - `apps/cms/schema.graphql` is source of truth for integrations.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` at line 9, Replace the ambiguous reference "Contracts are source
of truth for integrations." with an explicit pointer to the current
authoritative schema by updating the line in AGENTS.md to say that
apps/cms/schema.graphql is the source of truth for integrations (e.g., "The
authoritative schema for integrations is apps/cms/schema.graphql"). Ensure the
wording mentions the file path apps/cms/schema.graphql so new agents can locate
the schema without historical context.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/README.md`:
- Line 3: Update the README header to remove the stale reference to "contracts":
find the header string "Shared contracts, generated clients, models, AI config,
and codegen tooling." in packages/README.md and edit it to something like
"Shared generated clients, models, AI config, and codegen tooling." so it no
longer mentions the deleted packages/contracts.

---

Outside diff comments:
In `@AGENTS.md`:
- Line 48: Update the stale rule text "If contracts change: regenerate clients
in same PR" to reference the schema instead; replace it with something like "If
schema changes: regenerate clients in the same PR" (or similar wording) so the
agent operating rules use "schema" rather than the obsolete "contracts"
terminology and ensure any related bullet/heading that mentions contracts is
updated to the word "schema".
- Line 9: Replace the ambiguous reference "Contracts are source of truth for
integrations." with an explicit pointer to the current authoritative schema by
updating the line in AGENTS.md to say that apps/cms/schema.graphql is the source
of truth for integrations (e.g., "The authoritative schema for integrations is
apps/cms/schema.graphql"). Ensure the wording mentions the file path
apps/cms/schema.graphql so new agents can locate the schema without historical
context.

Comment thread packages/README.md Outdated
Co-authored-by: Cursor <cursoragent@cursor.com>
@tataihono
Copy link
Copy Markdown
Contributor Author

Review feedback addressed (12240f6)

Fixed:

  • packages/README.md: Removed stale "contracts" from header — now "Shared generated clients, models, AI config, and codegen tooling."

@tataihono tataihono merged commit aaeda79 into main Feb 18, 2026
2 checks passed
@tataihono tataihono deleted the chore/56-schema-to-cms branch February 18, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(tooling): move GraphQL schema to apps/cms, remove packages/contracts

1 participant