feroult / yawp

Kotlin/Java API framework for Google Appengine
http://yawp.io
MIT License
131 stars 19 forks source link

GraphQL Support #107

Open feroult opened 7 years ago

feroult commented 7 years ago

I'm thinking about adding GraphQL support. I'd like to hear some of your thoughts on it, feel free to criticize. The idea is to keep both the REST and GraphQL modes.

Our current REST model is also flexible in a way that it already supports a good subset of a GraphQL server.

We would need to export a /graphql endpoint that routes to a Java GraphQL Schema. The schema could be created directly from the same way we declare models today with the help of some Java GraphQL library like: https://github.com/graphql-java/graphql-java

rsolci commented 7 years ago

I think it's a very good ideal. GraphQL and Relay are a very nice way to fetch data from the server using a component driven front-end. Also it increases the readability of queries on the front-end, since JSON.

luanpotter commented 7 years ago

Started development on graphql branch. Right now it creates a schema with a field at the root level for every endpoint; this field returns a list of that endpoint, and receives optional arguments for filtering, just like the /people route would.

There is much more to do though, like: complex queries, security using shields, actions, transformer & hooks, et cetera.

I'm slowly working towards it :)

erickzanardo commented 7 years ago

+1