OpenParable
Skip to content
← Back to skills

Create Query

Development
create-query

Create 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.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. 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

  1. Search existing queries
  2. Search fragments
  3. Search existing hooks
  4. Reuse existing GraphQL structure
  5. Name new operations with the plugin or module prefix plus purpose, such as operationTaskList or cmsPageList
  6. Keep query near feature module
  7. Reuse Apollo patterns
  8. For mutations or subscriptions, ensure affected visible data updates without a browser refresh through cache updates, refetching, or subscribeToMore
  9. Preserve typings
  10. Run focused validation: pnpm nx lint <plugin> and pnpm 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