Giter VIP home page Giter VIP logo

Comments (9)

olegz avatar olegz commented on June 27, 2024 1

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.

olegz avatar olegz commented on June 27, 2024 1

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.

olegz avatar olegz commented on June 27, 2024

I am looking at it [Spring Team]

from aws-serverless-java-container.

deki avatar deki commented on June 27, 2024

Thanks @olegz

from aws-serverless-java-container.

olegz avatar olegz commented on June 27, 2024

@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 avatar 2012160085 commented on June 27, 2024

@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.

2012160085 avatar 2012160085 commented on June 27, 2024

closed by mistake. sorry..

from aws-serverless-java-container.

deki avatar deki commented on June 27, 2024

This will be part of 2.0.0-M2 release. Thanks to @olegz for analyzing and fixing the issue.

from aws-serverless-java-container.

olegz avatar olegz commented on June 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.