debian-mirror-gitlab/app/assets/javascripts/boards/graphql.js

16 lines
421 B
JavaScript
Raw Normal View History

2022-04-04 11:22:00 +05:30
import { defaultDataIdFromObject } from '@apollo/client/core';
2021-11-18 22:05:49 +05:30
import createDefaultClient from '~/lib/graphql';
export const gqlClient = createDefaultClient(
{},
{
cacheConfig: {
dataIdFromObject: (object) => {
// eslint-disable-next-line no-underscore-dangle
return object.__typename === 'BoardList' ? object.iid : defaultDataIdFromObject(object);
},
},
2022-05-07 20:08:51 +05:30
batchMax: 2,
2021-11-18 22:05:49 +05:30
},
);