name: create-query description: Add or reuse erxes frontend GraphQL queries, mutations, fragments, subscriptions, and Apollo hooks. Use for frontend data-fetching changes.
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