product Resource Feedbackquery
query
2024-10latest
Requires read
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
The product associated with the resource feedback.
Was this section helpful?
ProductResourceFeedback possible returns
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?
Code examples for QUERY: productResourceFeedback
Query Reference for QUERY: productResourceFeedback
"{\n productResourceFeedback(id) {\n # ProductResourceFeedback fields\n }\n}"
Input Reference for QUERY: productResourceFeedback
Schema Reference for QUERY: productResourceFeedback
Display Examples for QUERY: productResourceFeedback
[ { "example": { "type_name": "productresourcefeedback", "title": "Get a product resource feedback record by ID", "query_string": "query {\n productResourceFeedback(id: \"gid://shopify/Product/1048875085\") {\n feedbackGeneratedAt\n messages\n productId\n productUpdatedAt\n state\n }\n}", "query_arguments": { "id": "gid://shopify/Product/1048875085" }, "response": { "data": { "productResourceFeedback": { "feedbackGeneratedAt": "2024-09-12T01:11:00Z", "messages": [ "Needs an image." ], "productId": "gid://shopify/Product/1048875085", "productUpdatedAt": "2024-09-12T01:11:00Z", "state": "REQUIRES_ACTION" } } }, "api_name": "admin", "minimum_api_version": "2023-10", "maximum_api_version": "unstable", "location": "/components/apps/test/unit/graph_api/admin/product_resource_feedback_test.rb", "curl_example": "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { productResourceFeedback(id: \\\"gid://shopify/Product/1048875085\\\") { feedbackGeneratedAt messages productId productUpdatedAt state } }\"\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n productResourceFeedback(id: \"gid://shopify/Product/1048875085\") {\n feedbackGeneratedAt\n messages\n productId\n productUpdatedAt\n state\n }\n }`,\n);\n\nconst data = await response.json();\n", "ruby_example": "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n query {\n productResourceFeedback(id: \"gid://shopify/Product/1048875085\") {\n feedbackGeneratedAt\n messages\n productId\n productUpdatedAt\n state\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n productResourceFeedback(id: \"gid://shopify/Product/1048875085\") {\n feedbackGeneratedAt\n messages\n productId\n productUpdatedAt\n state\n }\n }`,\n});\n", "php_example": "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n query {\n productResourceFeedback(id: \"gid://shopify/Product/1048875085\") {\n feedbackGeneratedAt\n messages\n productId\n productUpdatedAt\n state\n }\n }\nQUERY;\n\n$response = $client->query([\"query\" => $query]);\n" }, "titleStringKey": "arguments", "inputVariableEntries": [ { "arg": { "name": "id", "description": "The product associated with the resource feedback.", "type": { "kind": "SCALAR", "name": "ID", "list": false, "non_null": true }, "defaultValue": null, "typeSignature": "ID!", "isDeprecated": false, "deprecationReason": null }, "key": "id", "argValue": " \"gid://shopify/Product/1048875085\"", "typeKind": "QUERY" } ] }, { "example": { "type_name": "productresourcefeedback", "title": "Get a product resource feedback record by ID that doesn't exist", "description": "Trying to retrieve a feedback for a non-existent product returns `null`.\n", "query_string": "query {\n productResourceFeedback(id: \"gid://shopify/Product/-1\") {\n feedbackGeneratedAt\n messages\n productId\n productUpdatedAt\n state\n }\n}", "query_arguments": { "id": "gid://shopify/Product/-1" }, "response": { "data": { "productResourceFeedback": null } }, "api_name": "admin", "minimum_api_version": "2023-10", "maximum_api_version": "unstable", "location": "/components/apps/test/unit/graph_api/admin/product_resource_feedback_test.rb", "curl_example": "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { productResourceFeedback(id: \\\"gid://shopify/Product/-1\\\") { feedbackGeneratedAt messages productId productUpdatedAt state } }\"\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n productResourceFeedback(id: \"gid://shopify/Product/-1\") {\n feedbackGeneratedAt\n messages\n productId\n productUpdatedAt\n state\n }\n }`,\n);\n\nconst data = await response.json();\n", "ruby_example": "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n query {\n productResourceFeedback(id: \"gid://shopify/Product/-1\") {\n feedbackGeneratedAt\n messages\n productId\n productUpdatedAt\n state\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n productResourceFeedback(id: \"gid://shopify/Product/-1\") {\n feedbackGeneratedAt\n messages\n productId\n productUpdatedAt\n state\n }\n }`,\n});\n", "php_example": "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n query {\n productResourceFeedback(id: \"gid://shopify/Product/-1\") {\n feedbackGeneratedAt\n messages\n productId\n productUpdatedAt\n state\n }\n }\nQUERY;\n\n$response = $client->query([\"query\" => $query]);\n" }, "titleStringKey": "arguments", "inputVariableEntries": [ { "arg": { "name": "id", "description": "The product associated with the resource feedback.", "type": { "kind": "SCALAR", "name": "ID", "list": false, "non_null": true }, "defaultValue": null, "typeSignature": "ID!", "isDeprecated": false, "deprecationReason": null }, "key": "id", "argValue": " \"gid://shopify/Product/-1\"", "typeKind": "QUERY" } ] } ]