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

Schema must contain unique named types but contains multiple types named "MongoID"

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

Description

I am facing a issue with stitching types .

```

const remoteQuery = TypeComposer.create(executableSchema._queryType);
const mutation = TypeComposer.create(executableSchema._mutationType);
const subscription = TypeComposer.create(executableSchema._subscriptionType);

GQC.rootQuery().addFields({
...remoteQuery.getFields()
});
GQC.rootMutation().addFields({
...mutation.getFields()
});

GQC.rootSubscription().addFields({
...subscription.getFields()
});
```

and then I am calling buildSchema();

Everything works fine, until I use a type that has the MongoID field.
The issue is my executableSchema already contains definitions for MongoID that can't be taken out.
Do you have a suggestion to handle this?
It won't matter if it removes duplicates or if it uses the first implementation.

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.