I have a client-server setup, in which the client(create-react-app) runs on localhost:3000 and the server is an express server which is built on node and I'm attempting to build graphql schema-resolvers setup.
I'm able to import .graphql files on the server, however, on the client side, I'm using this setup by graphql-tools.
When I'm attempting to build the schema-resolvers on the frontend, I'm importing
import { GraphQLFileLoader } from '@graphql-tools/graphql-file-loader';
import { addResolversToSchema } from '@graphql-tools/schema';
import { loadSchema } from '@graphql-tools/load';
...which causes this error:
./node_modules/@graphql-tools/graphql-file-loader/index.mjs Can't import the named export 'AggregateError' from non EcmaScript module (only default export is available)
After researching, I've found out that this is an issue related with webpack.
Is there any resolution to this issue?