Design Management GraphQL Uses Deprecated Field `designs`
Summary
The design management GraphQL integration uses a deprecated field designs
, which should be designCollection
.
{
project(fullPath: $fullPath) {
id
issue(iid: $iid) {
designs {
designs(atVersion: $atVersion) {
Updated...
{
project(fullPath: $fullPath) {
id
issue(iid: $iid) {
designCollection {
designs(atVersion: $atVersion) {
Improvements
As we grow the design management feature, it's likely that there will be more and more queries added that reference the designCollection
in the GraphQL API.
There are two benefits of doing this refactor early:
- No fracturing when queries are added in the future that use the proper field while leaving the deprecated field other places
- No persistence of the deprecated field when others copy queries/mutations without knowing the field is deprecated
Risks
There are very few risks with this refactor.
The only two risks I can think of:
- Missing some updates that aren't tested, and then having a mismatch between
designs
anddesignCollection
- Accidentally updating the nested
designs
since there are twodesigns
and only the first one is deprecated
Involved components
A non-comprehensive list, since I'm not very familiar with this area of the code.
ee/app/assets/javascripts/design_management/graphql/mutations/uploadDesign.mutation.graphql
ee/app/assets/javascripts/design_management/graphql/queries/project.query.graphql
ee/app/assets/javascripts/design_management/mixins/all_versions.js
ee/app/assets/javascripts/design_management/mixins/all_designs.js
ee/app/assets/javascripts/design_management/graphql.js
ee/app/assets/javascripts/design_management/index.js
ee/app/assets/javascripts/design_management/pages/index.vue
Optional: Intended side effects
The intent is that there are no side effects (other than not using a deprecated field in our own API)
Edited by 🤖 GitLab Bot 🤖