1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var graphql_1 = require("graphql");
|
4 | function 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 | }
|
14 | exports.getFieldDef = getFieldDef;
|
15 | //# sourceMappingURL=get-field-def.js.map |
\ | No newline at end of file |