twenty/packages/twenty-front/codegen.cjs
Thomas Trompette f1b3d1537a
Load views on user load and read in cache (#3552)
* WIP

* Poc

* Use cached root query + remove proloaded views state

* Fix storybook test + fix codegen

* Return default schema if token is absent, unauthenticated if token is invalid

* Use enum instead of bool

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-01-22 16:00:16 +01:00

32 lines
764 B
JavaScript

module.exports = {
schema: process.env.REACT_APP_SERVER_BASE_URL + '/graphql',
documents: [
'!./src/modules/object-metadata/**',
'!./src/modules/object-record/**',
'./src/modules/**/*.tsx',
'./src/modules/**/*.ts',
'!./src/**/*.test.tsx',
'!./src/**/__mocks__/*.ts',
'!./src/modules/users/graphql/queries/getCurrentUserAndViews.ts'
],
overwrite: true,
generates: {
'./src/generated/graphql.tsx': {
plugins: [
'typescript',
'typescript-operations',
'typescript-react-apollo',
],
config: {
skipTypename: false,
withHooks: true,
withHOC: false,
withComponent: false,
scalars: {
DateTime: 'string',
},
},
},
},
};