graphql-compose-mongoose icon indicating copy to clipboard operation
graphql-compose-mongoose copied to clipboard

How to reference a generated graphql type from custom graphql schema

Open keeganstothert opened this issue 5 years ago • 0 comments

in my custom schema I want to return a type User that is generated by graphql-compose-mongoose from my User mongoose model.

i've tried ordering these differently but the problem persists

schemaComposer.addTypeDefs(UserGraph);

  schemaComposer.Query.addFields({
    ...patientQuery,
    ...userQuery,
    ...snapshotQuery,
  });

this is my custom graphql schema that causes the error

extend type Query {
  userCustomFind(id: String!): User!
}

i get the error

Type with name "User" does not exists

keeganstothert avatar Dec 15 '20 00:12 keeganstothert