(selections)
| 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)) { |
no outgoing calls
no test coverage detected
searching dependent graphs…