Skip to content

Spring for GraphQL support/ sample #715

New issue

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

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

Already on GitHub? # to your account

Closed
deki opened this issue Dec 13, 2023 · 2 comments
Closed

Spring for GraphQL support/ sample #715

deki opened this issue Dec 13, 2023 · 2 comments
Assignees
Milestone

Comments

@deki
Copy link
Collaborator

deki commented Dec 13, 2023

At re:Invent 2023 someone asked if we are supporting Spring for GraphQL https://docs.spring.io/spring-graphql/reference/. Goal of this issue is to check that and ideally add a sample for it.

@mbfreder
Copy link
Contributor

mbfreder commented Jan 9, 2024

Thanks for raising this. I will check if it's already supported.

@fredbonin
Copy link

Hi,
I can confirm that GraphQL works.

I've used the code here to test it :
https://spring.io/guides/gs/graphql-server/ and it just worked (I added a StreamLambdaHandle as documented here https://github.com/aws/serverless-java-container/wiki/Quick-start---Spring-Boot3).

However, I had issues when integrating with JPA. It was necessary to add the config below:

spring:
  jpa:
    open-in-view: false

If it was not added, the handler was going in an infinite loop (waiting for a latch). This was not necessary for REST API (in any case, it is good practice to disable this for all spring applications)

@deki deki added this to the Release 2.0 milestone Jan 24, 2024
@deki deki closed this as completed Jan 30, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants