TypeError: Cannot read property 'location' of undefined
Closed this issue · 3 comments
lynnic26 commented
const typeDefs = await importSchema('./schema.graphql');
version: graphql-import@v1.0.0-beta.2
surfjedi commented
Yes I am having this same error if the schema.graphql is not a sibling of the file(main.ts) that has "const typeDefs = await importSchema('../schema.graphql');" in it...
But I can get it to work by removing "../" in the file path and copying the "schema.graphql" file to the same directory as main.ts..
as in this:
"const typeDefs = await importSchema('schema.graphql');
NOTE: @lynnic26 mine desired file path is slightly off from yours I have issues with "../" as yorus appears to be "./"