accords-library.com/graphql-codegen.config.js

25 lines
555 B
JavaScript
Raw Normal View History

const { loadEnvConfig } = require("@next/env");
loadEnvConfig(process.cwd());
module.exports = {
overwrite: true,
schema: {
[process.env.URL_GRAPHQL]: {
headers: { Authorization: `Bearer ${process.env.ACCESS_TOKEN}` },
},
},
2022-03-31 13:01:44 +00:00
documents: [
2022-08-27 15:03:05 +00:00
"src/graphql/operations/**/*.graphql",
2022-03-31 13:01:44 +00:00
"src/graphql/fragments/*.graphql",
],
generates: {
"src/graphql/generated.ts": {
plugins: [
"typescript",
"typescript-operations",
"typescript-graphql-request",
],
},
},
};