# Capability Spec Delta: api-graphql-ui-graphiql (api-graphql-ui-graphiql) **Package**: `@suaveplan/api-graphql-ui-graphiql` **Status**: PROPOSED > Every requirement carries a `**Verified by:**` line. ## ADDED Requirements ### Requirement: Mounts GraphiQL at the configured UI endpoint The package SHALL expose `createGraphiqlUi(opts)` returning a `RouterPlugin` that registers `GET ` (default `/graphql/ui`) on the host's `api-router`. The response MUST be the GraphiQL HTML shell embedding the configured `graphqlEndpoint` and `subscriptionEndpoint`. #### Scenario: default mount serves GraphiQL at /graphql/ui - **WHEN** the plugin is mounted with default `opts` - **THEN** `GET /graphql/ui` returns 200 AND the body contains the GraphiQL shell AND the embedded `graphqlEndpoint` reads `/graphql` #### Scenario: configured endpoints flow into the shell - **WHEN** `createGraphiqlUi({ graphqlEndpoint: "/api/gql", subscriptionEndpoint: "/api/gql/ws" })` - **THEN** the rendered HTML embeds those endpoints (NOT the defaults) **Verified by:** `src/factory/create-graphiql-ui.test.ts::"default mount returns GraphiQL HTML at /graphql/ui"` AND `src/factory/create-graphiql-ui.spec-conformance.test.ts::"configured endpoints flow into the embedded shell"` --- ### Requirement: Bundled assets only — no CDN fetches Every static asset referenced by the GraphiQL HTML shell SHALL be served from this package's own `dist/assets/`. No `