Log in
Log into community
Join the Webstudio community
View all posts
Related posts
Was this helpful?
😞
😐
😃
Powered by
Hall
Active
Updated 2 weeks ago
0
Follow
How to pass data from one GraphQL request to another in Webstudio?
How to pass data from one GraphQL request to another in Webstudio?
Active
0
Follow
D
Divisor
2 weeks ago
·
Hi Webstudio team,
On my dynamic “Review” page I can grab the page slug via system.params.slug.
My backend requires two steps:
Use that slug (plus ratingId and language) to fetch the numeric ID of the post.
Use the returned ID
to run the standard GraphQL request that delivers the full review data.
What is the recommended way in Webstudio to:
Trigger the first request on page load (or when the slug changes);
Feed the single value it returns straight into the $id variable of the second request;
Ensure the second request waits until the first one finishes, without writing custom JavaScript?
A brief step-by-step or a link to the relevant doc section would be perfect.
Thank you!
B
1 comment
Share
Open in Discord
B
Bogdan
2 weeks ago
Doing waterfall of requests can greatly affect performance so it's not allowed to create sequence of resources. Your graphql api should expose filtering by slug. This is kinda the point of graphql to avoid multiple requests.
Add a reply
Sign up and join the conversation on Discord
Join on Discord