Skip to content

Commit 008813f

Browse files
fix: twenty-chrome-extension:"graphql:generate" (#5649)
fixes: #5645
1 parent df2b76f commit 008813f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

packages/twenty-chrome-extension/codegen.ts

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
import { CodegenConfig } from '@graphql-codegen/cli';
22

33
const config: CodegenConfig = {
4-
schema: ['http://localhost:3000/graphql'],
4+
schema: [{
5+
[`${import.meta.env.VITE_SERVER_BASE_URL}/graphql`]: {
6+
// some of the mutations and queries require authorization (people or companies)
7+
// so to regenrate the schema with types we need to pass a auth token
8+
headers: {
9+
Authorization: 'YOUR-TOKEN-HERE',
10+
},
11+
}
12+
}],
513
overwrite: true,
6-
documents: ['./src/**/*.ts', '!src/generated/**/*.*'],
14+
documents: ['./src/**/*.ts', '!src/generated/**/*.*' ],
715
generates: {
816
'./src/generated/graphql.tsx': {
917
plugins: [

0 commit comments

Comments
 (0)