vtex-io-graphql
Installation
SKILL.md
GraphQL Schemas & Resolvers
Overview
What this skill covers: Implementing GraphQL APIs in VTEX IO apps using the graphql builder — defining schemas in .graphql files, writing resolver functions in TypeScript, configuring @cacheControl and @auth directives, organizing the graphql/ directory, and wiring resolvers into the Service class.
When to use it: When your VTEX IO app needs to expose a GraphQL API — either for frontend React components to query, for other VTEX IO apps to consume, or for implementing custom data aggregation layers over VTEX Commerce APIs.
What you'll learn:
- How to structure the
graphql/directory with schemas, directives, and types - How to write resolver functions that use
ctx.clientsfor data access - How to use
@cacheControlto optimize performance and@authto enforce authentication - How to instantiate resolvers in the Service entry point
Key Concepts
Essential knowledge before implementation: