Hello,
I can see that inside Shop object i should be able to see all domains attached to store.
https://shopify.dev/docs/admin-api/graphql/reference/object/shop?api[version]=2020-07
object:
domains ([Domain!]!) The domains configured for the shop.
I would like get this elements but following code fail,
Could someone help me out how to fetch this values?
Bellow is my code that i'm trying to use:query {
shop {
id
name
domains(first:10)
{
node
{
url
}
}
}
}
regards
Solved! Go to the solution
Hey @Camil
This should work for you
{
shop{
id
name
domains{
url
}
}
}
Kevin_A | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
This is an accepted solution.
Hey @Camil
Based on the error it looks like you are not using API version `2020-07`. The domains field was not available in previous versions.
Kevin_A | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
User | Count |
---|---|
12 | |
12 | |
10 | |
7 | |
6 |