# GraphQL / Dynamic Pages Slug

**URL:** <https://community.hubspot.com/t/graphql-dynamic-pages-slug/117601>\
**Category:** CMS Development\
**Created:** [October 3, 2024, 11:02am UTC](https://community.hubspot.com/t/graphql-dynamic-pages-slug/117601 "2024-10-03T11:02:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NickPrice](https://avatars.discourse-cdn.com/v4/letter/n/13edae/32.png) [@NickPrice](https://community.hubspot.com/u/NickPrice)\
**Post date:** [October 3, 2024, 11:02am UTC](https://community.hubspot.com/t/graphql-dynamic-pages-slug/117601/1 "2024-10-03T11:02:58Z")

</div>

Hi.

I’m trying to use a graph QL query to fetch data associated with the current dynamic page object.

I’ve followed the guide on the docs, but the dynamic slug is coming through as empty, which means no data is getting returned. Here’s my graphQL code:

# label: “Course Detail Page”  
# description: “Show Course Details”  
# $hs\_object\_id: {{ request.path\_param\_dict.dynamic\_slug }}

query Course($hs\_object\_id: String!){  
CRM {  
p\_courses(uniqueIdentifier: “hs\_object\_id”, uniqueIdentifierValue: $hs\_object\_id) {  
associations {  
contact\_collection\_\_course\_tutor {  
items {  
firstname  
lastname  
}  
}  
}  
}  
}  
}  
If I print out the value of request.path\_param\_dict.dynamic\_slug in my module, it’s coming out blank too. It’s correctly present in the URL for the dynamic page e.g.  
[https://27229124.hs-sites-eu1.com/course/1843978974](https://27229124.hs-sites-eu1.com/course/1843978974)  
Does anyone know why this wouldn’t be pulling through correctly?

---

<div class="post-metadata">

**Author:** ![NickPrice](https://avatars.discourse-cdn.com/v4/letter/n/13edae/32.png) [@NickPrice](https://community.hubspot.com/u/NickPrice)\
**Post date:** [October 3, 2024, 11:09am UTC](https://community.hubspot.com/t/graphql-dynamic-pages-slug/117601/2 "2024-10-03T11:09:02Z")

</div>

Just an update for anyone with the same issue.

I was able to fetch the Id using # $hs\_object\_id: {{ dynamic\_page\_crm\_object.id }}  
thanks

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [October 7, 2024, 5:38pm UTC](https://community.hubspot.com/t/graphql-dynamic-pages-slug/117601/3 "2024-10-07T17:38:42Z")

</div>

Hey, @NickPrice 👋 Thank you very much for coming back and sharing what worked for you! — Jaycee
