Skip to content

Type incompatibility when using with apollo-server #1485

@nsine

Description

@nsine

Hello!
We are currently using apollo-server in the project which is still on graphql-tools@4. I tried to upgrade it to graphql-tools@alpha as it has a fix i wanted to see. However right after i installed new graphql-tools I see this error when compiling our TS project:

../../node_modules/apollo-server-core/node_modules/graphql-tools/dist/Interfaces.d.ts(29,18): error TS2430: Interface 'IGraphQLToolsResolveInfo' incorrectly extends interface 'GraphQLResolveInfo'.
  Types of property 'mergeInfo' are incompatible.
    Type 'MergeInfo' is missing the following properties from type 'MergeInfo': replacementSelectionSets, replacementFragments, mergedTypes

As i got this may happen because of merging interface in graphql TS module which already has a field with another type here https://github.com/ardatan/graphql-tools/blob/master/src/Interfaces.ts#L165

So is there any workaround for this? And does this make sense at all to upgrade to graphql-tools@5 when using apollo-server which depends on old version?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions