I try to import graphql schema with the following code:
import { importSchema } from 'graphql-import'
const typeDefs = importSchema(`./typeDefs/schema.graphql`)
I got an error:
fs.js:114
throw err;
^
Error: ENOENT: no such file or directory, open './schema.graphql'
at Object.openSync (fs.js:443:3)
at Object.readFileSync (fs.js:343:35)
at read (C:\Data\Dev\Yunazon\191121-serv\node_modules\graphql-import\src\index.ts:31:15)
at importSchema (C:\Data\Dev\Yunazon\191121-serv\node_modules\graphql-import\src\index.ts:87:15)
at Object.<anonymous> (C:\Data\Dev\Yunazon\191121-serv\src\graphQL/apolloServer.js:10:18)
What is an issue?