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);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|