faststore-data-fetching

Extend the FastStore GraphQL API with typeDefs and server-side resolvers.

39|9|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/vtexdocs/ai-skills --skill faststore-data-fetching
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: faststore-data-fetching
Source: https://github.com/vtexdocs/ai-skills/tree/main/tracks/faststore/skills/faststore-data-fetching
Command: npx skills add https://github.com/vtexdocs/ai-skills --skill faststore-data-fetching

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides teams to extend the FastStore GraphQL API to fetch data from custom sources, implement server-side resolvers, and compose client-facing fragments, enabling richer product data while maintaining a clean, secure architecture.

Core Features & Use Cases

  • GraphQL API extensions with typeDefs and resolvers to expose new fields on StoreProduct.
  • Server-side data fetching and resolvers that call VTEX REST or external services safely.
  • Fragment-driven queries to surface extended data in server and client code.
  • Integrations with third-party data sources while maintaining GraphQL-first access patterns.
  • Clear directory structure guidance (src/graphql/vtex/..., src/graphql/thirdParty/..., src/fragments/).

Quick Start

Provide a minimal API extension by defining a new field on StoreProduct in src/graphql/vtex/typeDefs and implementing a resolver in src/graphql/vtex/resolvers, then include the field in ServerProduct fragments.

Frequently Asked Questions about faststore-data-fetching

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

FAQPage Schema
How do I fetch custom data in FastStore using GraphQL?

FastStore custom data fetching works by defining new fields on StoreProduct through typeDefs and implementing server-side resolvers in src/graphql/vtex, then exposing them via fragments in src/fragments for server and client rendering.

What is the directory structure for FastStore API extensions?

The required directory structure for FastStore API extensions organizes typeDefs and resolvers in src/graphql/vtex or src/graphql/thirdParty, while client-facing query fragments reside in src/fragments to ensure build system discoverability.

How do I securely call external REST APIs from FastStore resolvers?

FastStore secures external REST API calls by using server-side resolvers that enforce GraphQL-first data access, keeping all credential usage strictly server-only to prevent sensitive data from leaking to client-rendered scenarios.

Can I extend StoreProduct with third-party data in FastStore?

Yes, FastStore allows extending StoreProduct with third-party data by creating API extensions with typeDefs and resolvers in src/graphql/thirdParty, then composing fragments to expose the extended data across server and client-rendered scenarios.

Does FastStore data fetching work for both server-side and client-side rendering?

FastStore data fetching works for both server-rendered and client-rendered scenarios by using a fragment-driven query approach that surfaces extended data consistently across environments via the standardized src/fragments directory structure.