Conversation
|
Hey Fredric do you mind putting some description on this pr for context? |
|
Hey @jonife, I just linked the relevant issue and also added instructions to test. Thanks for the feedback. |
| @@ -0,0 +1,38 @@ | |||
| # Serverless Spring Boot 3 and Spring-graphQl example | |||
There was a problem hiding this comment.
I don't like how the Spring-graphQl looks.
But I would say either we put
- just
Spring Boot 3 with GraphQL - or directly the library name
spring-graphql(all lower case) - or use the library name, but it seems a little redundant
Spring Boot 3 and Spring for GraphQL - or maybe
Spring-GraphQLif we just want to change casing.
(in order of my personal preference)
There was a problem hiding this comment.
Ok, makes sense. I went with the first option.
| import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; | ||
| import org.springframework.context.annotation.Bean; | ||
| import org.springframework.context.annotation.Import; | ||
| import org.springframework.web.servlet.HandlerAdapter; | ||
| import org.springframework.web.servlet.HandlerExceptionResolver; | ||
| import org.springframework.web.servlet.HandlerMapping; | ||
| import org.springframework.web.servlet.ModelAndView; |
There was a problem hiding this comment.
It looks like a few of these imports are not used (SpringBootServletInitializer, HandlerExceptionResolver, ModelAndView)
Try to check for imports in the other files too (I see QueryMapping and SchemaMapping in a different file that are not used there either)
There was a problem hiding this comment.
Done, Thanks.
| Handler: com.amazonaws.serverless.sample.springboot3.StreamLambdaHandler::handleRequest | ||
| Runtime: java21 | ||
| CodeUri: . | ||
| MemorySize: 1512 |
There was a problem hiding this comment.
I saw the other springboot pet-store example already has 1512, but it's a weird number. Normally the memory comes in like powers of 2 (512 is in some other examples). I feel like someone just added a 1 when they wanted more memory to end up with the 1512. But it looks better to use 1024 if that's enough memory (that's what the alt-petstore uses).
|
One suggestion: I think the official name is |
Issue #715:
Description of changes:
Added SpringBoot3-GraphQl sample
Commands to test:
sam buildsam local start-apicurl -X POST http://localhost:3000/graphql -d '{"query":"query petDetails {\n petById(id: \"pet-1\") {\n id\n name\n breed\n owner {\n id\n firstName\n lastName\n }\n }\n}","operationName":"petDetails"}' -H "Content-Type: application/json"Test results:
{"data":{"petById":{"id":"pet-1","name":"Alpha","breed":"Bulldog","owner":{"id":"owner-1","firstName":"Joshua","lastName":"Bloch"}}}}By submitting this pull request