Skip to content

Dataloader not working with GraphQL subscriptions #31

Open
@ghost

Description

When trying to query dataloaded relationships via a GraphQl subscription, you get the following:

"message": "Cannot read property 'typeormGetConnection' of undefined",

I believe it is because the ApolloServerLoaderPlugin is not being passed to the WS server:

        async serverWillStart() {
          return {
            async drainServer() {
              subscriptionServer.close();
            },
          };
        },
      },
      ApolloServerLoaderPlugin({
        typeormGetConnection: getConnection,
      }),

anyone have an ideas on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions