Welcome to mirror list, hosted at ThFree Co, Russian Federation.

graphql.js « boards « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d066a5d002e9e3c8b801fc5fb387dfec85a9e3c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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);
      },
    },
    batchMax: 2,
  },
);