| name | vue3-apollo |
| description | Vue 3 and Nuxt 4 Apollo workflow for @vue3-apollo/core and @vue3-apollo/nuxt. Use when implementing, debugging, documenting, or migrating GraphQL features with useQuery, useLazyQuery, useMutation, useSubscription, useFragment, useApolloClient, useAsyncQuery, multi-client setup, SSR hydration, cookie auth, tracking hooks, and TypeScript codegen in consumer applications. |
Vue3 Apollo
Overview
Use this skill to build and maintain guidance for projects that consume @vue3-apollo/core and @vue3-apollo/nuxt.
Primary human-facing docs: https://vue3-apollo.guen.dev/.
Assume all guidance must match the currently installed package version in the consumer project.
Consumer Context
- Assume this library is consumed as installed npm packages in another repository.
- Verify behavior from:
node_modules/@vue3-apollo/core/dist/index.d.ts
node_modules/@vue3-apollo/nuxt/dist/*.d.mts
- package
README.md files
https://vue3-apollo.guen.dev/
- Use public imports only:
@vue3-apollo/core and @vue3-apollo/nuxt.
- Check installed versions in
node_modules/@vue3-apollo/core/package.json and node_modules/@vue3-apollo/nuxt/package.json before giving version-sensitive guidance.
Execution Workflow
- Classify the request:
- Core composables
- Nuxt module/runtime
- TypeScript/codegen
- Migration
- Tracking/loading
- Troubleshooting
- Read only the matching reference file(s) from
references/.
- Confirm behavior against installed package
dist type files, README, and docs.
- Implement changes with current API shape and naming.
- Update docs/examples if behavior or API expectations changed.
- Validate by running relevant checks and report any gaps.
Decision Routing
Read these files based on task type:
references/overview-and-decision-tree.md: start here for mixed or unclear requests.
references/setup-core-vue3.md: Vue 3 core setup and plugin wiring.
references/setup-nuxt4.md: Nuxt module setup and runtime behavior.
references/composables-use-query.md: query lifecycle, SSR prefetch, debounce/throttle.
references/composables-use-lazy-query.md: manual query execution flow and execute() behavior.
references/composables-use-mutation.md: mutation flow, throws modes, callbacks.
references/composables-use-subscription.md: client-only subscription lifecycle.
references/composables-use-fragment.md: fragment cache reading, new and legacy overloads.
references/composables-use-apollo-client.md: imperative client access and multi-client usage.
references/caching.md: cache normalization, policies, mutation cache updates, and Nuxt SSR hydration behavior.
references/tracking-and-loading.md: tracking store and owner-scoped loading helpers.
references/typescript-and-codegen.md: typed documents and codegen workflow.
references/migration-from-vue-apollo-composable.md: migration behavior and compatibility notes.
references/nuxt-custom-integration.md: runtime customization and Nuxt hook integration.
references/troubleshooting.md: error diagnosis and recovery patterns.
references/testing-checklist.md: verification checklist before completion.
Source-First Rules
- Use installed package
dist type declarations and README as source of truth for available public API.
- Preserve current public API names and option contracts used by consumers.
- Keep compatibility where behavior explicitly supports legacy usage.
- Match SSR and client-only boundaries exactly as documented and exposed in public API.
- Avoid introducing React-only Apollo patterns from the separate
apollo-client sample skill.
- Never suggest internal repository import paths in user-facing code snippets.
Current Behavioral Constraints
useApolloClient resolves first registered client when clientId is not provided.
useSubscription initializes only on client; server path is skipped.
useFragment supports both new overload and deprecated legacy overload.
- Nuxt auth is cookie-based in current runtime creation flow.
- Nuxt
useAsyncQuery uses object options and integrates with useAsyncData.
- Nuxt runtime provides
apollo:error hook payload for centralized handling.
useLazyQuery is built on top of useQuery and adds execute() (which follows Apollo cache policy); both composables share the same sticky called flag exposed by useQuery.
- Nuxt module
apollo.autoImports is enabled by default; if disabled, import composables manually.
Implementation Checklist
Apply this checklist for every task:
- Confirm target API and types using installed package
dist type files and README.
- Verify edge behavior (enabled flags, SSR/client mode, error paths).
- Keep naming and option contracts consistent with existing types.
- Ensure docs/examples mirror the real signature and behavior.
- Add or update tests/check steps when behavior changes.
Fallback Strategy
If a planned reference file is missing or incomplete:
- Read the closest page at
https://vue3-apollo.guen.dev/ first.
- Verify against installed package versions,
dist type files, and README.
- Keep changes minimal and strictly aligned to existing public patterns.