Skip to content

Commit

Permalink
feat: gcg plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
linbudu599 committed Mar 18, 2022
1 parent 6fa17e3 commit 1f3d12d
Show file tree
Hide file tree
Showing 12 changed files with 8,919 additions and 41 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

tmp

generated

# Runtime data
pids
*.pid
Expand Down
1 change: 0 additions & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
## Hydration(Stage 4)

- Nest
- Apollo Client
- Nest + GraphQL
- MidwayJS + GraphQL
- GCG
Expand Down
52 changes: 26 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,45 @@
{
"name": "pnpm-workspace-starter",
"private": "true",
"version": "1.0.0",
"private": "true",
"keywords": [],
"homepage": "https://github.com/LinbuduLab/pnpm-workspace-example#readme",
"bugs": {
"url": "https://github.com/LinbuduLab/pnpm-workspace-example/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/LinbuduLab/pnpm-workspace-example.git"
},
"license": "MIT",
"author": "linbudu599",
"scripts": {
"build:all": "pnpm run build -r --filter='pw-*' --if-present",
"ci:publish": "pnpm build:all && pnpm changeset publish",
"ci:version": "changeset version && pnpm install --no-frozen-lockfile && git add .",
"cli": "ts-node -P scripts/tsconfig.script.json scripts/cli.ts",
"cli-dev": "pnpm cli --respawn --transpile-only",
"cs:add": "changeset add",
"cs:version": "changeset version",
"cs:publish": "changeset publish",
"cs:tag": "changeset tag",
"build:all": "pnpm run build -r --filter='pw-*' --if-present",
"docs:dev": "vitepress dev docs",
"cs:version": "changeset version",
"docs:build": "vitepress build docs",
"docs:dev": "vitepress dev docs",
"docs:serve": "vitepress serve docs",
"ci:version": "changeset version && pnpm install --no-frozen-lockfile && git add .",
"ci:publish": "pnpm build:all && pnpm changeset publish",
"remind": "ts-node -P scripts/tsconfig.script.json scripts/postinstall-reminder.ts",
"init:dep": "pnpm install cac fs-extra ora consola execa preferred-pm type-fest chalk enquirer --workspace-root --registry=https://registry.npmmirror.com",
"init:workspace": "pnpm init:dep && pnpm cli cache && pnpm cli init",
"postinstall": "pnpm cli cache && pnpm remind"
"postinstall": "pnpm cli cache && pnpm remind",
"remind": "ts-node -P scripts/tsconfig.script.json scripts/postinstall-reminder.ts"
},
"repository": {
"type": "git",
"url": "git+https://github.com/LinbuduLab/pnpm-workspace-example.git"
"resolutions": {
"@types/eslint": "^7.0.0",
"chalk": "^4.0.0",
"eslint": "^7.0.0",
"execa": "^5.0.0"
},
"keywords": [],
"author": "linbudu599",
"license": "MIT",
"bugs": {
"url": "https://github.com/LinbuduLab/pnpm-workspace-example/issues"
"dependencies": {
"lodash": "^4.17.21"
},
"homepage": "https://github.com/LinbuduLab/pnpm-workspace-example#readme",
"devDependencies": {
"@changesets/cli": "^2.21.0",
"@parcel/packager-raw-url": "2.3.2",
Expand Down Expand Up @@ -62,14 +71,5 @@
"type-fest": "^2.12.0",
"typescript": "^4.6.2",
"vitepress": "^0.22.3"
},
"dependencies": {
"lodash": "^4.17.21"
},
"resolutions": {
"eslint": "^7.0.0",
"@types/eslint": "^7.0.0",
"chalk": "^4.0.0",
"execa": "^5.0.0"
}
}
91 changes: 91 additions & 0 deletions packages/gcg-collections/codegen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
overwrite: true
schema: 'http://localhost:1337/graphql'
documents: 'src/operations/*.graphql'
generates:
src/generated/schema.ts:
plugins:
- 'typescript'
- 'typescript-operations'
- 'typescript-resolvers'
- 'typescript-react-apollo'
src/generated/operations.ts:
plugins:
- 'typescript'
- 'typescript-operations'
- 'typescript-resolvers'
src/generated/react-apollo.ts:
plugins:
- 'typescript'
- 'typescript-react-apollo'

src/generated/fragment-matcher.ts:
plugins:
- 'fragment-matcher'

src/generated/mongodb.ts:
plugins:
- 'typescript'
- 'typescript-mongodb'

src/generated/urql-introspection.ts:
plugins:
- 'urql-introspection'

src/generated/urql.ts:
plugins:
- 'typescript'
- 'typescript-urql'

src/generated/ast.graphql:
plugins:
- 'schema-ast'

src/generated/graphql-request.ts:
plugins:
- 'typescript'
- 'typescript-operations'
- 'typescript-graphql-request'

src/generated/typed-document-node.ts:
plugins:
- 'typescript'
- 'typescript-operations'
- 'typed-document-node'
src/generated/react-query.ts:
plugins:
- typescript
- typescript-operations
- typescript-react-query
config:
strictScalars: false
schema: zod

src/generated/type-graphql.ts:
plugins:
- typescript
- typescript-type-graphql

src/generated/named-operation.ts:
plugins:
- typescript
- typescript-operations
- named-operations-object

src/generated/msw.ts:
plugins:
- typescript
- typescript-operations
- typescript-msw

src/generated/jsdoc.ts:
plugins:
- jsdoc

src/generated/file-modules.d.ts:
plugins:
- 'typescript'
- 'typescript-graphql-files-modules'

./graphql.schema.json:
plugins:
- 'introspection'
Loading

0 comments on commit 1f3d12d

Please sign in to comment.