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

Method getSchema

examples/monaco-graphql-webpack/src/schema.ts:57–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55 return this._currentSchema.headers.authorization;
56 }
57 async getSchema() {
58 const cacheItem = this._schemaCache.get(this._currentSchema.value);
59 if (cacheItem) {
60 return {
61 ...cacheItem,
62 documentString: this.getOverride() || cacheItem.documentString,
63 };
64 }
65 return this.loadSchema();
66 }
67 async setApiToken(token: string) {
68 this._currentSchema.headers.authorization = `Bearer ${token}`;
69 localStorage.setItem(localStorageKey, token);

Callers 13

changeSchemaMethod · 0.95
overrideSchemaMethod · 0.95
GraphQLCacheClass · 0.80
getDiagnosticsMethod · 0.80
getHoverInformationMethod · 0.80
getDefinitionMethod · 0.80
cacheConfigSchemaFileMethod · 0.80

Calls 3

getOverrideMethod · 0.95
loadSchemaMethod · 0.95
getMethod · 0.45

Tested by 1

getSchemaFunction · 0.64