graphql-client

graphql-client is a skill for Claude Code from alivirgo/Major-AI-Skills. It costs 23 tokens per session (776 once invoked), scanned A, original, MIT.

A guide to GraphQL client libraries such as Apollo Client and urql, which send typed requests to GraphQL servers and can cache their results.

In plain words
What is it for?
Use it when connecting a React or Vue application to GraphQL, writing queries and mutations, updating the cache, and handling authentication or retries.
Why use it?
It helps prevent requests for unnecessary fields, stale cached data, missing authentication headers, and mishandled responses that contain both data and errors.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Codex.

Part of the major-ai-skills plugin — 147 skills, 7 plugins shipped together

Good fit Use it when connecting a React or Vue application to GraphQL, writing queries and mutations, updating the cache, and handling authentication or retries.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alivirgo/major-ai-skills/graphql-client
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add alivirgo/Major-AI-Skills --skill graphql-client
Clone the repo
git clone --depth 1 https://github.com/alivirgo/Major-AI-Skills

Made for: Claude Code.

Or install major-ai-skills, the plugin that ships this one along with the rest of its 147 skills, 7 plugins.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for graphql-client

README.md
[![agentmods](https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/graphql-client/github.svg)](https://agentmods.dev/skills/alivirgo/major-ai-skills/graphql-client)
Your own site
<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/graphql-client"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/graphql-client/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for graphql-client

Your own site · 80×15
<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/graphql-client"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/graphql-client.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 776 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00023 $0.00776
Opus 5 $0.00012 $0.00388
Sonnet 5 $0.00005 $0.00155
Haiku 4.5 $0.00002 $0.00078

Measured today against content hash fc5ee2a71c5c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

graphql-client scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/graphql-client/SKILL.md · 93 lines

How it starts

The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GraphQL Client (Apollo / urql) AI Skill Guide

Overview & Engine Architecture

GraphQL clients (Apollo Client, urql) send typed operations to a GraphQL HTTP (or WS) endpoint, normalize/cache results, and integrate with UI frameworks. Agents write precise operations (no accidental over-fetch), configure auth links/exchanges, pick sane cache policies, and handle partial errors (errors + data) explicitly.

UI hooks/components
   -> Apollo Client / urql client
       -> links/exchanges (auth, retry, HTTP, WS)
           -> GraphQL API
Cache (normalized / document) <- results

When to use this skill

  • Wiring React/Vue apps to a GraphQL API
  • Choosing Apollo vs urql trade-offs for a codebase
  • Fixing cache staleness after mutations
  • Adding auth headers and upload/retry behavior

Operational directives

  1. Co-locate operations with features; avoid one mega-queries.ts dumping ground.
  2. Request only fields the UI needs; update when UI changes.
  3. After mutations, update cache (Apollo update/cache.modify or urql cache exchanges) or invalidate deliberately.
  4. Put tokens in headers via links/exchanges - never in query variables logged server-side by mistake.
  5. Decide error policy: many apps must handle GraphQL errors even when HTTP is 200.

Apollo sketch

const client = new ApolloClient({
  link: authLink.concat(httpLink),
  cache: new InMemoryCache(),
  defaultOptions: {
    watchQuery: { fetchPolicy: "cache-and-network", errorPolicy: "all" },
  },
});

urql sketch

const client = createClient({
  url: "/graphql",
  exchanges: [cacheExchange, authExchange, fetchExchange],
  fetchOptions: () => ({
    headers: { Authorization: `Bearer ${getToken()}` },
  }),
});

Cache pitfalls

Pitfall Result Fix
Mutation returns partial object without id Cache cannot merge Return id + changed fields; type policies
no-cache everywhere Slow UI, extra load Use network-only only where required
Ignoring errors array Silent failed mutations Surface GraphQL errors to users/logs
Huge fragments reused blindly Over-fetch Split fragments per view

Read the full file on GitHub · 93 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · -7 tokens per session fc5ee2a71c5c
  2. 6d ago First seen · 93 lines · 30 tokens per session scan A 4c2035844ed4

Subscribe to this mod's changes

graphql-client is a skill published in the GitHub repository alivirgo/Major-AI-Skills (1 stars, last pushed today), licensed MIT. It adds 23 tokens to every session and 776 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other skills, from other repositories

algolia-search-v2

Algolia Search Integration workflow skill. Use this skill when the user needs Expert patterns for Algolia search implementation, indexing and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing off.

diegosouzapw/awesome-omni-skills · 50 tokens

algolia-search-v3

Algolia Search Integration workflow skill. Use this skill when the user needs Expert patterns for Algolia search implementation, indexing and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing off.

diegosouzapw/awesome-omni-skills · 50 tokens

algolia-search-v4

Algolia Search Integration workflow skill. Use this skill when the user needs Expert patterns for Algolia search implementation, indexing and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing off.

diegosouzapw/awesome-omni-skills · 50 tokens

apollo-client

Guide for building React applications with Apollo Client 4.x. Use this skill when: (1) setting up Apollo Client in a React project, (2) writing GraphQL queries or mutations with hooks, (3) configuring caching or cache policies, (4) managing local state with reactive variables, (5) troubleshooting Apollo Client errors…

apollographql/skills · 74 tokens

algolia-search

Algolia Search Integration workflow skill. Use this skill when the user needs Expert patterns for Algolia search implementation, indexing and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing off.

diegosouzapw/awesome-omni-skills · 48 tokens

astro

Build content-focused websites with Astro — zero JS by default, islands architecture, multi-framework components, and Markdown/MDX support.

sickn33/agentic-awesome-skills · 28 tokens