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

Querying content with different priorities #94

Closed
luisobo opened this issue Sep 23, 2015 · 2 comments
Closed

Querying content with different priorities #94

luisobo opened this issue Sep 23, 2015 · 2 comments

Comments

@luisobo
Copy link

luisobo commented Sep 23, 2015

Hi,

With GraphQL (and relay) there is the potential of fetching the data for an entire screen in one query. This is great because it is simple but sometimes (if not most of the times) you want to grab the main content first (article content) and then grab the surroundings (related content, comments, stats of the article, etc) to improve the user experience.

Of course there is the option of making two separate GraphQL queries but, since the idea (especially with relay) seems to be having everything declarative, I'd rather avoid this option.

I'm wondering if there is a way of doing this. If not, it may be interesting to consider this use case, maybe in conjunction with subscriptions (give me the article content now and send me the rest once it is computed?)

Thanks for your time.

@fson
Copy link
Contributor

fson commented Sep 23, 2015

These are called "deferred fragments" and they are used internally at Facebook, but the open source specification for them is yet to be developed. See: facebook/relay#288

@luisobo
Copy link
Author

luisobo commented Sep 23, 2015

uuuh, interesting. Thank you!

@luisobo luisobo closed this as completed Sep 23, 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

2 participants