api-gateway-example | Boilerplate for tested NGINX API gateway | REST library
kandi X-RAY | api-gateway-example Summary
kandi X-RAY | api-gateway-example Summary
This repo is an example of how to create an NGINX proxy as a gateway to your micro services. There’s a [detailed blog post] about it. The important thing is that you can run tests to verify that the gateway routing is done correctly, meaning a request is routed to a specified service with a specified path. For example, you can verify that an HTTP call to is routed to your authentication service with the /login path.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of api-gateway-example
api-gateway-example Key Features
api-gateway-example Examples and Code Snippets
Community Discussions
Trending Discussions on api-gateway-example
QUESTION
I created a GraphQL endpoint based on the following article: http://lifeinide.com/post/2019-04-15-micronaut-graphql-with-transaction-and-security-support/
It works properly in my local machine, but not after deploy to AWS lambda by referring to https://github.com/micronaut-projects/micronaut-aws/tree/master/examples/api-gateway-example.
I tested the /ping API of the Lambda with postman, it is working perfectly. However, when I post a graphql query to /graphql end point, it always return "415 Unsupported Media Type".
I think something is missing, but I not sure what is it, appreciate if anyone here could point me a way on how to make it works.
Thank you.
...ANSWER
Answered 2019-Nov-28 at 08:09After digging my head into source code, I found that graphQL post endpoint has Consumes property set to ALL i.e, / to accept any content type but in code they are specifically referring to application/json or application/graphQL.
When you hit the graphQL post endpoint with application/json then MICRONAUT lambda handler matches the content type with ALL, which is not true so it throws error 415 Unsupported Media Type. Request never reaches to the graphQL controller.
When you hit the graphQL post endpoint with / then MICRONAUT lambda handler matches the content type with ALL, which is seems to be true so it forward the request to GraphQL controller but in code it specifically looks for those specific content types. Again it relies on .equals method for comparison. Again it does not matches so throws 422 unprocessable entity.
I am still looking for solution to this.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install api-gateway-example
On a UNIX-like operating system, using your system’s package manager is easiest. However, the packaged Ruby version may not be the newest one. There is also an installer for Windows. Managers help you to switch between multiple Ruby versions on your system. Installers can be used to install a specific or multiple Ruby versions. Please refer ruby-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page