I'm trying to get the following simple query:
{duel{id, players}}
and I get the following error:
Field "players" of type "[User]" must have a selection of subfields. Did you mean "players { ... }
My Duel type structure:
const DuelType = new ObjectType({
name: 'Duel',
fields: () => ({
id: { type: new NonNull(ID) },
round_id: { type: IntType },
status: { type: StringType },
turn_of_user_id: { type: IntType },
winner: { type: StringType },
players: { type: new GraphQLList(UserType) },
}),
});
Any idea what I'm missing?
Thanks.