Hi via storefront API, I am trying to get recommended products, only every time I get this error: GraphqlQueryError: Variable $productId of type ID! was provided invalid value.
My code
obj.id="gid://shopify/Product/1234567890";
let response = await storefront.graphql(
`#graphql
query productRecommendations($productId: ID!) {
productRecommendations(productId: $productId) {
id
}
}`,
{
productId: obj.id
}
);
Can you help me solve it?
Every time I try to run it it also gives me an error in the form of a Response object, but I can never access its values, do you also know how to access the values to better display the error?
I use the 2024-10 release