swarthout / feathers-apollo

Feathers and Apollo Server Sample Project
MIT License
176 stars 20 forks source link

Pure "client only" version of Feathers-Apollo #21

Closed idibidiart closed 7 years ago

idibidiart commented 7 years ago

I have played with this architecture. It is pretty cool, and makes a lot of sense to me, but I have been wondering why we have GraphQL sitting in the mid-tier, and why have a mid-tier at all when we can have GraphQL Anywhere (with async resolver support) sitting in the client and interacting with Feathers services running in the client that in turn wrap external resources. Why the mid tier?

swarthout commented 7 years ago

That is a good point and I think there is a lot of value in that approach, especially in working with existing servers. I did this in the mid tier because one of the big advantages of graphql is intuitive joins and if you are doing your joins on the client you are going to be doing a lot more network requests.

idibidiart commented 7 years ago

Ah! good point, yeah... but sometimes network bandwidth is cost-free (as in having an unlimited data plan or working over wifi) and the cost of operating the infrastructure is the real show stopper. I can't say that any major company would go that route but for small budget strapped projects that might be a less costly approach.

swarthout commented 7 years ago

True, I was thinking more about latency than server costs though. The latency of a client request is usually many times slower than a database query.

idibidiart commented 7 years ago

you're right, and also for security reasons... looking forward to the auk upgrade, but no pressure ! thanks again for sharing this @swarthout !!! excellent stuff.