Skip to content

custom apolloLinkCreator with subscription #919

@fredr

Description

@fredr

This issue pertains to the following package(s):

  • GraphQL Playground - Electron App
  • GraphQL Playground HTML
  • GraphQL Playground
  • GraphQL Playground Express Middleware
  • GraphQL Playground Hapi Middleware
  • GraphQL Playground Koa Middleware
  • GraphQL Playground Lambda Middleware

What OS and OS version are you experiencing the issue(s) on?

What version of graphql-playground(-electron/-middleware) are you experiencing the issue(s) on?

1.7.11

What is the expected behavior?

That is what I'm trying to figure out

What is the actual behavior?

I'm trying to figure out how to implement a custom apolloLinkCreator, and are having some problems understanding how the subscriptionEndpoint is supposed to be sent to that function.

In the default implementation it is hintet that it will be a parameter:
https://github.com/prisma/graphql-playground/blob/master/packages/graphql-playground-react/src/state/sessions/fetchingSagas.ts#L61

But for the type spec it seems it is not sent: https://github.com/prisma/graphql-playground/blob/master/packages/graphql-playground-react/src/components/Playground.tsx#L87

And there is this code that suggest that it might be set in different ways: https://github.com/prisma/graphql-playground/blob/master/packages/graphql-playground-react/src/state/sessions/fetchingSagas.ts#L80

This is also the only place I can find it beeing called (and its without a subscriptionEndpoint): https://github.com/prisma/graphql-playground/blob/master/packages/graphql-playground-react/src/state/sessions/fetchingSagas.ts#L141

What steps may we take to reproduce the behavior?

Please provide a gif or image of the issue for a quicker response/fix.

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