Query with different types in GraphQL
0
So I have a graphQL userType and EventType and on my userType I have to make a nested query using EventType but I also need to return user information but since EventType doesn't have fields same as user info so to pass my code on testing I had to manually copy-paste UserType to EventType but I dont want this to solution. is there a way to like merge types? I'm using mongoDB as my database so when trying to do a POPULATE the user info comes back but Graphql making it hard. sorry im still new to graphql. so this is what I did on EventType to pass the test. under fixme i copy the UserType module.exports = { EventType: new GraphQLObjectType({ name: 'Event', fields: () => ({ id: {type: GraphQLID}, organizerId: {type: new GraphQLList(GraphQLID)}, title:...