MCPcopy Create free account
hub / github.com/dailydotdev/apps / getOperationName

Function getOperationName

packages/shared/src/graphql/batch.ts:92–93  ·  view source on GitHub ↗
(document: string)

Source from the content-addressed store, hash-verified

90const operationNamePattern = /(?:query|mutation|subscription)\s+(\w+)/;
91
92const getOperationName = (document: string): string | undefined =>
93 document.match(operationNamePattern)?.[1];
94
95const toClientError = (
96 item: BatchItem,

Callers 1

flushFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected