diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-19 00:09:37 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-19 00:09:37 +0300 |
commit | cace5e8ff1f766b8098e35adc94abc4402aeb2a9 (patch) | |
tree | 96bea3616ee60702be89f4845580f3b3db22f936 /app/assets/javascripts/graphql_shared | |
parent | e4220eeccaf1d53444fdd9102a4061336f91784e (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 | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/app/assets/javascripts/graphql_shared/issuable_client.js b/app/assets/javascripts/graphql_shared/issuable_client.js index 3849bd0289d..3b737dfff33 100644 --- a/app/assets/javascripts/graphql_shared/issuable_client.js +++ b/app/assets/javascripts/graphql_shared/issuable_client.js @@ -4,10 +4,14 @@ 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 { WIDGET_TYPE_MILESTONE } from '~/work_items/constants'; export const temporaryConfig = { typeDefs, cacheConfig: { + possibleTypes: { + LocalWorkItemWidget: ['LocalWorkItemMilestone'], + }, typePolicies: { Project: { fields: { @@ -18,6 +22,28 @@ export const temporaryConfig = { }, WorkItem: { fields: { + mockWidgets: { + read(widgets) { + return ( + widgets || [ + { + __typename: 'LocalWorkItemMilestone', + type: WIDGET_TYPE_MILESTONE, + nodes: [ + { + dueDate: null, + expired: false, + id: 'gid://gitlab/Milestone/30', + title: 'v4.0', + // eslint-disable-next-line @gitlab/require-i18n-strings + __typename: 'Milestone', + }, + ], + }, + ] + ); + }, + }, widgets: { merge(existing = [], incoming) { if (existing.length === 0) { |