Join the Webstudio community

Updated 4 months ago

Issues with Hygraph (status: 200)

At a glance

A community member is having issues connecting Webstudio to Hygraph. They followed a tutorial step-by-step, but cannot retrieve data when using the query variable in Webstudio. The issue occurs when they add { slug: system.params.slug }. Other community members suggest that the system.params.slug is not outputting anything, and recommend providing a test value in the address bar. After trying this, the community member confirms it works, and they no longer need to use the dynamic system.params.slug variable. The community members resolve the issue by starting from scratch and ensuring they did not miss any steps.

Hello everyone!
I hope you're all doing well 🙂

I'm having some connection issues between Webstudio and Hygraph. I followed the tutorial step by step, but I can't retrieve data when I use the query variable in Webstudio. Let me explain.

I set up my dynamic page and created my queries in Hygraph. When I create my data variable and follow all the steps from the video, everything works fine until I add { slug: system.params.slug }. After that, when I inspect the variable, I get an issue with Status: 200.

Does anyone know what I can do?
C
J
F
8 comments
cc @Farès 😉
It looks like the system param is not outputting anything. Did you provide a test value in the address bar?
Attachment
Screenshot_2025-02-21_at_7.15.44_AM.png
Yes, we tried as indicated in the YouTube tutorial, but something is not working. I've tested the URL and query on Postman, and everything works fine. I also tested it on WebStudio with a slug, but it seems that no data is being returned when I put the variable.
Attachment
Capture_decran_2025-02-21_a_15.44.22.png
did you put a test value here? Just want to make sure because system.params.slug won't output anything if there is no test value
Attachment
Screenshot_2025-02-21_at_7.47.19_AM.png
If I do that it work ! Same If i put that : {
"slug": "content-federation-and-composable-architecture"
}
Great. Keep your expression the same, dont hardcode that value.

The expression uses whatever is in the actual URL on the live site. In the builder you can simulate the URL with the address bar.
Oh thanks my friend ! I thought I was oblige to use a variable like ( system.params.slug) to have something dynamic on my website 🙂 !
Okay, I got it! We started from scratch and missed some steps. Thank you for your replies! 🤓
Add a reply
Sign up and join the conversation on Discord