graphql-let
graphql-let copied to clipboard
fail to builddev or with webpack example - You may need an additional loader to handle the result of these loaders.
Hi there, I'm trying to build the with-typescript-graphql nextjs example but it fails.
Problem
The problem is in next.config.js during the schema loader process.
Error message at build times
I tried multiple rules sets but they all return the same result:
You may need an additional loader to handle the result of these loaders.
> type X {
| id: ID
| title: String
Import trace for requested module:
./lib/schema.ts
./lib/apollo.ts
./pages/_app.tsx
What I tried
I've tried webpack config from your README:
config.module.rules.push({
test: /\.(tsx|graphql)$/,
use: [
{
loader: "babel-loader",
options: {
presets: ["@babel/preset-typescript", "@babel/preset-react"],
},
},
{ loader: "graphql-let/loader" },
],
});
But also :
config.module.rules.push({
test: /\.graphqls$/,
exclude: /node_modules/,
use: ["graphql-let/schema/loader"],
The rest of config files are exactly the same as the ones as in the README.
If you have any idea where things went south... Thanks.