Correct way to request publications

Correct way to request publications


0

So I am currently trying to get all publication channels I can publish products at and am a bit confused…

The channels query is depricated: https://shopify.dev/docs/api/admin-graphql/2023-07/queries/channels

The publications query should be fine as of the documentation: https://shopify.dev/docs/api/admin-graphql/2023-07/queries/publications
But if I exec the query, i get a deprication error:

// Query:
query publications {
  publications(first: 10) {
    edges {
      node {
        id
        name
      }
    }
  }
}

// Error:
{
  message:"https://shopify.dev/api/usage/versioning#deprecation-practices",
  path:"https://xxxxxxxxxxxxx.myshopify.com/admin/api/2023-07/graphql.json",
  body: {
    query:"
      query publications {          
        publications(first: 10) {
          ...
        }
      }
    "
  }
}

So what is the correct way to query the publication channel?
Am i doing something wrong?


Load 4 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *