Draft: Add cascading package settings to GraphQL
What does this MR do and why?
Adds GraphQL support for querying and updating the newest namespace package settings for package forwarding:
mavenPackageRequestsForwarding
lockMavenPackageRequestsForwarding
npmPackageRequestsForwarding
lockNpmPackageRequestsForwarding
pypiPackageRequestsForwarding
lockPypiPackageRequestsForwarding
These settings were added in !99274 (merged). They are implemented in the package logic in !99285 (merged). A separate MR will use this GraphQL update to expose these settings in the UI.
Screenshots or screen recordings
How to set up and validate locally
You will need the full path of a group and to be logged in with a user that has Owner access to that group.
In the graphql explorer (http://gdk.test:3000/-/graphql-explorer) query the settings:
query {
namespace(fullPath: "<group_full_path>") {
packageSettings {
mavenPackageRequestsForwarding
lockMavenPackageRequestsForwarding
npmPackageRequestsForwarding
lockNpmPackageRequestsForwarding
pypiPackageRequestsForwarding
lockPypiPackageRequestsForwarding
}
}
}
Update the settings:
mutation updateNamespacePackageSettingsMutation ($namespacePackageSettings: UpdateNamespacePackageSettingsInput!) {
updateNamespacePackageSettings(input:$namespacePackageSettings) {
packageSettings {
mavenPackageRequestsForwarding
lockMavenPackageRequestsForwarding
npmPackageRequestsForwarding
lockNpmPackageRequestsForwarding
pypiPackageRequestsForwarding
lockPypiPackageRequestsForwarding
}
}
}
With these query variables:
{
"namespacePackageSettings": {
"namespacePath": "<group_full_path>",
"mavenPackageRequestsForwarding": false,
"lockMavenPackageRequestsForwarding": true,
"npmPackageRequestsForwarding": false,
"lockNpmPackageRequestsForwarding": true,
"pypiPackageRequestsForwarding": false,
"lockPypiPackageRequestsForwarding": true
}
}
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 #360267 (closed)