diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-13 12:37:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-13 12:37:59 +0300 |
commit | 61ca90e0b462bfe69e0b400dfe403bd95281b90f (patch) | |
tree | b3c57a35551c9275f9d6d81e2c12328ac0f394d2 /app/assets/javascripts/graphql_shared | |
parent | ae6730843ac7f8489d52a79b16cd35d75c7a5852 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/graphql_shared')
-rw-r--r-- | app/assets/javascripts/graphql_shared/issuable_client.js | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/app/assets/javascripts/graphql_shared/issuable_client.js b/app/assets/javascripts/graphql_shared/issuable_client.js index e86103c332b..a223c7fa360 100644 --- a/app/assets/javascripts/graphql_shared/issuable_client.js +++ b/app/assets/javascripts/graphql_shared/issuable_client.js @@ -4,15 +4,10 @@ import { concatPagination } from '@apollo/client/utilities'; import getIssueStateQuery from '~/issues/show/queries/get_issue_state.query.graphql'; import createDefaultClient from '~/lib/graphql'; import typeDefs from '~/work_items/graphql/typedefs.graphql'; -import workItemQuery from '~/work_items/graphql/work_item.query.graphql'; -import { WIDGET_TYPE_LABELS } from '~/work_items/constants'; export const temporaryConfig = { typeDefs, cacheConfig: { - possibleTypes: { - LocalWorkItemWidget: ['LocalWorkItemLabels'], - }, typePolicies: { Project: { fields: { @@ -23,20 +18,6 @@ export const temporaryConfig = { }, WorkItem: { fields: { - mockWidgets: { - read(widgets) { - return ( - widgets || [ - { - __typename: 'LocalWorkItemLabels', - type: WIDGET_TYPE_LABELS, - allowScopedLabels: true, - nodes: [], - }, - ] - ); - }, - }, widgets: { merge(_, incoming) { return incoming; @@ -62,27 +43,6 @@ export const resolvers = { }); cache.writeQuery({ query: getIssueStateQuery, data }); }, - localUpdateWorkItem(_, { input }, { cache }) { - const sourceData = cache.readQuery({ - query: workItemQuery, - variables: { id: input.id }, - }); - - const data = produce(sourceData, (draftData) => { - if (input.labels) { - const labelsWidget = draftData.workItem.mockWidgets.find( - (widget) => widget.type === WIDGET_TYPE_LABELS, - ); - labelsWidget.nodes = [...input.labels]; - } - }); - - cache.writeQuery({ - query: workItemQuery, - variables: { id: input.id }, - data, - }); - }, }, }; |