vtex-io-service-apps

Build VTEX IO service routes using @vtex/api clients via ctx.clients.

Updated Mar 27, 2026
One-click install
npx skills add https://github.com/exilonX/ap2 --skill vtex-io-service-apps-exilonx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vtex-io-service-apps
Source: https://github.com/exilonX/ap2/tree/main/.agents/skills/vtex-io-service-apps
Command: npx skills add https://github.com/exilonX/ap2 --skill vtex-io-service-apps-exilonx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the reliability and maintainability issues of VTEX IO backend development by standardizing how service apps define routes and how they call VTEX and external APIs.

Core Features & Use Cases

  • Service entry point patterns: Build backend services using the VTEX IO Service class with typed context and configured routes, resolvers, and event handlers.
  • Deterministic, authenticated API access: Use @vtex/api clients (e.g., JanusClient, ExternalClient, MasterDataClient) instead of raw HTTP libraries to ensure auth injection, caching, retries, and metrics.
  • Client lifecycle and architecture: Register clients via an IOClients registry and access them only through ctx.clients in middleware/resolvers to keep code testable and production-ready.

Quick Start

Use vtex-io-service-apps to implement a VTEX IO backend route that fetches and returns data from a VTEX Commerce API using a properly registered JanusClient accessed through ctx.clients.

Frequently Asked Questions about vtex-io-service-apps

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

FAQPage Schema
How do I build secure backend API clients in VTEX IO service apps?

Build secure VTEX IO backend apps by using @vtex/api clients like JanusClient accessed via ctx.clients, which ensures automatic auth injection, caching, retries, and metrics while avoiding raw HTTP libraries for production-ready reliability.

What is the best way to call external APIs from VTEX IO GraphQL resolvers?

Call external APIs from VTEX IO GraphQL resolvers by registering an ExternalClient in the IOClients registry and accessing it through ctx.clients, ensuring proper authentication and standardized retry behavior without direct client instantiation.

Why should I avoid direct client instantiation in VTEX IO backend development?

Avoid direct client instantiation in VTEX IO because bypassing the IOClients registry and ctx.clients prevents the VTEX runtime from injecting authentication, managing lifecycle caching, applying retries, and tracking metrics for your service app.

Does VTEX IO support custom middleware chains for REST route orchestration?

Yes, VTEX IO supports custom middleware chains for REST route orchestration by wiring middleware, handlers, and API clients through the Service entry point class with typed context and configured retry or timeout settings.

Can I use raw HTTP libraries instead of @vtex/api in VTEX runtime?

Using raw HTTP libraries in VTEX runtime is discouraged because it bypasses the deterministic API access provided by @vtex/api clients, missing built-in auth injection, caching, and metrics required for reliable backend service communication.