Skip to content

Commit

Permalink
Merge pull request #18 from kgtkr/server-preset
Browse files Browse the repository at this point in the history
Server preset
  • Loading branch information
kgtkr authored Jan 17, 2024
2 parents 3f2d37c + ffc8e6d commit 67e3fef
Show file tree
Hide file tree
Showing 102 changed files with 2,010 additions and 1,513 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
*/**/generated/*
*/**/*.generated.ts
*.js
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
*/**/generated/*
*/**/*.generated.ts
205 changes: 199 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/server/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/dist
/coverage
src/generated/*
*/**/*.generated.ts
19 changes: 19 additions & 0 deletions packages/server/codegen.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { CodegenConfig } from "@graphql-codegen/cli";
import { defineConfig } from "@eddeee888/gcg-typescript-resolver-files";

const config: CodegenConfig = {
schema: "src/schema/**/schema.graphql",
generates: {
"src/schema": defineConfig({
typesPluginsConfig: {
contextType: "../server#AppContext",
optionalResolveType: false,
resolversNonOptionalTypename: false,
},
}),
},
hooks: {
afterAllFileWrite: ["prettier --write"],
},
};
export default config;
36 changes: 0 additions & 36 deletions packages/server/codegen.yml

This file was deleted.

1 change: 1 addition & 0 deletions packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"zod": "^3.18.0"
},
"devDependencies": {
"@eddeee888/gcg-typescript-resolver-files": "^0.7.2",
"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/core": "^4.0.0",
"@graphql-codegen/typescript": "^4.0.1",
Expand Down
Loading

0 comments on commit 67e3fef

Please sign in to comment.