Skip to content

Commit

Permalink
fix: twenty-chrome-extension:"graphql:generate" (twentyhq#5649)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaPimpalkar committed May 29, 2024
1 parent df2b76f commit 008813f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/twenty-chrome-extension/codegen.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
import { CodegenConfig } from '@graphql-codegen/cli';

const config: CodegenConfig = {
schema: ['http://localhost:3000/graphql'],
schema: [{
[`${import.meta.env.VITE_SERVER_BASE_URL}/graphql`]: {
// some of the mutations and queries require authorization (people or companies)
// so to regenrate the schema with types we need to pass a auth token
headers: {
Authorization: 'YOUR-TOKEN-HERE',
},
}
}],
overwrite: true,
documents: ['./src/**/*.ts', '!src/generated/**/*.*'],
documents: ['./src/**/*.ts', '!src/generated/**/*.*' ],
generates: {
'./src/generated/graphql.tsx': {
plugins: [
Expand Down

0 comments on commit 008813f

Please sign in to comment.