A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Is there support for pages and blog articles in the GraphQL Admin API? I'm not seeing it. Are people just using both REST and GraphQL to cover all their bases?
I did notice the Storefront API, but it seems to be read only.
My use case is migrating lots of data (products, articles, pages, customers, orders) from our old site to Shopify.
Solved! Go to the solution
This is an accepted solution.
Hi Friendscottn,
From looking into this it does seem that the GraphQL API doesn't currently support mutations for creating pages or blog articles - so you would have to use the REST endpoints POST/admin
endpoint for pages and the POST /admin/api/2023-10/blogs/{blog_id}/articles.json
for blog articles.
Hope this helps!
Liam | Developer Advocate @ 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.
Hi Friendscottn,
From looking into this it does seem that the GraphQL API doesn't currently support mutations for creating pages or blog articles - so you would have to use the REST endpoints POST/admin
endpoint for pages and the POST /admin/api/2023-10/blogs/{blog_id}/articles.json
for blog articles.
Hope this helps!
Liam | Developer Advocate @ 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
Hi @Liam,
Thanks for confirming that for me. Super helpful.
Is the idea that eventually the GraphQL Admin API will have full coverage of these types of resources?
I had initially selected the GraphQL API for my project because it seemed to have better support for searching resources than the Rest API does.
Using both APIs in my one off data migration app feels awkward, but hey we do what we have to 😃
Are there any plans to add this to the GraphQL endpoints? Also, i cant seem to find the REST documentation anywhere. Could you point me in the right direction?
Not sure about the plans for GraphQL. I hope so. Here's the REST docs for pages and articles:
https://shopify.dev/docs/api/admin-rest/2023-10/resources/page
https://shopify.dev/docs/api/admin-rest/2023-10/resources/article