Anchor to productResourceFeedbackproduct
productResourceFeedback
query
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.
Anchor to Arguments
Arguments
- •ID!required
The product associated with the resource feedback.
Was this section helpful?
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.
Was this section helpful?
- Get a product resource feedback record by ID that doesn't exist
- Receive a list of all Product ResourceFeedbacks
Examples
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();
query {
productResourceFeedback(id: "gid://shopify/Product/-1") {
feedbackGeneratedAt
messages
productId
productUpdatedAt
state
}
}
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2024-04/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)
Response
JSON{
"productResourceFeedback": null
}