Setup GraphQL Code Generator (#74)

* chore: add types of schema

* Ease codegen use on FE

* chore: ignore prettier in generated files

* lint: generated files

* feature: strongly type filter of query

* chore: ignore generated files in prettier

* chore: eslint ignore generated files

---------

Co-authored-by: Sammy Teillet <sammy.teillet@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Charles Bochet
2023-04-25 17:25:30 +02:00
committed by GitHub
parent a93c92c65c
commit ae7bad65ca
13 changed files with 13478 additions and 30 deletions

View File

@ -33,7 +33,8 @@
"storybook": "storybook dev -p 6006 -s public",
"build-storybook": "storybook build -s public",
"coverage": "react-scripts test --coverage --watchAll",
"coverage-ci": "react-scripts test --coverage --watchAll=false"
"coverage-ci": "react-scripts test --coverage --watchAll=false",
"graphql-generate": "REACT_APP_GRAPHQL_ADMIN_SECRET=$REACT_APP_GRAPHQL_ADMIN_SECRET graphql-codegen --config codegen.js"
},
"eslintConfig": {
"extends": [
@ -80,6 +81,10 @@
]
},
"devDependencies": {
"@graphql-codegen/cli": "^3.3.1",
"@graphql-codegen/typescript": "^3.0.4",
"@graphql-codegen/typescript-operations": "^3.0.4",
"@graphql-codegen/typescript-react-apollo": "^3.3.7",
"@storybook/addon-actions": "^7.0.2",
"@storybook/addon-essentials": "^7.0.2",
"@storybook/addon-interactions": "^7.0.2",