MCPcopy
hub / github.com/graphql/graphiql / setApiToken

Method setApiToken

examples/monaco-graphql-webpack/src/schema.ts:67–70  ·  view source on GitHub ↗
(token: string)

Source from the content-addressed store, hash-verified

65 return this.loadSchema();
66 }
67 async setApiToken(token: string) {
68 this._currentSchema.headers.authorization = `Bearer ${token}`;
69 localStorage.setItem(localStorageKey, token);
70 }
71 logout() {
72 this._currentSchema.headers.authorization = undefined;
73 localStorage.removeItem(localStorageKey);

Callers 1

renderGithubLoginButtonFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected