Skip to content

buildServiceDefinition ignores resolvers for unions #890

@checkmatez

Description

@checkmatez

When instantiating apollo-server with modules config option, where typedefs contain union type, __resolveType function never gets called, resulting in error:

Abstract type Hi must resolve to an Object type at runtime for field Query.hello with value { there: "Hey!" }, received "undefined". Either the Hi type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.

Here is reproduction on codesandbox:

Edit Union resolver bug with modules

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions