MCPcopy
hub / github.com/ardatan/graphql-tools / parse

Function parse

packages/loaders/git/src/parse.ts:11–29  ·  view source on GitHub ↗
({
  path,
  pointer,
  content,
  options,
}: {
  path: string;
  pointer: string;
  content: string;
  options: T;
})

Source from the content-addressed store, hash-verified

9 * @internal
10 */
11export function parse<T extends GraphQLParseOptions>({
12 path,
13 pointer,
14 content,
15 options,
16}: {
17 path: string;
18 pointer: string;
19 content: string;
20 options: T;
21}): Source | void {
22 if (/\.(gql|graphql)s?$/i.test(path)) {
23 return parseGraphQLSDL(pointer, content, options);
24 }
25
26 if (/\.json$/i.test(path)) {
27 return parseGraphQLJSON(pointer, content, options);
28 }
29}

Calls 3

parseGraphQLSDLFunction · 0.90
parseGraphQLJSONFunction · 0.90
testMethod · 0.80

Tested by 15

cleanFunction · 0.40
executeTestQueryFunction · 0.40
completeFunction · 0.40
completeObjectListFunction · 0.40
executeQueryFunction · 0.40
executeQueryFunction · 0.40
executeSyncAndAsyncFunction · 0.40
executeQueryFunction · 0.40
executeQueryFunction · 0.40
createSubscriptionFunction · 0.40
subscribeWithBadFnFunction · 0.40

Used in the wild real call sites across dependent graphs

searching dependent graphs…