Conversation
There was a problem hiding this comment.
Pull request overview
Adds first-class support for nested (namespaced) GraphQL operations so that namespace container fields become folders/sections and only leaf operations generate pages, while keeping qualified operation names for relations/links and avoiding generating object pages for namespace container types.
Changes:
- Flatten nested operation fields into dotted operation keys during schema introspection and exclude namespace container object types from
objects. - Update rendering/link generation to place namespaced operations under nested operation folders while preserving qualified names in relations/links.
- Extend docs and test coverage (unit + integration) for namespaced operations, grouping, and link/path behavior.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/types/src/graphql.d.ts | Adds OperationKind type used by namespace discovery logic. |
| packages/printer-legacy/src/link.ts | Builds operation links with nested namespace path segments and leaf slugs. |
| packages/printer-legacy/tests/unit/link.test.ts | Adds unit test asserting nested operation link URLs. |
| packages/graphql/src/introspection.ts | Implements recursive collection of nested operation fields and filters namespace container object types from schema map. |
| packages/graphql/src/relation.ts | Preserves qualified (dotted) operation names in relation outputs. |
| packages/graphql/tests/unit/introspection.test.ts | Adds tests for dotted nested operation keys, cycle prevention, and object filtering. |
| packages/graphql/tests/unit/relation.test.ts | Adds tests asserting qualified names for operation/field relations. |
| packages/docusaurus/tests/data/schema_with_grouping.graphql | Updates fixture schema to include an AnalyticsQuery namespace example. |
| packages/core/src/renderer.ts | Renders dotted operation keys into nested folders; hardens category folder formatting behavior. |
| packages/core/tests/unit/renderer.test.ts | Adds tests for categorySort formatting consistency and nested namespace rendering paths. |
| packages/core/tests/integration/generator.spec.ts | Adds integration test ensuring nested namespace leaf pages are generated (and no namespace container page). |
| packages/core/tests/data/schema_nested_query_namespace.graphql | New fixture schema for nested query namespace behavior. |
| docs/settings.md | Documents namespaced operation behavior under hierarchy settings (with a link). |
| docs/intro.md | Mentions support for namespaced operations in the project intro. |
| docs/advanced/namespaced-operations.md | New advanced documentation page describing namespaced operations behavior. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Grégory Heitz <324670+edno@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Grégory Heitz <324670+edno@users.noreply.github.com>
|
❌ The last analysis has failed. |
|
|
|
|
|
|
|
|
|



Description
This PR implements nested operation namespace support for issue #2717.
Summary of changes:
AnalyticsQuery) are excluded from generated object entity pagesValidation performed:
bun run test -- packages/graphql/tests/unit/introspection.test.ts packages/core/tests/integration/generator.spec.tsbun run test -- packages/graphql/tests/unit/relation.test.ts packages/printer-legacy/tests/unit/link.test.ts packages/core/tests/unit/renderer.test.tsbun run lintbun build:allearthly +build-docsCloses #2717
Checklist