Erro | 500 GraphQL

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,

Hi Gabriel,

Which app are you trying to run this query in? If it’s a custom app, my recommendation would be to validate the manifest as described in the error.

If it’s a native app, are you able to replicate the error in the GraphQL IDE inside the admin?

Eduardo Luciano
Field Software Engineer | VTEX

Opa,
In the end there were 2 errors, the dependencies (by deleting node_modules and doing a rebuild on the app, the error went away.) and react-apollo also returning 500, which I fixed by changing the type of the id in the parameters from number to ID!.

query products($id: number) {...} 
 ->
query products($id: ID!) {...}