init
This commit is contained in:
22
graphql.config.ts
Normal file
22
graphql.config.ts
Normal 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}`,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user