Skip to content

Passing subscription queries to sources does not work #1472

@german-swan

Description

@german-swan

I'm trying to use mesh as a gateway, and I want the graphql-subscriptions to work as well as queries. There is a repo with my problem representation: https://github.com/germankrause/mesh-issue.
I'm getting an error: Cannot read property 'eventtest' of undefined in graphql-tools: generateProxyingResolvers function. It's trying to resolve payload[targetFieldName], but payload is undefined. I found out that payload is passed rootValue, so I've added it, and now I'm just getting null in the response data. Original source resolver is not even called
I've debugged it and have seen that mesh successfully build the schema using stitching algorithm, but in generateProxyingResolvers it builds non-working resolvers, so I get errors after the mesh bootstrapped when I try to run the subscription query.

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