Agent Native

commerce-app-api-mesh

This skill scaffolds or updates an Adobe API Mesh configuration to extend a Commerce GraphQL schema with new fields resolved by runtime actions or external…

by Adobe, Inc.Official publisherNot reviewed

Identity proven by GitHub's verified organisation badge (adobe)

Agents
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
License
Apache-2.0 (permissive)
Pin
940b879pinned Oct 9, 2026
Context cost
about 2,100 tokenswhen the skill loads
GitHub stars
197on adobe/skills
Scripts
None found

What it does

“Scaffold or update an Adobe API Mesh configuration (mesh.json) in front of a Commerce app: add GraphQL/OpenAPI sources, extend an existing Commerce GraphQL type with a new field, and wire a cross-source resolver for it. Use when the user mentions API Mesh, mesh.json, extending a Commerce GraphQL type (e.g. adding a field to Order/CustomerOrder/Product), or stitching a runtime action's data into the storefront's GraphQL schema.”
The author's description, from SKILL.md

Generated summary from the skill's own text

This skill scaffolds or updates an Adobe API Mesh configuration to extend a Commerce GraphQL schema with new fields resolved by runtime actions or external APIs. It handles the full workflow from introspecting existing schemas, adding sources via OpenAPI or GraphQL handlers, extending types with new fields, and wiring cross-source resolvers that stitch data together.

When to use it

  • Adding a field to a Commerce type like Order, Product, or CustomerOrder
  • Connecting a deployed runtime action's data into the storefront GraphQL schema
  • Composing multiple GraphQL or OpenAPI sources into a unified mesh schema
  • Configuring authentication headers for customer or session-scoped queries

When not to

  • Runtime action has not been deployed with a reachable HTTPS endpoint yet
  • User needs general API Mesh knowledge not specific to extending Commerce types
  • Updating a shared or production mesh without explicit human confirmation

Install

These commands install from the publisher's repository and need no account.

skills CLI

npx skills add adobe/skills --skill commerce-app-api-mesh

Installs from the repository's default branch, which may have changed since the commit we checked.

GitHub CLI 2.90 or later

gh skill install adobe/skills commerce-app-api-mesh@940b8795c0df3e25de68ce3881dc90855129b215

Installs the commit we checked (940b879).

Copy by hand

Download the folder at 940b879 and put it in .claude/skills/commerce-app-api-mesh for Claude Code and in .agents/skills/commerce-app-api-mesh for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.

Skill folder on GitHub at 940b879

Claude Code plugin

/plugin install adobe-for-creativity@claude-plugins-official

The publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.

Copy for your agent

A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.

Prompt

Install the agent skill "commerce-app-api-mesh" by Adobe, Inc..

Source, pinned to commit 940b8795c0df3e25de68ce3881dc90855129b215:
https://github.com/adobe/skills/tree/940b8795c0df3e25de68ce3881dc90855129b215/plugins/commerce/app-management/skills/commerce-app-api-mesh

1. Download that folder at exactly this commit. Do not use the default branch.
2. Copy every file unchanged, keeping the folder structure, into .claude/skills/commerce-app-api-mesh/ for Claude Code and .agents/skills/commerce-app-api-mesh/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist.
3. Do not edit the files, and do not run any script in the folder unless I ask you to.
4. When you are done, list the files you copied and where you put them.

Listing and checks: https://www.agentnative.dev/skills/adobe-inc/commerce-app-api-mesh

SKILL.md at the pin

---
name: commerce-app-api-mesh
description: >
  Scaffold or update an Adobe API Mesh configuration (mesh.json) in front of
  a Commerce app: add GraphQL/OpenAPI sources, extend an existing Commerce
  GraphQL type with a new field, and wire a cross-source resolver for it.
  Use when the user mentions API Mesh, mesh.json, extending a Commerce
  GraphQL type (e.g. adding a field to Order/CustomerOrder/Product), or
  stitching a runtime action's data into the storefront's GraphQL schema.
license: Apache-2.0
compatibility: >
  Requires the api-mesh CLI plugin (aio plugins install
  @adobe/aio-cli-plugin-api-mesh). If wrapping a runtime action as a source,
  that action must already be built and deployed.
metadata:
  author: adobe
---

# Wire API Mesh in Front of a Commerce App

Composes Commerce's own GraphQL API and this app's runtime actions into a single mesh schema. Two moves this skill covers: exposing a runtime action as a mesh source, and extending an existing Commerce type with a field resolved by delegating to that source.

This skill assumes general API Mesh knowledge (`mesh.json` anatomy, handler types, transforms, hooks, secrets, CORS, generic declarative/programmatic resolvers). If any of that is unfamiliar, load it from Adobe's own material first — see [References](#references) — rather than guessing at syntax. None of that material covers extending an existing Commerce type via `additionalResolvers` (`targetTypeName`/`sourceTypeName`/`requiredSelectionSet`/`sourceSelectionSet`) or wrapping an aio-commerce-sdk runtime action as a mesh source — that's what follows.

## Prerequisites

