graphql-operations

Guide creation of GraphQL queries, mutations, and subscriptions with best practices.

Updated Jan 21, 2026
One-click install
npx skills add https://github.com/HsnSaboor/open-engineer --skill graphql-operations-hsnsaboor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: graphql-operations
Source: https://github.com/HsnSaboor/open-engineer/tree/main/src/skills/bundled/apollo-graphql-operations
Command: npx skills add https://github.com/HsnSaboor/open-engineer --skill graphql-operations-hsnsaboor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers write efficient, maintainable, and type-safe GraphQL operations (queries, mutations, subscriptions) by providing best practices and guidance.

Core Features & Use Cases

  • Operation Structure: Examples for queries, mutations, and subscriptions.
  • Best Practices: Guidance on naming, variable usage, field selection, and fragment colocation.
  • Use Case: When building a new feature that requires fetching user data, use this Skill to ensure your GraphQL query is optimized and follows established patterns.

Quick Start

Use the graphql-operations skill to write a query to fetch a user's name and email by their ID.

Frequently Asked Questions about graphql-operations

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the best practices for writing efficient GraphQL queries and mutations?

Best practices for efficient GraphQL operations include structured naming, using variables for dynamic arguments, and fragment colocation for maintainable and type-safe data fetching.

How do I structure GraphQL operations to ensure type safety on the client side?

Structure GraphQL operations by applying naming conventions, passing variables instead of inline arguments, and colocating fragments alongside component definitions to ensure type safety.

How do I write a GraphQL query to fetch specific user data like name and email by ID?

Write a GraphQL query by defining the operation type, passing the user ID as a variable, and selecting the required name and email fields to optimize data fetching.

Can I use these GraphQL operation guidelines with any GraphQL client?

Yes, these GraphQL operation guidelines support client-side development with any GraphQL client by providing structured examples and principles for optimizing data fetching.

When should I use GraphQL fragment colocation in my operations?

Use GraphQL fragment colocation when building features requiring maintainable operations, ensuring type safety by organizing data fetching requirements directly alongside their consuming components.

Does this guidance cover GraphQL subscriptions as well as queries and mutations?

Yes, this guidance covers the creation of efficient and maintainable GraphQL operations, including examples and best practices for queries, mutations, and subscriptions.