debian-mirror-gitlab/app/assets/javascripts/boards/graphql.js
2022-04-04 11:22:00 +05:30

14 lines
404 B
JavaScript

import { defaultDataIdFromObject } from '@apollo/client/core';
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);
},
},
},
);