Fix bug in Mutation.ciJobTokenScopeRemoveProject
Why this MR ?
-
To fix a bug in our GQL API for the mutation -
Mutation.ciJobTokenScopeRemoveProject -
We have a bug in our GQL API - wherein a
projectcannot be removed from the Job Token Scope of another project via our GQL API. We get the errorTarget project is not in the job token scopeeven when the project is present in the Job Token Scope of the project. However removing the project via UI click works fine. The error happens only when removing the project via the GQL API -
As per our docs, the now deprecated
directionargument for the GQL mutationciJobTokenScopeRemoveProject-can now only be set to INBOUNDasOutbound job token scope is being removed -
In the frontend code, we are correctly setting the default value of
directionparameter toINBOUND -
However in the application usage via GQL API - This is not the default behaviour. When the
directionparameter is NOT passed to the mutation on the Rails side, it setsOUTBOUNDas the default value here which causes the mentioned error as the project that we are trying to remove is NOT in theOUTBOUNDscope
What does this MR do ?
- This MR fixes the bug by updating the default value of the
directionparameter in the mutation toinboundrather thanoutbound - Update unit tests
References
Screenshots
| Before | After |
|---|---|
![]() |
![]() |
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.

