Good morning everyone,
Basically I’m trying to run a pretty basic query to fetch information about a specific product on the home page, but I keep getting a 500 error when I try to execute the query:
- product.gql -
query products($id: number) {
product(identifier: {field:id, value:$id}) @context(provider: "vtex.search-graphql"){
productName,
link,
productId,
items {
images {
imageUrl
}
}
}
}
----------------
import { useQuery } from 'react-apollo';
const { loading, error, data } = useQuery(GET_PRODUCTS, {
variables: {
id: 347
}
}
---------
ERROR:
"Invalid GraphQL query. "product" was not found in the current schema. Maybe you forgot to list some app dependency for this in xxxx.xxxx@2.0.168's manifest.json?"
-------
manifest.json
"builders": {
"react": "3.x",
"messages": "1.x",
"docs": "0.x",
"store": "0.x"
},
"dependencies": {
"vtex.pages-graphql": "2.x",
"vtex.search-graphql": "0.x"
...
}
Does anyone have any idea what could be causing this?
Regards,