File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 11import { GraphQLResolveInfo } from 'graphql' ;
22
3+ import getParentNodeType from './getParentNodeType' ;
34import { Context } from './types/Context' ;
4- // eslint-disable-next-line import/no-cycle
5- import NodeType from './types/NodeType' ;
6- import asType from './utils/asType' ;
75
86export default function getNodeResource (
97 context : Context ,
108 info : GraphQLResolveInfo ,
119) {
12- // eslint-disable-next-line @typescript-eslint/no-use-before-define
13- const parentType = asType ( info . parentType , NodeType ) ;
14- return parentType . getResource ( context ) ;
10+ return getParentNodeType ( info ) . getResource ( context ) ;
1511}
Original file line number Diff line number Diff line change 1+ import { GraphQLResolveInfo } from 'graphql' ;
2+
3+ import NodeType from './types/NodeType' ;
4+ import asType from './utils/asType' ;
5+
6+ export default function getParentNodeType ( info : GraphQLResolveInfo ) {
7+ return asType ( info . parentType , NodeType ) ;
8+ }
You can’t perform that action at this time.
0 commit comments