graphql-compose / graphql-compose/graphql-compose-mongoose

How to reference a generated graphql type from custom graphql schema

Open
#295 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
706
Forks
98
PR merge metrics
No merged PRs in 30d

Description

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`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.