ResourcePublication no id

ResourcePublication no id

AnatoliiV
Visitor
1 0 0
Hey.
ResourcePublication, ResourcePublicationConnection type not have id type
```
productPublicationsV3(first: 100) {
  edges {
     id # error
  }
  nodes {
       id # error
       publication {id}
       publishable { ... on Product {id} }
  }
}
```
I can take publication_id and product_id but there is no id
 
product_publications/delete webhook produce  only header X-Shopify-Product-Id: \d+
and body {"id":\d+} # id of ResourcePublication, ResourcePublicationConnection
 
So to process it i need to get publication_id and product_id(i can take from header)?
 
So my question how return id in gql for ResourcePublication, ResourcePublicationConnection to store it in my db or get ResourcePublication, ResourcePublicationConnection by id so i can find publication_id and product_id.
 
Stupid idea is to use X-Shopify-Product-Id header and just get all ResourcePublications each time and check what was removed and ignore ResourcePublication id but it is additional api requests to shopify and there can be many publications so it will be more complex.
 
Replies 0 (0)