(schema, parentType, fieldNode)
| 7234 | }; |
| 7235 | exports.TypeInfo = TypeInfo; |
| 7236 | function getFieldDef(schema, parentType, fieldNode) { |
| 7237 | const name = fieldNode.name.value; |
| 7238 | if (name === _introspection.SchemaMetaFieldDef.name && schema.getQueryType() === parentType) { |
| 7239 | return _introspection.SchemaMetaFieldDef; |
| 7240 | } |
| 7241 | if (name === _introspection.TypeMetaFieldDef.name && schema.getQueryType() === parentType) { |
| 7242 | return _introspection.TypeMetaFieldDef; |
| 7243 | } |
| 7244 | if (name === _introspection.TypeNameMetaFieldDef.name && (0, _definition.isCompositeType)(parentType)) { |
| 7245 | return _introspection.TypeNameMetaFieldDef; |
| 7246 | } |
| 7247 | if ((0, _definition.isObjectType)(parentType) || (0, _definition.isInterfaceType)(parentType)) { |
| 7248 | return parentType.getFields()[name]; |
| 7249 | } |
| 7250 | } |
| 7251 | function visitWithTypeInfo(typeInfo, visitor) { |
| 7252 | return { |
| 7253 | enter(...args) { |
no test coverage detected