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

graphql.js « lib « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 64e4e899f44721ac3c140afb40c28b1411d57013 (plain)
1
2
3
4
5
6
7
8
9
10
11
import ApolloClient from 'apollo-boost';
import csrf from '~/lib/utils/csrf';

export default (clientState = {}) =>
  new ApolloClient({
    uri: `${gon.relative_url_root}/api/graphql`,
    headers: {
      [csrf.headerKey]: csrf.token,
    },
    clientState,
  });