Comments (9)
Quick update; Based on my current observation it appears that the GraphQl configurations are not picked up. Trying to determine why . .
from aws-serverless-java-container.
PR is issued. It was actually the bug in AwsAsyncContext (see commit message). It is also easily reproducible locally again's the code provided by the issue reporter
public static void main(String[] args) throws Exception {
StreamLambdaHandler handler = new StreamLambdaHandler();
InputStream targetStream = new ByteArrayInputStream(API_GATEWAY_EVENT.getBytes());
ByteArrayOutputStream output = new ByteArrayOutputStream();
handler.handleRequest(targetStream, output, null);
System.out.println("RESULT: " + output.toString(StandardCharsets.UTF_8));
}
static String API_GATEWAY_EVENT = "{\n"
+ " \"version\": \"1.0\",\n"
+ " \"resource\": \"$default\",\n"
+ " \"path\": \"/graphql\",\n"
+ " \"httpMethod\": \"POST\",\n"
+ " \"headers\": {\n"
+ " \"Content-Length\": \"45\",\n"
+ " \"Content-Type\": \"application/json\",\n"
+ " \"Host\": \"i76bfh111.execute-api.eu-west-3.amazonaws.com\",\n"
+ " \"User-Agent\": \"curl/7.79.1\",\n"
+ " \"X-Amzn-Trace-Id\": \"Root=1-64087690-2151375b219d3ba3389ea84e\",\n"
+ " \"X-Forwarded-For\": \"109.210.252.44\",\n"
+ " \"X-Forwarded-Port\": \"443\",\n"
+ " \"X-Forwarded-Proto\": \"https\",\n"
+ " \"accept\": \"*/*\"\n"
+ " },\n"
+ " \"multiValueHeaders\": {\n"
+ " \"Content-Length\": [\n"
+ " \"45\"\n"
+ " ],\n"
+ " \"Content-Type\": [\n"
+ " \"application/json\"\n"
+ " ],\n"
+ " \"Host\": [\n"
+ " \"i76bfhczs0.execute-api.eu-west-3.amazonaws.com\"\n"
+ " ],\n"
+ " \"User-Agent\": [\n"
+ " \"curl/7.79.1\"\n"
+ " ],\n"
+ " \"X-Amzn-Trace-Id\": [\n"
+ " \"Root=1-64087690-2151375b219d3ba3389ea84e\"\n"
+ " ],\n"
+ " \"X-Forwarded-For\": [\n"
+ " \"109.210.252.44\"\n"
+ " ],\n"
+ " \"X-Forwarded-Port\": [\n"
+ " \"443\"\n"
+ " ],\n"
+ " \"X-Forwarded-Proto\": [\n"
+ " \"https\"\n"
+ " ],\n"
+ " \"accept\": [\n"
+ " \"*/*\"\n"
+ " ]\n"
+ " },\n"
+ " \"queryStringParameters\": {\n"
+ " \"abc\": \"xyz\",\n"
+ " \"foo\": \"baz\"\n"
+ " },\n"
+ " \"multiValueQueryStringParameters\": {\n"
+ " \"abc\": [\n"
+ " \"xyz\"\n"
+ " ],\n"
+ " \"foo\": [\n"
+ " \"bar\",\n"
+ " \"baz\"\n"
+ " ]\n"
+ " },\n"
+ " \"requestContext\": {\n"
+ " \"accountId\": \"123456789098\",\n"
+ " \"apiId\": \"i76bfhczs0\",\n"
+ " \"domainName\": \"i76bfhc111.execute-api.eu-west-3.amazonaws.com\",\n"
+ " \"domainPrefix\": \"i76bfhczs0\",\n"
+ " \"extendedRequestId\": \"Bdd2ngt5iGYEMIg=\",\n"
+ " \"httpMethod\": \"POST\",\n"
+ " \"identity\": {\n"
+ " \"accessKey\": null,\n"
+ " \"accountId\": null,\n"
+ " \"caller\": null,\n"
+ " \"cognitoAmr\": null,\n"
+ " \"cognitoAuthenticationProvider\": null,\n"
+ " \"cognitoAuthenticationType\": null,\n"
+ " \"cognitoIdentityId\": null,\n"
+ " \"cognitoIdentityPoolId\": null,\n"
+ " \"principalOrgId\": null,\n"
+ " \"sourceIp\": \"109.210.252.44\",\n"
+ " \"user\": null,\n"
+ " \"userAgent\": \"curl/7.79.1\",\n"
+ " \"userArn\": null\n"
+ " },\n"
+ " \"path\": \"/pets\",\n"
+ " \"protocol\": \"HTTP/1.1\",\n"
+ " \"requestId\": \"Bdd2ngt5iGYEMIg=\",\n"
+ " \"requestTime\": \"08/Mar/2023:11:50:40 +0000\",\n"
+ " \"requestTimeEpoch\": 1678276240455,\n"
+ " \"resourceId\": \"$default\",\n"
+ " \"resourcePath\": \"$default\",\n"
+ " \"stage\": \"$default\"\n"
+ " },\n"
+ " \"pathParameters\": null,\n"
+ " \"stageVariables\": null,\n"
+ " \"body\": \"{\\\"query\\\":\\\"query example{exampleQuery(input: { id: 1 }) {ok}}\\\",\\\"variables\\\":{}}\",\n"
+ " \"isBase64Encoded\": false\n"
+ "}";
from aws-serverless-java-container.
I am looking at it [Spring Team]
from aws-serverless-java-container.
Thanks @olegz
from aws-serverless-java-container.
@2012160085 for my curiosity do you see the following message in the AWS logs
Resolved location pattern [classpath:graphql/**/*.graphqls] to resources [file [/Users. . . .
OR
do you see it like this
Resolved location pattern [classpath:graphql/**/*.graphqls] to resources []
from aws-serverless-java-container.
@2012160085 for my curiosity do you see the following message in the AWS logs
Resolved location pattern [classpath:graphql/**/*.graphqls] to resources [file [/Users. . . .
OR do you see it like this
Resolved location pattern [classpath:graphql/**/*.graphqls] to resources []
I see the following log from AWS Lambda.
Resolved location pattern [classpath:graphql/**/*.graphqls] to resources [file [/var/task/graphql/schema.graphqls]]
from aws-serverless-java-container.
closed by mistake. sorry..
from aws-serverless-java-container.
This will be part of 2.0.0-M2 release. Thanks to @olegz for analyzing and fixing the issue.
from aws-serverless-java-container.
I just realised, you can remove the
@RequestMapping(path="/hi", method=RequestMethod.GET, produces = {"text/plain"})
public Mono<String> hi() {
return Mono.just(HELLO_MESSAGE);
}
accidental leftover
from aws-serverless-java-container.
Related Issues (20)
- Urgent help needed pls - Lambda handler issue HOT 2
- AWS Lambda API Gateway REST end point Gateway timeout or Missing Authentication Token HOT 6
- registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime HOT 1
- Path parameter is decoded within the SpringBootLambdaContainerHandler proxy method before it reaches Application's Rest controllers HOT 8
- AWS lambda : Spring boot 3 Servlet application having webflux dependency for web client HOT 3
- Spring Async initialization still initializing twice, timing out, wrong docs/sample HOT 4
- SpringBoot3 with JPA dependency fails to handle asynchronous requests. HOT 3
- SpringBoot3 not processing all Multipart files when Array of files with same fieldName is sent in request HOT 3
- feature: Support VPC Lattice integration as frontend service HOT 1
- Provide concrete example of building custom events HOT 1
- How can I get 'apigateway authorizer' context content in SpringBoot2? HOT 1
- Incorrect ServerName with ALB HOT 1
- Stable v2 release date HOT 8
- Spring throwExceptionIfNoHandlerFound is true by default as of Spring 6.1.x
- HTTP API is supported? HOT 2
- Spring for GraphQL support/ sample HOT 2
- "java.lang.NoClassDefFoundError" on Pet Store sample project HOT 3
- SpringDelegatingLambdaContainerHandler seems does not work with query parameters HOT 8
- SpringDelegatingLambdaContainerHandler should reuse AsyncInitializationWrapper HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-serverless-java-container.