Create Query
Developmentcreate-queryCreate Query is an Agent Skill for development published in the erxes/erxes repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Add or reuse erxes frontend GraphQL queries, mutations, fragments, subscriptions, and Apollo hooks. Use for frontend data-fetching changes.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/erxes/erxes/blob/HEAD/.agents/skills/create-query/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/create-query, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Skill: Create GraphQL Query
Workflow
- Search existing queries
- Search fragments
- Search existing hooks
- Reuse existing GraphQL structure
- Name new operations with the plugin or module prefix plus purpose, such as
operationTaskListorcmsPageList - Keep query near feature module
- Reuse Apollo patterns
- For mutations or subscriptions, ensure affected visible data updates without
a browser refresh through cache updates, refetching, or
subscribeToMore - Preserve typings
- Run focused validation:
pnpm nx lint <plugin>andpnpm nx build <plugin>
Important
- Avoid duplicate queries
- Keep operation names unique
- Reuse fragments/hooks first
- Do not leave stale lists, counters, details, or selectors after a mutation
- Preserve current API contracts
- Do not change backend GraphQL contracts from frontend work unless explicitly requested