How to solve the Error: Cannot find module '../graphql/queries.graphql' or its corresponding type declarations' in an angular project

Viewed 296

I'm working on a serverless app with amplify and angular on AWS. and I'm trying to get information from a DynamoDB table. I'm following a very basic tutorial from AWS to run a simple query using GraphQL from a frontend app using angular. I have a problem with the next imports:

import * as queries from '../graphql/queries';

import { ListRestaurants } from '../graphql/queries.graphql';

I getting this error:

Error: src/app/app.component.ts:9:33 - error TS2307: Cannot find module '../graphql/queries.graphql' or its corresponding type declarations.

This is the image of the error:

enter image description here

any advice would be great.

0 Answers
Related