Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Intent to discuss: GraphQL support? #4

Open
snowmantw opened this issue Sep 28, 2018 · 0 comments
Open

Intent to discuss: GraphQL support? #4

snowmantw opened this issue Sep 28, 2018 · 0 comments

Comments

@snowmantw
Copy link

WHAT

GraphQL is used by query-oriented apps and even is the basic method for mtc2018. Since this project already proxies the RESTful request to gRPC calls, to add one more API protocol could be in parallel components by following the similar pattern.

WHY

For frontend side GraphQL provides a way to support query-oriented apps and have several benefits. And although GraphQL is more like a thin layer that directly link to database via like Prisma, but for existing microservices and by requirements there would be some data from services, not directly from database. Therefore, if grpc-http-proxy can support GraphQL, it would help both frontend and backend to adapt the API protocol more easily.

Possible Strategies:

It seems possible to extend the http handler to call the module of GraphQL. GraphQL module could be a totally standalone component to handle schema and only when resolvers need, to call upstream gRPC services follow the same path as http handler (these code may be encapsulated as callable to be used in both places, to reduce the duplication), and then respond.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant