This commit is contained in:
2025-02-18 09:19:28 +08:00
commit 0f576d5480
9 changed files with 359 additions and 0 deletions

22
graphql.config.ts Normal file
View File

@@ -0,0 +1,22 @@
import dotenv from 'dotenv';
dotenv.config();
// .graphqlrc.ts or graphql.config.ts
export default {
projects: {
directus: {
schema: process.env.GRAPHQL_ENDPOINT_WITH_TOKEN,
documents: ['src/**/*.{graphql,js,ts,jsx,tsx}'],
extensions: {
endpoints: {
default: {
url: process.env.GRAPHQL_ENDPOINT,
headers: {
Authorization: `Bearer ${process.env.API_TOKEN}`,
},
},
},
},
},
},
};