Exclude ProjectNamespaces from GraphQL namespace results
What does this MR do and why?
Exclude ProjectNamespace
from GraphQL results for Namespace
.
The GraphQL version of the API MR -> !73296 (merged)
How to set up and validate locally
Sample query:
query {
namespace(fullPath: "group")
{
name
fullPath
}
}
- Log in to your local instance and go to
graphql-explorer
(https://gdk.test:3000/-/graphql-explorer) - Find some project
project
in console that your logged in user can accessproject = Project.last
- Create a project namespace in the console and associate it to
project
. Test the query above with thefull_path
of thatProjectNamespace
- you should getnil
as a response.Namespaces::ProjectNamespace.create(project: project, parent: project.group, visibility_level: project.visibility_level, name: project.name, path: project.path, type: Namespaces::ProjectNamespace.sti_name, owner: nil)
- Find a group
group
the logged in user can access and a user namespace associated with them. Test with thefull_path
of each. You should get a non-nil result for both.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #341823 (closed)
Edited by charlie ablett