aerogear / graphback

Graphback - Out of the box GraphQL server and client
https://graphback.dev
Apache License 2.0
409 stars 73 forks source link

Investigate using Stucco with golang runtime #1819

Closed wtrocki closed 4 years ago

machi1990 commented 4 years ago

/cc @craicoverflow, @machi1990 Automatically generated comment to notify maintainers

aexol commented 4 years ago

https://github.com/graphql-editor/stucco https://github.com/graphql-editor/stucco-js To get started

wtrocki commented 4 years ago

Done initial investigation.

Stucco is a superior solution for the cases where we think about isolating resolvers for becoming their own units (like serverless). For the cases where we dealing with the single server hosting resolvers and GRPC handlers with small queries, I see that the benefits of using it will be minimal - if we include additional complexity.

Where stucco excels is large projects with complex queries (which is probably valid for every multi team projects) Technically this can also affect the cost of the hosting (but I would need to measure that in practice to confirm it)

What stucco does well is to provide independent from language platform for executing various resolvers. The composition of resolvers here is much better and easier to deal with than in concepts like federation, with much better performance overall. Considering that Apollo also rewriting their federation gateway towards golang as well Stucco becomes early player - despite being alpha it seems to have complete support for various cases like scalars. I have dropped some of the graphback schemas but weren't able to test them as Graphback runtime doesn't expose GRPC (quick inspection of the js library shows me that this will be a very trivial job to do).

Having runtime layer (like graphback runtime) + ability to define severless/server side layouts (Knative I'm looking at you) will make stucco a solution that is quite unique and ready to be available as cloud addon.

I think we can do some short blog post first about using stucco with the KNative that will mean that you can run this in any cloud provider without vendor locking

wtrocki commented 4 years ago

I did not get any answer from @aexol thru email, github or email. I will look if we can build something similar to satisfy our needs for serverless environments.