MCPcopy Create free account
hub / github.com/parse-community/parse-server / checkSelections

Function checkSelections

src/GraphQL/ParseGraphQLServer.js:18–32  ·  view source on GitHub ↗
(selections)

Source from the content-addressed store, hash-verified

16 try {
17 const ast = parse(query);
18 const checkSelections = (selections) => {
19 for (const selection of selections) {
20 if (selection.kind === 'Field' && selection.name.value === '__type') {
21 if (selection.arguments && selection.arguments.length > 0) {
22 return true;
23 }
24 }
25 if (selection.selectionSet) {
26 if (checkSelections(selection.selectionSet.selections)) {
27 return true;
28 }
29 }
30 }
31 return false;
32 };
33 for (const definition of ast.definitions) {
34 if (definition.selectionSet) {
35 if (checkSelections(definition.selectionSet.selections)) {

Callers 1

hasTypeIntrospectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…