Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Conditionally fetch fields #2

Open
dhmacs opened this issue Jun 12, 2018 · 1 comment
Open

Conditionally fetch fields #2

dhmacs opened this issue Jun 12, 2018 · 1 comment
Labels
enhancement ✨ Enhancement of existing features

Comments

@dhmacs
Copy link
Contributor

dhmacs commented Jun 12, 2018

This library abstracts away the fetching of data from the user and right now we do it at the cost of sacrificing performances (i.e. we fetch all the data from the storefront api, even the data that the user might actually not need).

This issue is to overcome this limitation by using graphql directives to fetch data based on user needs.

We need to come up with an easy to use API that let's devs who want to improve perfs by reducing request size to do so.
It can be something like a blacklist param:

<Collection exclude="variants", "options", "handle">
...
</Collection>

We need to put more thoughts on this.

@dhmacs dhmacs added the enhancement ✨ Enhancement of existing features label Jun 12, 2018
@dhmacs
Copy link
Contributor Author

dhmacs commented Oct 10, 2018

Starting from v0.7.0 we took a different approach by allowing to specify a product fragment on collection.

I'll leave this issue open as I feel there might be a better way to handle this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement ✨ Enhancement of existing features
Projects
None yet
Development

No branches or pull requests

1 participant