Loading
Add webPath field to NamespaceType GraphQL type
What does this MR do and why?
Adds the webPath field to the Namespace GraphQL type, exposing the namespace path relative to the instance root.
This allows frontend consumers to retrieve the namespace path directly via GraphQL without constructing it manually from other fields. The field supports the :api, :read_api, and :ai_workflows token scopes, consistent with other path/URL fields on the type.
Files changed:
app/graphql/types/namespace_type.rb— adds theweb_pathfield and resolver methodspec/graphql/types/namespace_type_spec.rb— adds field to expected fields list, verifies:ai_workflowsscope, and adds a unit test for the resolverdoc/api/graphql/reference/_index.md— documents the new field in the GraphQL referencepublic/-/graphql/introspection_result.json— updated introspection snapshotpublic/-/graphql/introspection_result_no_deprecated.json— updated introspection snapshot (no deprecated fields)
References
- Work Item: #609575 (closed)
- Task: #622008 (closed)
- Original MR: !251734 (merged)
Screenshots or screen recordings
| Before | After |
|---|---|
| N/A (GraphQL type change) | N/A (GraphQL type change) |
How to set up and validate locally
- Start a local GDK instance.
- Navigate to the GraphQL explorer at
http://localhost:3000/-/graphql-explorer. - Run the following query:
query { namespace(fullPath: "your-group-or-project") { webPath webUrl } } - Verify
webPathreturns the path relative to the instance root (e.g.,/groups/my-group).
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.