UNPKG

517 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var graphql_1 = require("graphql");
4function getFieldDef(parentType, fieldAST) {
5 var name = fieldAST.name.value;
6 if (name === '__typename') {
7 return null;
8 }
9 if (parentType instanceof graphql_1.GraphQLObjectType || parentType instanceof graphql_1.GraphQLInterfaceType) {
10 return parentType.getFields()[name];
11 }
12 return null;
13}
14exports.getFieldDef = getFieldDef;
15//# sourceMappingURL=get-field-def.js.map
\No newline at end of file