Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add explicit typing of recursive variables #366

Merged
merged 1 commit into from
Dec 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/__tests__/starWarsSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const { nodeInterface, nodeField } = nodeDefinitions(
* name: String
* }
*/
const shipType = new GraphQLObjectType({
const shipType: GraphQLObjectType = new GraphQLObjectType({
name: 'Ship',
description: 'A ship in the Star Wars saga',
interfaces: [nodeInterface],
Expand Down Expand Up @@ -171,7 +171,7 @@ const { connectionType: shipConnection } = connectionDefinitions({
* ships: ShipConnection
* }
*/
const factionType = new GraphQLObjectType({
const factionType: GraphQLObjectType = new GraphQLObjectType({
name: 'Faction',
description: 'A faction in the Star Wars saga',
interfaces: [nodeInterface],
Expand Down
6 changes: 3 additions & 3 deletions src/node/__tests__/global-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const { nodeField, nodeInterface } = nodeDefinitions(
},
);

const userType = new GraphQLObjectType({
const userType: GraphQLObjectType = new GraphQLObjectType({
name: 'User',
interfaces: [nodeInterface],
fields: () => ({
Expand All @@ -83,7 +83,7 @@ const userType = new GraphQLObjectType({
}),
});

const photoType = new GraphQLObjectType({
const photoType: GraphQLObjectType = new GraphQLObjectType({
name: 'Photo',
interfaces: [nodeInterface],
fields: () => ({
Expand All @@ -94,7 +94,7 @@ const photoType = new GraphQLObjectType({
}),
});

const postType = new GraphQLObjectType({
const postType: GraphQLObjectType = new GraphQLObjectType({
name: 'Post',
interfaces: [nodeInterface],
fields: () => ({
Expand Down
4 changes: 2 additions & 2 deletions src/node/__tests__/node-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const { nodeField, nodesField, nodeInterface } = nodeDefinitions(
},
);

const userType = new GraphQLObjectType({
const userType: GraphQLObjectType = new GraphQLObjectType({
name: 'User',
interfaces: [nodeInterface],
fields: () => ({
Expand All @@ -70,7 +70,7 @@ const userType = new GraphQLObjectType({
}),
});

const photoType = new GraphQLObjectType({
const photoType: GraphQLObjectType = new GraphQLObjectType({
name: 'Photo',
interfaces: [nodeInterface],
fields: () => ({
Expand Down
2 changes: 1 addition & 1 deletion src/node/__tests__/nodeAsync-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const { nodeField, nodeInterface } = nodeDefinitions(
() => userType,
);

const userType = new GraphQLObjectType({
const userType: GraphQLObjectType = new GraphQLObjectType({
name: 'User',
interfaces: [nodeInterface],
fields: () => ({
Expand Down