mutation UpdateProductReview($id: ID!, $reviews: String!) {
metaobjectUpdate(
id: $id
metaobject: {fields: [{key: “anotherreview”, value: $reviews}]}
) {
userErrors {
field
message
code
}
metaobject {
handle
field(key: “anotherreview”) {
value
}
}
}
metaobjectDelete(id: “”)
}
in the shopify admin while testing the mutation it was working fine but it was not working while integrating it with the react in the vs code
getting the error as In Hydrogen’s storefront.mutation: │
│ │
│ Field ‘metaobjectUpdate’ doesn’t exist on type ‘Mutation’ │
│ Request ID: e02fde09-45c6-4a5d-b8b1-aa03f54b9bed-1727261032 │
│ │
│ To debug the mutation UpdateProductReview, try it in GraphiQL ( │
│ [http://localhost:3000/graphiql?query=mutation%20UpdateProductReview(%24id%3A%](http://localhost:3000/graphiql?query=mutation%20UpdateProductReview(%24id%3A%) │
│ 20ID!%2C%20%24reviews%3A%20String!)%20%7B%20metaobjectUpdate(id%3A%20%24id%2C │
│ %20metaobject%3A%20%7B%20fields%3A%20%5B%7B%20key%3A%20%22anotherreview%22%2C │
│ %20value%3A%20%24reviews%20%7D%5D%20%7D)%20%7B%20metaobject%20%7B%20id%20hand │
│ le%20field(key%3A%20%22anotherreview%22)%20%7B%20value%20%7D%20%7D%20userErro │
│ rs%20%7B%20field%20message%20code%20%7D%20%7D%20%7D&variables=%7B%22id%22%3A% │
│ 22gid%3A%2F%2Fshopify%2FMetaobject%2F63724060971%22%2C%22reviews%22%3A%22%5B% │
│ 7B%5C%22name%5C%22%3A%5C%22manish%20reddy%5C%22%2C%5C%22email%5C%22%3A%5C%22j │
│ ohn.doe%40example.com%5C%22%2C%5C%22headline%5C%22%3A%5C%22Great%20Product!%5 │
│ C%22%2C%5C%22rating%5C%22%3A5%2C%5C%22description%5C%22%3A%5C%22This%20produc │
│ t%20exceeded%20my%20expectations.%5C%22%7D%5D%22%7D ). │
│ │
│ To investigate the issue, examine this stack trace: │
│ at loadCriticalData (app/routes/($locale).products.$handle.tsx:168) │
│ at loader (app/routes/($locale).products.$handle.tsx:49) │
│ at callRouteLoader (.vite/deps_ssr/@remix-run_server-runtime.js:3134) │
│ at (.vite/deps_ssr/@remix-run_server-runtime.js:2019) │
│ at callLoaderOrAction (.vite/deps_ssr/@remix-run_server-runtime.js:2079) │
│ at all │
│ at callDataStrategyImpl (.vite/deps_ssr/@remix-run_server-runtime.js:1973) │
│ at callDataStrategy (.vite/deps_ssr/@remix-run_server-runtime.js:1868) │
│ │
╰───────────────────────────────────────