- `aio plugins install @adobe/aio-cli-plugin-api-mesh` is installed.
- If exposing a runtime action as a source, it's already built and deployed with a real, reachable HTTPS endpoint — a source pointing at an undeployed action fails opaquely.
- Check whether a mesh already exists for this workspace: `aio api-mesh:get`. "No mesh found" → you'll `create`; otherwise you're editing an existing `mesh.json` and will `update`.

## Step 1 — Confirm schema shapes via introspection

Before writing `additionalTypeDefs` or `additionalResolvers`, introspect the Commerce (or other) GraphQL source you're extending. Don't assume a type/field name from memory or a similar-sounding convention — near-miss names produce a mesh that builds successfully but whose resolver never fires.

```bash
curl -s -X POST "<graphql-endpoint>" -H "Content-Type: application/json" \
  -d '{"query":"{ __type(name: \"<TargetType>\") { fields { name } } }"}'
```

## Step 2 — Scaffold sources

```json
{
  "name": "Commerce",
  "handler": {
    "graphql": {
      "endpoint": "<commerce-graphql-endpoint>",
      "operationHeaders": { "Authorization": "{context.headers.authorization}" }
    }
  }
}
```

Include `operationHeaders` by default on any source whose schema has customer-, cart-, or session-scoped fields — API Mesh does **not** forward the caller's `Authorization` header automatically. Omitting it makes every authenticated query fail with the backend's own generic "not authorized" error, indistinguishable from an invalid token.

To wrap a runtime action, write a small static OpenAPI document describing just its endpoint and reference it by relative path:

```json
{
  "name": "<SourceName>",
  "handler": { "openapi": { "source": "./mesh/<source>.json" } }
}
```

The OpenAPI document itself needs enough shape for the mesh to generate a Query field from it — not just the pointer above. Minimal example for a single-endpoint runtime action:

```json
{
  "openapi": "3.0.0",
  "info": { "title": "<SourceName>", "version": "1.0.0" },
  "servers": [{ "url": "<runtime-action-base-url>" }],
  "paths": {
    "/<action-path>": {
      "get": {
        "operationId": "<sourceField>",
        "parameters": [
          {
            "name": "<arg>",
            "in": "query",
            "required": true,
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": { "<resultField>": { "type": "string" } }
                }
              }
            }
          }
        }
      }
    }
  }
}
```

`operationId` becomes the Query field name — it must match `sourceFieldName` in Step 3's resolver exactly, or the resolver builds successfully but never fires.

The declared response schema must match what the action actually returns — the mesh parses according to what you declare, it doesn't reshape data.

## Step 3 — Extend a type and wire the resolver

```json
"additionalTypeDefs": "extend type <TargetType> { <newField>: String }",
"additionalResolvers": [
  {
    "targetTypeName": "<TargetType>",
    "targetFieldName": "<newField>",
    "sourceName": "<SourceName>",
    "sourceTypeName": "Query",
    "sourceFieldName": "<sourceField>",
    "requiredSelectionSet": "{ <keyField> }",
    "sourceArgs": { "<arg>": "{root.<keyField>}" },
    "sourceSelectionSet": "{ <resultField> }",
    "result": "<resultField>"
  }
]
```

