A GraphQL client library without queries: Building a movie app with gqless
hasura.ioAs a backend developer I can't help but feeling we have gone full circle. As in, how is this effectively different from regular server side HTML? I know this is rendered on the client, and I'm not doubting it's usefullness, but what advantages does this setup have?
I also guess their demo app isn't representative of what problems this setup intends to solve:
https://youtu.be/wM5KDPG9Ugk?t=2866
The example whould have been extremely simple to implement in JS/TS on the server side, it would also be much faster and have better concurrency, caching and scalability options.
While ES6 proxies are really nice, I came across this experiment (1) and their tests showed that ES6 proxies can be very bad at performance. I could reproduce the test case. Not sure whether this GraphQL client has some way to optimize.
1. https://thecodebarbarian.com/thoughts-on-es6-proxies-perform...
In comparison to the Network request that the GraphQL query will be launching, ES6 Proxy property access performance will be insignificant.
Performance is a major concern for everything I implement. I've made sure proxies are super-fast how I'm using at least.
Plus libraries like mobx already use them, and that's being used everywhere
I think this looks very cool, but this quote concerns me:
If you’re into laziness and magic (who isn’t?)
Magic is great until you run into an edge case, or try to do anything complicated. Then it tends to bite you in the ass.I can see this being a great tool for whipping out quick prototypes, but I'd be scared to use it for anything bigger.
That being said, it does look very cool!
> Magic is great until you run into an edge case, or try to do anything complicated
Yep totally agree. While it's not complete yet, (see https://github.com/samdenty/gqless/blob/master/README.md#gql...) I've designed with the sole focus for being used inside complex applications.
The "magic" part is only a small portion of gqless. For 1.0, there will be an option to "use plain queries". I've tried re-inventing everything - but it's also innovating in the reactive, query-optimization, local state and cache areas.
It can do even more optimizations than Relay ;)
I'm excited about the fluent GraphQL ecosystem and to see where it goes! Using the nice syntax of GraphQL does get lost a little bit ofcourse, but having the benefits of being able to "compose" to some degree and not dealing with strings is nice.
From the SQL ecosystem, jOOQ is so amazing: http://www.jooq.org/
This Ruby one was one of the first ones I came across https://github.com/contentful-labs/gqli.rb
And then we've been putting together a list here as well: https://github.com/hasura/awesome-fluent-graphql