Skip to content

Commit b5d547d

Browse files
Add explicit typing of recursive variables (#366)
1 parent 712fad6 commit b5d547d

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/__tests__/starWarsSchema.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ const { nodeInterface, nodeField } = nodeDefinitions(
128128
* name: String
129129
* }
130130
*/
131-
const shipType = new GraphQLObjectType({
131+
const shipType: GraphQLObjectType = new GraphQLObjectType({
132132
name: 'Ship',
133133
description: 'A ship in the Star Wars saga',
134134
interfaces: [nodeInterface],
@@ -171,7 +171,7 @@ const { connectionType: shipConnection } = connectionDefinitions({
171171
* ships: ShipConnection
172172
* }
173173
*/
174-
const factionType = new GraphQLObjectType({
174+
const factionType: GraphQLObjectType = new GraphQLObjectType({
175175
name: 'Faction',
176176
description: 'A faction in the Star Wars saga',
177177
interfaces: [nodeInterface],

src/node/__tests__/global-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const { nodeField, nodeInterface } = nodeDefinitions(
7272
},
7373
);
7474

75-
const userType = new GraphQLObjectType({
75+
const userType: GraphQLObjectType = new GraphQLObjectType({
7676
name: 'User',
7777
interfaces: [nodeInterface],
7878
fields: () => ({
@@ -83,7 +83,7 @@ const userType = new GraphQLObjectType({
8383
}),
8484
});
8585

86-
const photoType = new GraphQLObjectType({
86+
const photoType: GraphQLObjectType = new GraphQLObjectType({
8787
name: 'Photo',
8888
interfaces: [nodeInterface],
8989
fields: () => ({
@@ -94,7 +94,7 @@ const photoType = new GraphQLObjectType({
9494
}),
9595
});
9696

97-
const postType = new GraphQLObjectType({
97+
const postType: GraphQLObjectType = new GraphQLObjectType({
9898
name: 'Post',
9999
interfaces: [nodeInterface],
100100
fields: () => ({

src/node/__tests__/node-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const { nodeField, nodesField, nodeInterface } = nodeDefinitions(
5757
},
5858
);
5959

60-
const userType = new GraphQLObjectType({
60+
const userType: GraphQLObjectType = new GraphQLObjectType({
6161
name: 'User',
6262
interfaces: [nodeInterface],
6363
fields: () => ({
@@ -70,7 +70,7 @@ const userType = new GraphQLObjectType({
7070
}),
7171
});
7272

73-
const photoType = new GraphQLObjectType({
73+
const photoType: GraphQLObjectType = new GraphQLObjectType({
7474
name: 'Photo',
7575
interfaces: [nodeInterface],
7676
fields: () => ({

src/node/__tests__/nodeAsync-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const { nodeField, nodeInterface } = nodeDefinitions(
2828
() => userType,
2929
);
3030

31-
const userType = new GraphQLObjectType({
31+
const userType: GraphQLObjectType = new GraphQLObjectType({
3232
name: 'User',
3333
interfaces: [nodeInterface],
3434
fields: () => ({

0 commit comments

Comments
 (0)