A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
We are getting a message that publications.name will be deprecated on this query, however whenever we run this the returned catalog node is null. Is there any time frame as to when this will be updated or what we should use instead?
query { publications(first: 250) { edges { node { id name catalog { title } } } } }
Hi @Blueswitch,
I've looked into this behaviour further and have discussed this with our developers. I can confirm that when making the publications query without the catalogType argument included, it will only return the publishable sales channels without the catalog linked. This is due to the fact that publications pre-date catalogs on our platform and this query was made to be backwards compatible by returning publishable sales channels.
That said, as the data returned is not consistent, we do agree that this is not currently expected behaviour and our developers will be looking into this to update the behaviour to be more consistent when including or not including the catalogType argument.
In the meantime while our developers are looking into this further, you can retrieve the catalogs on publications by including the catalogType argument in the publications query as mentioned above. Here's an example combined query that will return the expected catalogs and titles for all the returned publications for each Catalog Type.
Relevant Dev Docs:
{
app: publications(first: 10, catalogType: APP) {
nodes {
id
name
catalog {
id
title
}
}
}
b2b: publications(first: 10, catalogType: COMPANY_LOCATION) {
nodes {
id
name
catalog {
id
title
}
}
}
market: publications(first: 10, catalogType: MARKET) {
nodes {
id
name
catalog {
id
title
}
}
}
}
I hope this helps, and I hope you have a great day 🙂
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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
great, thank you so much for the guidance.