We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8179cf commit 80d6bcdCopy full SHA for 80d6bcd
src/nodeFieldConfig.js
@@ -36,8 +36,13 @@ export function getNodeFieldConfig(typeToFindByIdMap: TypeFindByIdMap) {
36
37
// set `returnType` to `info` for proper work of `getProjectionFromAST`
38
// it will correctly add required fields for `relation` to `projection`
39
- info.returnType = graphqlType;
40
- const projection = getProjectionFromAST(info);
+ let projection;
+ if (info) {
41
+ info.returnType = graphqlType;
42
+ projection = getProjectionFromAST(info);
43
+ } else {
44
+ projection = {};
45
+ }
46
47
// suppose that first argument is argument with id field
48
const idArgName = Object.keys(findById.args)[0];
0 commit comments