Hello !
I am trying to filter results by content relationship field. I am following the documentation here : Query Data with GraphQL - Prismic
But instead of having the id of the doc hard coded I need to make it a variable.
I have tried to use prismic.load but I must be using it wrong as it is not working.
Hi @sarah.ledu, I’m sorry that this isn’t working for you. Can you share a link to your Prismic GraphQL Explorer with this query filled in. Hopefully with this we’ll be able to figure out why this isn’t working for you. Thanks!
Hi Sarah, I’m not sure what the issue might be. I’ll need to try to recreate this locally. Can you send me your project files, so I can run your website and test this? You can either send me a zip file of your project or a link to github (or similar). If you don’t want to share it publicly here, you can send me a direct message.
Hi Levi,
I’d like to send you my zip file in a private message but it looks like I can’t send you private message. I cannot post a file either, because I’m new, it seems.
Could you tell me how to proceed ?
Thanks in advance !
Thanks for your reply @hugo.villain !
I haven’t succeed to make it work yet though. Do I have to add the variable $fragments somewhere in the query as well ? If yes where ?