Skip to content

Configure RSocket support in GraphQL #30453

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

Closed
bclozel opened this issue Mar 28, 2022 · 1 comment
Closed

Configure RSocket support in GraphQL #30453

bclozel opened this issue Mar 28, 2022 · 1 comment
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@bclozel
Copy link
Member

bclozel commented Mar 28, 2022

Since spring-projects/spring-graphql#339, Spring for GraphQL also allows RSocket transport.
Spring Boot should also support this by auto-configuring a Controller that, using RSocketGraphQlHandler, handles RSocket messages at a configured path.

@bclozel bclozel added the type: enhancement A general enhancement label Mar 28, 2022
@bclozel bclozel added this to the 2.7.x milestone Mar 28, 2022
@bclozel bclozel self-assigned this Mar 28, 2022
@rstoyanchev
Copy link
Contributor

rstoyanchev commented Mar 28, 2022

Note there is also an RSocketGraphQlClient and RSocketGraphQlTester which use RSocketRequester.

Currently, if you start with RSocketGraphQlClient.builder(), it will create a new RSocketRequester.Builder and set the dataMimeType to "application/graphql+json", but if you start with builder(RSocketRequester.Builder), which could be the builder from Boot's RSocket starter, then you'd have to make that builder(RSocketRequester.Builder).dataMimeType("application/graphql+json").

Either the Boot start should provide an RSocketRequester.Builder for GraphQL or we could set the dataMimeType even when we are given a pre-configured builder instance. In any case, if there isn't anything to be added on the Boot side for the client or tester, a short update in the documentation with guidance would also make sense.

@bclozel bclozel changed the title Support RSocket transport in GraphQL Configure RSocket support in GraphQL Mar 28, 2022
@bclozel bclozel modified the milestones: 2.7.x, 2.7.0-RC1 Apr 14, 2022
bclozel added a commit that referenced this issue Apr 14, 2022
This commit adds the RSocket server auto-configuration for GraphQL.

See gh-30453
bclozel added a commit that referenced this issue Apr 19, 2022
This commit contributes a `RSocketGraphQlClient.Builder` component to
the context, pre-configured with the `RSocketStrategies`, a customized
`RSocketConnector` and the expected data MIME type.

See gh-30453
bclozel added a commit that referenced this issue Apr 19, 2022
@bclozel bclozel closed this as completed Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants