productResourceFeedback
Requires access scope. Also: App must be configured to use the Storefront API or as a Sales Channel.
Returns the product resource feedback for the currently authenticated app.
Arguments
- •ID!required
The product associated with the resource feedback.
Anchor to Possible returnsPossible returns
- Anchor to ProductResourceFeedbackProduct•
Resource Feedback Reports the status of product for a Sales Channel or Storefront API. This might include why a product is not available in a Sales Channel and how a merchant might fix this.
- feedback
Generated •At Datenon-nullTime! The time when the feedback was generated. Used to help determine whether incoming feedback is outdated compared to existing feedback.
- messages•[String!]!non-null
The feedback messages presented to the merchant.
- product
Id •ID!non-null The ID of the product associated with the feedback.
- product
Updated •At Datenon-nullTime! The timestamp of the product associated with the feedback.
- state•Resourcenon-null
Feedback State! Conveys the state of the feedback and whether it requires merchant action or not.
- feedback
- Get a product resource feedback record by ID that doesn't exist
- Receive a list of all Product ResourceFeedbacks
Examples
query {
productResourceFeedback(id: "gid://shopify/Product/-1") {
feedbackGeneratedAt
messages
productId
productUpdatedAt
state
}
}
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "query { productResourceFeedback(id: \"gid://shopify/Product/-1\") { feedbackGeneratedAt messages productId productUpdatedAt state } }"
}'
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
query {
productResourceFeedback(id: "gid://shopify/Product/-1") {
feedbackGeneratedAt
messages
productId
productUpdatedAt
state
}
}`,
);
const data = await response.json();
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: `query {
productResourceFeedback(id: "gid://shopify/Product/-1") {
feedbackGeneratedAt
messages
productId
productUpdatedAt
state
}
}`,
});
session = ShopifyAPI::Auth::Session.new(
shop: "your-development-store.myshopify.com",
access_token: access_token
)
client = ShopifyAPI::Clients::Graphql::Admin.new(
session: session
)
query = <<~QUERY
query {
productResourceFeedback(id: "gid://shopify/Product/-1") {
feedbackGeneratedAt
messages
productId
productUpdatedAt
state
}
}
QUERY
response = client.query(query: query)