Skip to content
代码片段 群组 项目
提交 5c9f9614 编辑于 作者: Catherine Pope's avatar Catherine Pope
浏览文件

Merge branch 'doc-graphql-project-settings-update-example' into 'master'

Add CI_JOB_TOKEN scope workaround as GraphQL mutation example

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/116254



Merged-by: default avatarCatherine Pope <cpope@gitlab.com>
Approved-by: default avatarCatherine Pope <cpope@gitlab.com>
Co-authored-by: default avatarKatrin Leinweber <kleinweber@gitlab.com>
No related branches found
No related tags found
无相关合并请求
...@@ -286,6 +286,24 @@ We've asked for the note details, but it doesn't exist anymore, so we get `null` ...@@ -286,6 +286,24 @@ We've asked for the note details, but it doesn't exist anymore, so we get `null`
More about mutations: More about mutations:
[GraphQL Documentation](https://graphql.org/learn/queries/#mutations). [GraphQL Documentation](https://graphql.org/learn/queries/#mutations).
### Update project settings
You can update multiple project settings in a single GraphQL mutation.
This example is a workaround for [the major change](../../update/deprecations.md#default-cicd-job-token-ci_job_token-scope-changed)
in `CI_JOB_TOKEN` scoping behavior.
```graphql
mutation DisableCI_JOB_TOKENscope {
projectCiCdSettingsUpdate(input:{fullPath: "<namespace>/<project-name>", inboundJobTokenScopeEnabled: false, jobTokenScopeEnabled: false}) {
ciCdSettings {
inboundJobTokenScopeEnabled
jobTokenScopeEnabled
}
errors
}
}
```
### Introspective queries ### Introspective queries
Clients can query the GraphQL endpoint for information about its own schema. Clients can query the GraphQL endpoint for information about its own schema.
......
...@@ -238,6 +238,8 @@ CI job token failures are usually shown as responses like `404 Not Found` or sim ...@@ -238,6 +238,8 @@ CI job token failures are usually shown as responses like `404 Not Found` or sim
While troubleshooting CI/CD job token authentication issues, be aware that: While troubleshooting CI/CD job token authentication issues, be aware that:
- A [GraphQL example mutation](../../api/graphql/getting_started.md#update-project-settings)
is available to toggle the inbound outbound scope settings per project.
- When the [CI/CD job token scopes](#configure-cicd-job-token-access) are enabled, - When the [CI/CD job token scopes](#configure-cicd-job-token-access) are enabled,
and the job token is being used to access a different project: and the job token is being used to access a different project:
- The user that executes the job must be a member of the project that is being accessed. - The user that executes the job must be a member of the project that is being accessed.
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册