Skip to content

[Feature] Support Subscriptions HTTP Multipart Protocol #463

Closed

Activity

  1. leszekhanusz commented on Feb 5, 2024

    @leszekhanusz
    Collaborator

    I think you're mixing two different things. The HTTP callback protocol that you first linked is different than the Multipart HTTP protocol (which is on the next page of the docs).

    In the callback protocol, you have to create a server and send an url to the backend so that it could send answers to your own server.
    In the Multipart protocol, you do an HTTP request which is long lived and will not close the connection but instead continue to send data as new events happen. There is no need for a server there.

    I suppose you're interested in the Multipart protocol and not the callback protocol.

    In that case, do you know a public backend which supports this protocol already that we could use to test this functionality?

  2. andrewmcgivery commented on Feb 5, 2024

    @andrewmcgivery
    Author

    Yep, you're correct about the differences... also for context, I'm a Solutions Architect at Apollo. 😄

    I linked both for context but yes you're correct that what I'm interested in is the client portion, the Multipart protocol.

    I don't know of a public backend currently... but I can help with testing by providing a private test repo (and adding you to it) and temporarily issuing an Apollo Key to a test graph.

  3. patrick91 commented on Feb 6, 2024

    @patrick91
    Member

    @leszekhanusz @andrewmcgivery I'd be happy to help with this :)

    If you need a backend for testing this I can make a an example with Strawberry (I have a PR open to add multipart support: strawberry-graphql/strawberry#3076)

  4. leszekhanusz commented on Feb 6, 2024

    @leszekhanusz
    Collaborator

    Yep, you're correct about the differences... also for context, I'm a Solutions Architect at Apollo. 😄

    Oops 😆

    I don't know of a public backend currently... but I can help with testing by providing a private test repo (and adding you to it) and temporarily issuing an Apollo Key to a test graph.

    That would be nice, but I would like to take this opportunity to ask if you could maybe propose in your organization to make a very simple public server to allow any user to test clients for GraphQL subscriptions. I think that would be a very nice gift to the GraphQL community.

    With gql, we are using https://countries.trevorblades.com for most of our examples, but they dropped the websockets endpoint, so a public GraphQL backend which supports both the websocket and multipart protocol would be really nice. The actual schema could be something really simple like a subscription for a number counting to 10 with a 100ms interval for example. The bandwidth should be minimal as this serves no purpose except for a few tests. If that's not possible, no worries I'll use the private test repo.

  5. leszekhanusz commented on Feb 6, 2024

    @leszekhanusz
    Collaborator

    If you need a backend for testing this I can make a an example with Strawberry (I have a PR open to add multipart support: strawberry-graphql/strawberry#3076)

    That would be great!

    Note for both of you: Is there a list somewhere of clients/servers supporting the multipart protocol in all languages? Something like the GraphQL file upload spec

  6. andrewmcgivery commented on Feb 6, 2024

    @andrewmcgivery
    Author

    Yep, you're correct about the differences... also for context, I'm a Solutions Architect at Apollo. 😄

    Oops 😆

    I don't know of a public backend currently... but I can help with testing by providing a private test repo (and adding you to it) and temporarily issuing an Apollo Key to a test graph.

    That would be nice, but I would like to take this opportunity to ask if you could maybe propose in your organization to make a very simple public server to allow any user to test clients for GraphQL subscriptions. I think that would be a very nice gift to the GraphQL community.

    With gql, we are using https://countries.trevorblades.com for most of our examples, but they dropped the websockets endpoint, so a public GraphQL backend which supports both the websocket and multipart protocol would be really nice. The actual schema could be something really simple like a subscription for a number counting to 10 with a 100ms interval for example. The bandwidth should be minimal as this serves no purpose except for a few tests. If that's not possible, no worries I'll use the private test repo.

    I'll chat internally to see what we can do. :)

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

    type: feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions