Skip to content

Commit

Permalink
using codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie ⚡ committed Oct 16, 2022
1 parent 133332d commit 8fb639c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 36 deletions.
23 changes: 23 additions & 0 deletions .graphqlrc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import type { IGraphQLProject } from "graphql-config";

const config: IGraphQLProject = {
schema: "graphql/src/schema.graphql",
extensions: {
codegen: {
generates: {
"./graphql/src/__generated__.ts": {
plugins: ["typescript", "typescript-resolvers"],
},
"./ui/src/lib/__generated__.ts": {
documents: "ui/src/lib/*.graphql",
plugins: ["typescript", "typescript-operations", "typescript-graphql-request"],
},
},
hooks: {
afterAllFileWrite: ["prettier --write"],
},
},
},
};

export default config;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"lint": "turbo lint",
"types": "turbo types",
"dev": "turbo dev --parallel",
"generate": "graphql-codegen",
"git": "node scripts/git.mjs",
"clean": "node scripts/clean.mjs --all",
"generate": "node scripts/codegen.mjs",
"seed": "node scripts scripts/seed.mjs",
"db": "node scripts/db.mjs --push",
"format": "pretty-quick --staged"
Expand Down
35 changes: 0 additions & 35 deletions scripts/codegen.mjs

This file was deleted.

0 comments on commit 8fb639c

Please sign in to comment.