Currently, I am incorporating TypeScript into my project and have a GraphQL query definition that utilizes Apollo's useQuery. According to the documentation, the call should be typed, however, I am encountering an ESLint error regarding data
being assigned as type any
. How can I go about resolving this issue?
export const listProducerOrgStewards = gql`
query listProducerOrgStewards($user: String) {
listProducerOrgStewards(user: $user) {
...
}
`;
const { loading, data, error } = useQuery(listProducerOrgStewards, {
fetchPolicy: 'cache-and-network',
});