MCPcopy Create free account
hub / github.com/decaporg/decap-cms / constructor

Method constructor

packages/decap-cms-backend-gitlab/src/API.ts:227–241  ·  view source on GitHub ↗
(config: Config)

Source from the content-addressed store, hash-verified

225 graphQLClient?: ApolloClient<NormalizedCacheObject>;
226
227 constructor(config: Config) {
228 this.apiRoot = config.apiRoot || 'https://gitlab.com/api/v4';
229 this.graphQLAPIRoot = config.graphQLAPIRoot || 'https://gitlab.com/api/graphql';
230 this.token = config.token || false;
231 this.requestFunction = config.requestFunction;
232 this.branch = config.branch || 'master';
233 this.repo = config.repo || '';
234 this.repoURL = `/projects/${encodeURIComponent(this.repo)}`;
235 this.squashMerges = config.squashMerges;
236 this.initialWorkflowStatus = config.initialWorkflowStatus;
237 this.cmsLabelPrefix = config.cmsLabelPrefix;
238 if (config.useGraphQL === true) {
239 this.graphQLClient = this.getApolloClient();
240 }
241 }
242
243 getApolloClient() {
244 const authLink = setContext((_, { headers }) => {

Callers

nothing calls this directly

Calls 1

getApolloClientMethod · 0.95

Tested by

no test coverage detected