Closed excitement-engineer closed 3 years ago
In my code I have created a connection as follows:
const { connectionType: JokeItemConnection } = connectionDefinitions({ nodeType: new GraphQLNonNull(GraphQLJoke) }); export default new GraphQLObjectType({ name: "User", description: "Represents a user of the joke API.", fields: () => ({ //... other fields have been omitted jokes: { type: new GraphQLNonNull(JokeItemConnection), description: "All the user's jokes.", args: connectionArgs, resolve: (user: User, args, { viewer, loaders }: Context) => connectionFromPromisedArray( user.jokes(loaders.joke), args ) } }) });
Next, when I look in graphiql I see that the name of the connection is undefinedConnection:
undefinedConnection
When I now change the connection definition as follows:
const { connectionType: JokeItemConnection } = connectionDefinitions({ nodeType: GraphQLJoke });
Then the name of the connection is correct!
Is this a bug?
@excitement-engineer is this still a problem for you?
Hey @sibelius! Thanks for reminding me:) I created a PR that fixes this issue, see #177.
fixed in #331
In my code I have created a connection as follows:
Next, when I look in graphiql I see that the name of the connection is
undefinedConnection
:When I now change the connection definition as follows:
Then the name of the connection is correct!
Is this a bug?