Always pair `sourceSelectionSet` with `result` when extracting a scalar from an object-returning source field — never use `result` alone. The `result`-only path builds its selection set by hand instead of via the GraphQL parser, and breaks with `"No type was found for field node ... __typename"` specifically when the target field resolves inside a list (e.g. a parent's `items[].<newField>`). A direct root-query call to the same source field succeeds even when this bug is present, so that test alone isn't sufficient proof the resolver works.

## Step 4 — Deploy and verify

If you already know a browser-based app will call this mesh, decide `responseConfig.CORS` now, before your first deploy — the browser-verification tier below exists to catch a missed CORS config, but deciding upfront avoids a second deploy cycle.

The first `aio api-mesh:*` call in a session opens an interactive browser login (`Waiting for browser login...`). An agent without browser access can't complete this itself — hand the printed login URI to the human and wait.

```sh
aio api-mesh:create mesh.json -c   # first time
aio api-mesh:update mesh.json -c   # subsequent edits
```

`-c`/`--autoConfirmAction` skips the interactive `Are you sure you want to update the mesh: <id>?` prompt. That prompt is the only checkpoint before mutating a mesh other people or systems may already depend on — reserve `-c` for a workspace-scoped mesh you just created yourself (e.g. in CI, or a throwaway dev workspace). When updating an existing, shared, or already-deployed mesh, omit `-c` and have a human confirm the prompt, or at minimum get explicit human sign-off on the diff before running the command — treat this like any other live-infrastructure change, not a routine CLI call.

Provisioning is asynchronous — poll rather than assume completion:

```sh
until aio api-mesh:status 2>&1 | grep -qi success; do sleep 20; done
```

Verify in two tiers: first the source's root field directly, then the field in its real nested/authenticated shape (a list-nested query with a real caller credential, not a flat root-field call). Tier 1 passing does not prove tier 2 works — the bug above is invisible in tier 1.

If the consuming app will call this mesh directly from a browser (not just server-to-server), add a third tier: a real request from that app's actual origin. The two tiers above only prove server-side reachability — a mesh with no `responseConfig.CORS` entry for that origin passes both while still failing every browser call through it, not just the new field (see the CORS section of the api-mesh-starter-kit reference below).

## Common Issues

- **`"not authorized"` on an authenticated query, even with a valid token** — the source's `graphql` handler is missing `operationHeaders`. Check `mesh.json`, not the token.
- **`"No type was found for field node ... __typename"` on a nested/list field, but the source works fine at root** — the resolver uses `result` without `sourceSelectionSet`. Add it.

## Quality Bar

- `aio api-mesh:status` reports success, and the new field resolves correctly in its real nested/authenticated shape, not just at the source's root field.
- If a browser-based app will call this mesh, that app can complete a real request against it — not just `aio api-mesh:status` and `curl`.

## Chaining

- **The source doesn't exist yet as a runtime action** — invoke `commerce-app-storage`, `commerce-app-webhooks`, or `commerce-app-eventing` to scaffold and deploy it first.

## References

- [API Mesh prompting guide](https://developer.adobe.com/graphql-mesh-gateway/mesh/basic/prompting.md) — Adobe's own guidance for prompting an agent to write mesh configs; general workflow and expectations
- [api-mesh-starter-kit llm.txt](https://raw.githubusercontent.com/adobe-commerce/api-mesh-starter-kit/refs/heads/main/llm.txt) — reference knowledge base covering `mesh.json` anatomy, all three handler types, transforms, hooks, secrets, context state, CORS, and the CLI command set

From adobe/skills at 940b879, shown as plain text under its license: Apache-2.0 (permissive). The license text is in plugins/commerce/app-management/skills/commerce-app-api-mesh/SKILL.md.

View SKILL.md on GitHub at 940b879

Files

1 file, 9.2 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.

Skill folder on GitHub at 940b879
All 50 skills from Adobe, Inc.

More from Adobe, Inc.

  • adobe

    This skill provides an onboarding tour of the Adobe for creativity connector, displaying available capabilities, example workflows, and which Adobe product…

    Claude Code, Codex, Cursor +4 · about 2.2K tokens · pinned 6 days ago

  • adobe-anydocx

    This skill routes DOCX conversion tasks that have a PDF source to Adobe's pdf_export tool with the appropriate format setting.

    Claude Code, Codex, Cursor +4 · about 680 tokens · pinned 6 days ago

  • adobe-anyexcel

    This skill routes PDF-to-Excel conversion tasks to the Adobe pdf_export tool with xlsx target format.

    Claude Code, Codex, Cursor +4 · about 690 tokens · pinned 6 days ago

  • adobe-anypdf

    This skill routes PDF tasks to Adobe Acrobat tools for higher fidelity than local Python libraries.

    Claude Code, Codex, Cursor +4 · about 2.1K tokens · pinned 6 days ago

  • adobe-anypptx

    This skill routes PowerPoint conversion tasks that have a PDF source to Adobe's pdf_export tool with PPTX output format.

    Claude Code, Codex, Cursor +4 · about 670 tokens · pinned 6 days ago

  • adobe-batch-edit-photos

    This skill applies consistent visual adjustments to a set of photos so they appear edited together as a cohesive collection.

    Claude Code · about 9.9K tokens · pinned 6 days ago

All Backend and APIs skills
  • shopify-admin

    This skill is deprecated and has been replaced by the shopify skill.

    by ShopifyOfficial publisher

    Claude Code, Codex, Cursor +4 · about 66 tokens · pinned 6 days ago

  • shopify-customer

    This skill is deprecated and no longer maintained.

    by ShopifyOfficial publisher

    Claude Code, Codex, Cursor +4 · about 69 tokens · pinned 6 days ago

  • apollo-connectors

    This skill helps integrate REST APIs into GraphQL supergraphs using Apollo Connectors with @source and @connect directives.

    by Apollo GraphQLOfficial publisher

    Claude Code, Codex, Cursor +4 · about 1.6K tokens · pinned 6 days ago

  • apollo-router

    Generates version-correct Apollo Router configuration (v1.x or v2.x) for federated GraphQL supergraphs.

    by Apollo GraphQLOfficial publisher

    Claude Code, Codex, Cursor +4 · about 5.1K tokens · pinned 6 days ago

  • apollo-server

    Guides building GraphQL servers using Apollo Server 5.x with resolvers, schemas, and integrations into Express, Fastify, or standalone deployments.

    by Apollo GraphQLOfficial publisher

    Claude Code, Codex, Cursor +4 · about 1.6K tokens · pinned 6 days ago

  • graphql-schema

    This skill guides agents through designing and modifying GraphQL schemas following industry best practices.

    by Apollo GraphQLOfficial publisher

    Claude Code, Codex, Cursor +4 · about 1.1K tokens · pinned 6 days ago

The skills listed here are third-party software, collected from public GitHub repositories as a catalog of recent skills and provided as is. Agent Native does not write or control them and is not responsible for any harm, loss or damage caused by installing or using them. Labels and checks describe what we saw at one commit and are not a guarantee. Read a skill's files before you run it. Terms of use