Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[client] GraphQL client support for subscriptions #701

Open
dariuszkuc opened this issue May 9, 2020 · 5 comments
Open

[client] GraphQL client support for subscriptions #701

dariuszkuc opened this issue May 9, 2020 · 5 comments
Labels
module: client Issue affects the client code type: enhancement New feature or request

Comments

@dariuszkuc
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
graphql-kotlin-client currently supports query and mutation operations. We should provide support for subscription operations as well.

Describe the solution you'd like
Gradle/Maven plugins should auto generate client that can utilizes websockets for subscriptions and adheres to Apollo subscription protocol.

Describe alternatives you've considered
N/A

Additional context
N/A

@dariuszkuc dariuszkuc added the type: enhancement New feature or request label May 9, 2020
@dariuszkuc dariuszkuc added this to the 4.0.0 milestone Jul 17, 2020
@smyrick smyrick added the module: client Issue affects the client code label Nov 25, 2020
@choweiyuan
Copy link

Hi, any ideas on when this will be implemented (since it has been marked as 4.0.0 milestone..)? If not what's the complexity to implement this and any guidelines for the public to help?

@smyrick smyrick removed this from the 4.0.0 milestone May 26, 2021
@smyrick
Copy link
Contributor

smyrick commented May 26, 2021

@choweiyuan The maintainers and Expedia Group do not have an urgent need in our team to support this as we do not use subscriptions in GraphQL very much. So for now there is no expected timeline for the implementation from the core maintainers.

However if your team has a more urgent need and would like to contribute back to our shared repository, we would be happy to discuss code changes and pontential solutions through PRs.

@choweiyuan
Copy link

Hi @smyrick thanks for the swift reply.

My team and I are thinking of using it initially, but now we've decided that there's no urgent need for it so this'll be in the back-burner for us too (for now!)

@mainrs
Copy link

mainrs commented Feb 24, 2024

I'd be willing to implement this, since I will need it for one of my projects.

I would really appreciate if someone could give me some guidance on what needs to be changed. Maybe necessary classes/interfaces and entrypoints would be a good start! :)

@dariuszkuc
Copy link
Collaborator Author

👋 I'd imagine it would generally fall into following areas

  • thin GraphQL wrapper around websocket client aware client, i.e. for Spring impl you would create a new GraphQLWebSocketClient which is based on SpringWebSocketClient (Ktor impl should be pretty similar as well). It should look fairly similar to existing client but would implement graphql-transport-ws protocol and return a Flow of values (or maybe it should just be a raw channel?)
  • update client codegen to support subscriptions and use new websocket based clients
  • update Gradle/Maven plugins to support it - I am unsure whether this would require any changes there (i.e. if everything is encapsulated within client codegen and we don't need any extra params, then I'd imagine it should work as is).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: client Issue affects the client code type: enhancement New feature or request
Development

No branches or pull requests

4 participants