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

"You should not use this as a substitute for an actual GraphQL server for accessing a remote backend." #11

Closed
zuhair-naqvi opened this issue Dec 18, 2015 · 6 comments

Comments

@zuhair-naqvi
Copy link

This this because the client would be making N requests rather than the server?

@taion
Copy link
Member

taion commented Dec 18, 2015

Right, you lose all the benefits of request aggregation you'd get with a GraphQL server.

@taion taion closed this as completed Dec 18, 2015
@zuhair-naqvi
Copy link
Author

That's true. However in case of React Native, if you use the schema with the app and back it by https://github.com/facebook/dataloader (persist cache to disk) you could potentially deliver an offline first experience.. And the aggregation trade off might be acceptable given most of the queries would be resolved locally by the dataloader (depending on the use case) and only the ones not cached will actually go over the network. I'd be keen to hear your thoughts on this

@taion
Copy link
Member

taion commented Dec 19, 2015

It's not the same because you're still resolving waterfalled loads locally rather than remotely, and end up with multiple WAN round-trips rather than data-center-internal round-trips.

@josephsavona
Copy link

This seems like a reasonable warning to have to encourage most people to use a GraphQL server, but @zuhair-naqvi's approach is interesting and totally worth exploring. You're both right! ;-)

@taion
Copy link
Member

taion commented Dec 22, 2015

It still seems less than ideal to use data loader from the client-side, though - you still end up with waterfalled requests, no?

@josephsavona
Copy link

@taion context is facebook/relay#676 (comment)

@taion taion reopened this Dec 22, 2015
taion added a commit that referenced this issue Dec 31, 2015
@taion taion closed this as completed in #13 Dec 31, 2015
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

3 participants