Skip to content

Commit 02783f8

Browse files
taionkassens
authored andcommitted
Parametrize GraphQLNodeDefinitions on TContext (#201)
1 parent 88a2c88 commit 02783f8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/node/node.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ import {
2525
unbase64
2626
} from '../utils/base64.js';
2727

28-
type GraphQLNodeDefinitions = {
28+
type GraphQLNodeDefinitions<TContext> = {
2929
nodeInterface: GraphQLInterfaceType,
30-
nodeField: GraphQLFieldConfig<*, *>,
31-
nodesField: GraphQLFieldConfig<*, *>
30+
nodeField: GraphQLFieldConfig<*, TContext>,
31+
nodesField: GraphQLFieldConfig<*, TContext>
3232
};
3333

3434
/**
@@ -44,7 +44,7 @@ type GraphQLNodeDefinitions = {
4444
export function nodeDefinitions<TContext>(
4545
idFetcher: ((id: string, context: TContext, info: GraphQLResolveInfo) => any),
4646
typeResolver?: ?GraphQLTypeResolver<*, TContext>
47-
): GraphQLNodeDefinitions {
47+
): GraphQLNodeDefinitions<TContext> {
4848
const nodeInterface = new GraphQLInterfaceType({
4949
name: 'Node',
5050
description: 'An object with an ID',

0 commit comments

Comments
 (0)