# Lmiguelvargasf Nova GRAPHQL Contract

> GraphQL contract & sync

- Skill: `tomevault-io/lmiguelvargasf-nova-graphql-contract` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/lmiguelvargasf-nova-graphql-contract`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/lmiguelvargasf-nova-graphql-contract/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/lmiguelvargasf-nova-graphql-contract

---


# GraphQL contract & sync

## When to use

- You modify backend GraphQL types/resolvers or the schema.
- You add or edit frontend `.graphql` documents.
- You suspect schema and generated types are out of sync.

## Steps

1. Backend: implement changes under `backend/src/backend/apps/**/graphql/`.
2. Sync: run `task frontend:codegen` from the repo root.
   - This runs `task backend:schema:export` to update
     `frontend/schema/schema.graphql`.
   - Then runs `pnpm codegen` to regenerate TypeScript types.
3. Frontend: update `frontend/src/` to use the newly generated types/fragments.
4. Verify: run `task frontend:check`.

## Constraints and guardrails

- The Strawberry backend is the source of truth; do not manually edit
   `frontend/schema/schema.graphql`.
- Do not hand-write TypeScript interfaces for GraphQL results; use generated
   types in `frontend/src/lib/graphql/`.
- Schema changes and frontend sync should be in the same change set.
- Breaking changes (removing/renaming fields, `Nullable → Non-Null`, adding
   required args) require immediate frontend updates after codegen.
- Avoid N+1 by using SQLAlchemy eager loading (`selectinload`/`joinedload`) and
   moving complex logic into services.

## References

- `backend/src/backend/apps/**/graphql/`
- `frontend/schema/schema.graphql`
- `frontend/src/lib/graphql/`
- `frontend/**/codegen.*`

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/lmiguelvargasf) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-13 -->

