Skip to content

Commit 0ec8c4b

Browse files
authored
refactor: make graphql schema first (#724)
1 parent cddbd7e commit 0ec8c4b

File tree

24 files changed

+4560
-1261
lines changed

24 files changed

+4560
-1261
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports = {
1515
'prettier',
1616
],
1717
plugins: ['import', 'unicorn', 'unused-imports', 'rulesdir', 'simple-import-sort'],
18-
ignorePatterns: ['**/dist/*', 'lib/generated/**/*', 'coverage/**/*'],
18+
ignorePatterns: ['**/dist/*', 'lib/generated/**/*', 'coverage/**/*', '**/__generated__/**'],
1919
env: {
2020
browser: false,
2121
node: true,

.graphqlrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
schema: ./lib/graphql/schema.gen.graphql
1+
schema: ./lib/graphql/schema.graphql

codegen.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import type { CodegenConfig } from '@graphql-codegen/cli';
2+
3+
const config: CodegenConfig = {
4+
overwrite: true,
5+
schema: 'lib/graphql/schema.graphql',
6+
config: {
7+
contextType: '@app/lib/graphql/context.ts#Context',
8+
},
9+
generates: {
10+
'lib/graphql/__generated__/resolvers.ts': {
11+
plugins: ['typescript', 'typescript-resolvers'],
12+
},
13+
// "./graphql.schema.json": {
14+
// plugins: ["introspection"]
15+
// }
16+
},
17+
};
18+
19+
export default config;

0 commit comments

Comments
 (0)