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

Run fetch calls in getStaticProps in parallel / Batch Queries #704

Closed
janus-reith opened this issue Jul 14, 2020 · 0 comments
Closed

Run fetch calls in getStaticProps in parallel / Batch Queries #704

janus-reith opened this issue Jul 14, 2020 · 0 comments

Comments

@janus-reith
Copy link
Collaborator

Summary description

Run fetch calls in parallel

TBD: Refactor the whole logic to just batch all necessary queries into one call, to avoid several roundtrips altogether.
This will be especially notable when fallback rendering is happening and storefront and api have some network distance.

Rationale for why this feature is necessary

Currently. each GraphQL Query for SSG is awaited and then the next one is executed.

Expected use cases

Data fetching in getStaticProps, which needs to be for every page.

Additional context

Not sure if batching is an appropriate term here, as the goal would be to only have one batch ;)
Will probably solve this together with #703.

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