graphql-codegen-migration
Skill by erxes
Guides migration of an erxes plugin UI to typed GraphQL codegen against the composed schema. It is for developers working in the erxes repo who need to fix codegen or schema:compose errors.
Install graphql-codegen-migration
Built from the published package, never by AI.
git clone --depth 1 https://github.com/erxes/erxes /tmp/erxes && mkdir -p ~/.claude/skills && cp -r /tmp/erxes/.agents/skills/graphql-codegen-migration ~/.claude/skills/graphql-codegen-migrationRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install graphql-codegen-migration in Claude Code
git clone --depth 1 https://github.com/erxes/erxes /tmp/erxes && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/erxes/.agents/skills/graphql-codegen-migration ~/.gemini/antigravity-cli/skills/graphql-codegen-migrationAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install graphql-codegen-migration in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill describes how to move an erxes plugin frontend onto generated GraphQL types. Each backend prints its subgraph SDL offline with the schema:print Nx target, and gateway:schema:compose merges them into a composed schema at backend/gateway/generated/schema.graphql. Frontend codegen checks every document against that schema, so queries for core, operation or content fields type-check.
The skill sets out ordered steps: joining the plugin to codegen, making documents parse, clearing validation errors, converting modules to gql() from ~/gql, and enforcing the rule with ESLint. It uses operation_ui as the reference plugin. It also covers nullability rules and gotchas. It is aimed at erxes contributors who maintain plugin UIs.
Written from the project's SKILL.md and checked against it.
What it can do
- Join plugin to codegenAdds the schema:print target, copies the codegen config and build inputs from operation_ui.
- Fix document parsingRewrites documents that contain ${...} interpolations so they parse statically.
- Clear validation errorsSorts codegen errors into query mistakes in the plugin and drift in backend SDL.
- Convert modules to gql()Moves each module's documents to gql() imports from ~/gql and derives types from generated queries.
- Enforce gql usageAdds ESLint restricted-import and restricted-syntax rules to block direct Apollo document use.
- Apply nullability rulesExplains when a generated output field may be tightened from nullable to non-null.
What you need
- A checkout of the erxes repository
- pnpm
- Nx workspace commands run from the repo root
Try asking
- Migrate my plugin UI's documents to gql() from ~/gql, module by module.
- Help me fix this schema:compose error in my erxes plugin backend.
- Walk me through adding my backend's SDL to the composed schema.
Good to know
- Codegen types the frontend only. Resolvers keep their current typing.
- Backend changes stay inside the plugin's own src. Shared scripts and Dockerfiles are platform work.
- The PageInfo cursor helper workaround should not be copied to other plugins without reporting first.
- Frontend plugins have no package.json, so Nx must be run from the repo root.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/graphql-codegen-migration/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md9 KB -
errors.md5 KB -
fragments.md2 KB -
shared-box.md757 B
Alternatives to graphql-codegen-migration
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
graphql-codegen-migration: common questions
Why does codegen fail with a parse error on a document?
Codegen reads documents statically, so a ${...} interpolation inside a document fails to parse. The skill says to rewrite each one with the patterns in fragments.md.
Why is src/gql/ not showing up in git?
The source says src/gql/ is gitignored and built by Nx. The skill asks for it to be added to the plugin's .gitignore.
Which pinned version does the composition use?
The source says @apollo/composition is pinned to 2.9.3, the federation version the runtime router composes with.
How do I install graphql-codegen-migration?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is graphql-codegen-migration free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is graphql-codegen-migration safe to use?
It scores 84 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to graphql-codegen-migration?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
