Skip to content

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

Open
@Morphexe

Description

@Morphexe

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions