Changing the return URL slug from GraphQL using Storefront API

1 0 0

Hello, I've created a website using the Shopify API, and am pulling products and articles using the IDs of each element.


However, the return slug ends up being something like:


is there any way to replace everything after /article/ with the handle of the item in question?


Thank you.

Reply 1 (1)

Shopify Staff
402 66 100

Hey @Ivandev15 

Had you tried base 64 decoding the end of that URL? The end of it is the base 64 encoded value of the Article ID -  if I window.atob it, it'll give you something like - gid://shopify/Article/12345678. 

Hope that helps - let me know if I'm missing anything!




| Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!