Skip to content

Dataloader not working with GraphQL subscriptions #31

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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