(node)
| 102 | ast, |
| 103 | visitWithTypeInfo(typeInfo, { |
| 104 | enter(node) { |
| 105 | if (node.kind === 'FragmentSpread' || node.kind === 'InlineFragment') { |
| 106 | const type = typeInfo.getParentType() |
| 107 | if (type) { |
| 108 | if ( |
| 109 | type.astNode?.kind === 'InterfaceTypeDefinition' || |
| 110 | type.astNode?.kind === 'ObjectTypeDefinition' |
| 111 | ) { |
| 112 | result = !!type.astNode?.fields?.some((field) => |
| 113 | hasAuthDirective(field, directiveName), |
| 114 | ) |
| 115 | } else { |
| 116 | result = hasAuthDirective(type.astNode, directiveName) |
| 117 | } |
| 118 | } |
| 119 | } else if (node.kind === 'Field') { |
| 120 | const field = typeInfo.getFieldDef() |
| 121 | if (field) { |
| 122 | result = hasAuthDirective(field.astNode, directiveName) |
| 123 | } |
| 124 | } |
| 125 | if (result) return BREAK |
| 126 | }, |
| 127 | }), |
| 128 | ) |
| 129 |
nothing calls this directly
no test coverage detected