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

Function hashFromTabContents

packages/graphiql-react/src/editor/tabs.ts:346–352  ·  view source on GitHub ↗
(args: {
  query: string | null;
  variables?: string | null;
  headers?: string | null;
})

Source from the content-addressed store, hash-verified

344}
345
346function hashFromTabContents(args: {
347 query: string | null;
348 variables?: string | null;
349 headers?: string | null;
350}): string {
351 return [args.query ?? '', args.variables ?? '', args.headers ?? ''].join('|');
352}
353
354export function fuzzyExtractOperationName(str: string): string | null {
355 const regex = /^(?!#).*(query|subscription|mutation)\s+([a-zA-Z0-9_]+)/m;

Callers 3

getDefaultTabStateFunction · 0.85
createTabFunction · 0.85
setPropertiesInActiveTabFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected