Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Refactor TypeScript plugins #1353

Merged
merged 178 commits into from
Mar 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
178 commits
Select commit Hold shift + click to select a range
6b5689e
WIP, move common visitor to separate package, clear flow package, add…
dotansimha Feb 25, 2019
0af742f
fix other flow plugin
dotansimha Feb 25, 2019
0024359
rebase without flow code
dotansimha Feb 25, 2019
812ca81
wip typescript package
dotansimha Feb 25, 2019
fa1ed3d
added validation for ts files
dotansimha Feb 25, 2019
72e83d5
wip
dotansimha Feb 25, 2019
c039ea3
done with basic typescript package
dotansimha Feb 26, 2019
65b7b03
WIP: move all common code from flow-documents.
dotansimha Feb 26, 2019
829e464
all green on typescript-documents and flow-documents
dotansimha Feb 26, 2019
86b0bd7
added tsc compilation to tests
dotansimha Feb 26, 2019
e431c8c
fix for arguments and variables
dotansimha Feb 26, 2019
2d1648b
wip resolvers
dotansimha Feb 27, 2019
4b3858b
implement common resolvers package
dotansimha Feb 28, 2019
af84418
fixed tests for typescript packages
dotansimha Feb 28, 2019
4d387c0
added missing features for typescript plugin
dotansimha Feb 28, 2019
966a535
added missing features
dotansimha Feb 28, 2019
35695be
added immutableTypes to typescript-documents
dotansimha Feb 28, 2019
d806787
fixes
dotansimha Feb 28, 2019
a11748a
update versions
dotansimha Mar 1, 2019
f085605
update lock file
dotansimha Mar 1, 2019
e884404
#1369 Duplicated type when fields are named the same as operation types
kamilkisiela Mar 1, 2019
1cbb746
#1380 Include __typename in fragments and metadata fields
kamilkisiela Mar 1, 2019
8c44d99
#1355 apply typesPrefix to enums in typescript-documents
kamilkisiela Mar 1, 2019
eadbfc9
refactor graphql-codegen-typescript-graphql-files-modules
dotansimha Mar 3, 2019
53b1327
wip
dotansimha Mar 4, 2019
59e566c
WIP
dotansimha Mar 4, 2019
715ea23
wip react-apollo
dotansimha Mar 4, 2019
02a4e93
wip react-apollo
dotansimha Mar 4, 2019
1f03407
fixes for react-apollo
dotansimha Mar 5, 2019
65b6c28
removed old code
dotansimha Mar 5, 2019
eb2446f
removed old example
dotansimha Mar 5, 2019
6d489df
added ts compilation to tests
dotansimha Mar 5, 2019
e5ee2e0
fixes
dotansimha Mar 5, 2019
ae4be8a
done with apollo angular
dotansimha Mar 5, 2019
40838b9
fix ci
dotansimha Mar 5, 2019
ef03340
Add IResolvers & IDirectiveResolvers
ardatan Mar 5, 2019
3c236f8
Fix flow
ardatan Mar 5, 2019
4e88769
#1400 Include used introspection types in based on documents
kamilkisiela Mar 5, 2019
ce418f6
Add Scalars to IResolvers
ardatan Mar 5, 2019
0502039
Fix IDirectiveResolvers
ardatan Mar 5, 2019
7ce6a6f
Naming convention
kamilkisiela Mar 5, 2019
2f6d69d
Apply Naming Convention to flow
kamilkisiela Mar 5, 2019
e619b89
Include objects
kamilkisiela Mar 5, 2019
0f9088f
Fix missing types and enums
kamilkisiela Mar 5, 2019
3b09205
Lazy Dotan
kamilkisiela Mar 5, 2019
0517f4c
Fix kind
kamilkisiela Mar 5, 2019
7293787
Fix tests
ardatan Mar 5, 2019
be0548e
Fix an issue with double prefix
kamilkisiela Mar 5, 2019
5933da9
Fix incorrect test in flow-documents
kamilkisiela Mar 5, 2019
86355be
Fix double i
kamilkisiela Mar 5, 2019
26f3503
Fix DirectiveResolver signature
ardatan Mar 5, 2019
d41b704
fix stupid mistake
kamilkisiela Mar 5, 2019
ba991e7
Fix ts-documents ii issue
kamilkisiela Mar 5, 2019
c608c62
update lockfile
dotansimha Mar 6, 2019
1690e3e
Refactor stencil-apollo
ardatan Mar 6, 2019
6863e55
Merge pull request #1419 from dotansimha/refactor/stencil-apollo
ardatan Mar 6, 2019
dccbd43
Enable tree-shaking
ardatan Mar 6, 2019
a4067f8
Introduce graphql-codegen-testing
ardatan Mar 6, 2019
a00131b
Remove old templates
ardatan Mar 7, 2019
19a5d6b
remove esModuleInterop and use dynamic import instead of require to i…
ardatan Mar 7, 2019
3121e7f
WIP, move common visitor to separate package, clear flow package, add…
dotansimha Feb 25, 2019
ad32bf0
fix other flow plugin
dotansimha Feb 25, 2019
638f68d
rebase without flow code
dotansimha Feb 25, 2019
44b80d7
wip typescript package
dotansimha Feb 25, 2019
72f756b
added validation for ts files
dotansimha Feb 25, 2019
7b62aef
wip
dotansimha Feb 25, 2019
0a97949
done with basic typescript package
dotansimha Feb 26, 2019
a77ccb7
WIP: move all common code from flow-documents.
dotansimha Feb 26, 2019
0b943c1
all green on typescript-documents and flow-documents
dotansimha Feb 26, 2019
d6cf20f
added tsc compilation to tests
dotansimha Feb 26, 2019
04f696e
fix for arguments and variables
dotansimha Feb 26, 2019
3232329
wip resolvers
dotansimha Feb 27, 2019
978d0d2
implement common resolvers package
dotansimha Feb 28, 2019
c87152b
fixed tests for typescript packages
dotansimha Feb 28, 2019
45b2e4e
added missing features for typescript plugin
dotansimha Feb 28, 2019
a326c17
added missing features
dotansimha Feb 28, 2019
2396ace
added immutableTypes to typescript-documents
dotansimha Feb 28, 2019
be0d009
fixes
dotansimha Feb 28, 2019
32bbb7a
update versions
dotansimha Mar 1, 2019
a0f0188
update lock file
dotansimha Mar 1, 2019
28fe025
#1369 Duplicated type when fields are named the same as operation types
kamilkisiela Mar 1, 2019
009665e
#1380 Include __typename in fragments and metadata fields
kamilkisiela Mar 1, 2019
d8a3362
#1355 apply typesPrefix to enums in typescript-documents
kamilkisiela Mar 1, 2019
a520fbc
refactor graphql-codegen-typescript-graphql-files-modules
dotansimha Mar 3, 2019
913de21
wip
dotansimha Mar 4, 2019
29a5c1c
WIP
dotansimha Mar 4, 2019
f2940ff
wip react-apollo
dotansimha Mar 4, 2019
455f536
wip react-apollo
dotansimha Mar 4, 2019
99b312a
fixes for react-apollo
dotansimha Mar 5, 2019
86eaf3e
removed old code
dotansimha Mar 5, 2019
d202f0f
removed old example
dotansimha Mar 5, 2019
d54472b
added ts compilation to tests
dotansimha Mar 5, 2019
95c6010
fixes
dotansimha Mar 5, 2019
927c47b
done with apollo angular
dotansimha Mar 5, 2019
f83c13f
fix ci
dotansimha Mar 5, 2019
1032441
Add IResolvers & IDirectiveResolvers
ardatan Mar 5, 2019
c4eb825
Fix flow
ardatan Mar 5, 2019
076fbf5
#1400 Include used introspection types in based on documents
kamilkisiela Mar 5, 2019
00b25b7
Add Scalars to IResolvers
ardatan Mar 5, 2019
06a8adf
Fix IDirectiveResolvers
ardatan Mar 5, 2019
bdefc7e
Naming convention
kamilkisiela Mar 5, 2019
1551b89
Apply Naming Convention to flow
kamilkisiela Mar 5, 2019
baaa2e4
Include objects
kamilkisiela Mar 5, 2019
e3873d7
Fix missing types and enums
kamilkisiela Mar 5, 2019
776da58
Lazy Dotan
kamilkisiela Mar 5, 2019
2fea7f2
Fix kind
kamilkisiela Mar 5, 2019
adb2f63
Fix tests
ardatan Mar 5, 2019
802255c
Fix an issue with double prefix
kamilkisiela Mar 5, 2019
0da9e35
Fix incorrect test in flow-documents
kamilkisiela Mar 5, 2019
854e358
Fix double i
kamilkisiela Mar 5, 2019
fe7ea6b
Fix DirectiveResolver signature
ardatan Mar 5, 2019
fbf59ce
fix stupid mistake
kamilkisiela Mar 5, 2019
32e9e5b
Fix ts-documents ii issue
kamilkisiela Mar 5, 2019
8c4a495
update lockfile
dotansimha Mar 6, 2019
9a9a205
Make sure bug with useFlowReadOnlyTypes on Enums is fixed #1413
kamilkisiela Mar 6, 2019
67644ee
Refactor stencil-apollo
ardatan Mar 6, 2019
e0a0ea7
wip mongo
dotansimha Mar 11, 2019
3505b21
Merge branch 'refactor/typescript' of github.com:dotansimha/graphql-c…
ardatan Mar 11, 2019
28b2921
fix
ardatan Mar 11, 2019
83524b7
Merge branch 'refactor/typescript' into refactor/tree-shaking
ardatan Mar 11, 2019
a6eded5
fixes
dotansimha Mar 11, 2019
05886e4
fixes
ardatan Mar 11, 2019
f78652f
Merge branch 'refactor/typescript' of github.com:dotansimha/graphql-c…
ardatan Mar 11, 2019
34e4082
cleanup
dotansimha Mar 11, 2019
6ec94bd
empty commit
dotansimha Mar 11, 2019
c197dd8
fix
dotansimha Mar 11, 2019
88c21dc
gql-gen init
kamilkisiela Mar 11, 2019
eaadb84
Merge branch 'refactor/typescript' of github.com:dotansimha/graphql-c…
kamilkisiela Mar 11, 2019
14dc463
fix
ardatan Mar 11, 2019
8cfde08
Merge branch 'refactor/typescript' of github.com:dotansimha/graphql-c…
ardatan Mar 11, 2019
5d4e608
Merge branch 'refactor/typescript' into refactor/tree-shaking
ardatan Mar 11, 2019
b8a815c
Merge pull request #1417 from dotansimha/apply/init
dotansimha Mar 11, 2019
0d1c696
remove all pretest scripts
dotansimha Mar 11, 2019
2da4f26
Support schema stitching in typescript-resolvers
kamilkisiela Mar 11, 2019
aee3ac6
Merge pull request #1439 from dotansimha/feat/resolvers-stitching
dotansimha Mar 11, 2019
2d4a70f
Schema Definition Object was printed as object
kamilkisiela Mar 11, 2019
3f859ab
Merge pull request #1441 from dotansimha/fix/schema-definition-as-object
dotansimha Mar 11, 2019
6f654a3
WIP mongo plugin
dotansimha Mar 12, 2019
813c8d3
Merge branch 'refactor/typescript' of github.com:dotansimha/graphql-c…
dotansimha Mar 12, 2019
7276237
No core package
kamilkisiela Mar 12, 2019
02a522e
Old stuff
kamilkisiela Mar 12, 2019
82e27c4
comment
kamilkisiela Mar 12, 2019
df8aa0d
Merge pull request #1446 from dotansimha/refactor/no-core
dotansimha Mar 12, 2019
f5d41c9
fix graphql dep conflict for jest
ardatan Mar 12, 2019
b9599e1
Merge branch 'refactor/typescript' of github.com:dotansimha/graphql-c…
ardatan Mar 12, 2019
9114d18
Merge branch 'refactor/typescript' into refactor/tree-shaking
ardatan Mar 12, 2019
f7d3368
DONE
ardatan Mar 12, 2019
d823090
Optimize website for lazy-loading
ardatan Mar 12, 2019
3e3181f
Fix custom plugin loading
ardatan Mar 12, 2019
22e1155
Add cjs proxy to flow-operations
ardatan Mar 12, 2019
fdbb791
Update examples
ardatan Mar 12, 2019
2b103fb
Fix Stencil-Apollo demo
ardatan Mar 12, 2019
52db8d2
Use graphql-codegen-testing for mongodb plugin
ardatan Mar 12, 2019
cbaa90b
Merge pull request #1420 from dotansimha/refactor/tree-shaking
dotansimha Mar 13, 2019
df8117c
Merge branch 'master' into refactor/typescript
dotansimha Mar 13, 2019
4551613
fixes
dotansimha Mar 13, 2019
e359e2c
fixes
dotansimha Mar 13, 2019
8a247e2
Docs WIP
kamilkisiela Mar 12, 2019
7c247a8
More docs
kamilkisiela Mar 13, 2019
8e3376c
Repo's readme
kamilkisiela Mar 13, 2019
16bda3d
added tests
dotansimha Mar 14, 2019
8cc09fa
Merge branch 'master' into refactor/typescript
dotansimha Mar 14, 2019
6f29999
Merge pull request #1447 from dotansimha/refactor/docs
dotansimha Mar 14, 2019
825c889
update docs
dotansimha Mar 14, 2019
515e2e1
Generate different bundles instead of esm package (#1460)
ardatan Mar 14, 2019
ddf5d60
cleanup for jest config
dotansimha Mar 14, 2019
411d62e
Merge branch 'refactor/typescript' of github.com:dotansimha/graphql-c…
dotansimha Mar 14, 2019
37f8ada
move testing package to utils dir
dotansimha Mar 14, 2019
ec24200
Move part of logic into a separate package (#1458)
kamilkisiela Mar 14, 2019
c22538c
Merge branch 'refactor/typescript' of github.com:dotansimha/graphql-c…
dotansimha Mar 14, 2019
c69ca8b
Remove old-templates (#1461)
kamilkisiela Mar 14, 2019
4859306
fixes
dotansimha Mar 14, 2019
d705104
Merge branch 'refactor/typescript' of github.com:dotansimha/graphql-c…
dotansimha Mar 14, 2019
bc19151
remove old changelog file
dotansimha Mar 14, 2019
56111db
Merge branch 'master' into refactor/typescript
dotansimha Mar 14, 2019
e1c06b8
update lockfile
dotansimha Mar 14, 2019
1ce660a
fixes and cleanup
dotansimha Mar 14, 2019
f30ac65
fixes
dotansimha Mar 14, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
377 changes: 1 addition & 376 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ If you don't want to use the wizard, create a basic `codegen.yml` configuration
schema: http://localhost:3000/graphql
generates:
src/types.ts:
- typescript-common
- typescript
- typescript-server
```

Expand Down
9 changes: 0 additions & 9 deletions dev-test/codegen-watch.yml

This file was deleted.

144 changes: 50 additions & 94 deletions dev-test/codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ generates:
schema: ./dev-test/test-schema/schema-text.js
plugins:
- add: // tslint:disable
- typescript-common
- typescript-server
- typescript
- typescript-resolvers
./dev-test/test-schema/flow-types.flow.js:
schema: ./dev-test/test-schema/schema.json
Expand All @@ -16,30 +15,26 @@ generates:
schema: ./dev-test/test-schema/schema-with-root.graphql
plugins:
- add: // tslint:disable
- typescript-common
- typescript-server
- typescript
- typescript-resolvers
./dev-test/test-schema/typings.ts:
schema: ./dev-test/test-schema/schema.json
plugins:
- add: // tslint:disable
- typescript-common
- typescript-server
- typescript
- typescript-resolvers
./dev-test/test-schema/typings.avoidOptionals.ts:
schema: ./dev-test/test-schema/schema.json
config:
avoidOptionals: true
plugins:
- typescript-common
- typescript-server
- typescript
./dev-test/test-schema/typings.immutableTypes.ts:
schema: ./dev-test/test-schema/schema.json
config:
imutableTypes: true
plugins:
- typescript-common
- typescript-server
- typescript
./dev-test/githunt/graphql-declared-modules.d.ts:
schema: ./dev-test/githunt/schema.json
documents: ./dev-test/githunt/**/*.graphql
Expand All @@ -51,153 +46,114 @@ generates:
documents: ./dev-test/githunt/**/*.graphql
plugins:
- flow
- flow-documents
- flow-operations
./dev-test/githunt/types.ts:
schema: ./dev-test/githunt/schema.json
documents: ./dev-test/githunt/**/*.graphql
plugins:
- typescript-common
- typescript-client
- typescript
- typescript-operations
./dev-test/githunt/types.enumsAsTypes.ts:
schema: ./dev-test/githunt/schema.json
documents: ./dev-test/githunt/**/*.graphql
config:
enumsAsTypes: true
plugins:
- typescript-common
- typescript-client
- typescript
- typescript-operations
./dev-test/githunt/types.d.ts:
schema: ./dev-test/githunt/schema.json
documents: ./dev-test/githunt/**/*.graphql
config:
enumsAsTypes: true
plugins:
- typescript-common
- typescript-client
- typescript
- typescript-operations
./dev-test/githunt/types.avoidOptionals.ts:
schema: ./dev-test/githunt/schema.json
documents: ./dev-test/githunt/**/*.graphql
config:
avoidOptionals: true
plugins:
- typescript-common
- typescript-client
- typescript
- typescript-operations
./dev-test/githunt/types.immutableTypes.ts:
schema: ./dev-test/githunt/schema.json
documents: ./dev-test/githunt/**/*.graphql
config:
immutableTypes: true
plugins:
- typescript-common
- typescript-client
./dev-test/githunt/types.noNamespaces.ts:
- typescript
- typescript-operations
./dev-test/githunt/types.reactApollo.tsx:
schema: ./dev-test/githunt/schema.json
documents: ./dev-test/githunt/**/*.graphql
config:
noNamespaces: true
plugins:
- typescript-common
- typescript-client
./dev-test/githunt/types.reactApollo.tsx:
- add: // tslint:disable
- typescript
- typescript-operations
- typescript-react-apollo
./dev-test/githunt/types.reactApollo.hooks.tsx:
schema: ./dev-test/githunt/schema.json
documents: ./dev-test/githunt/**/*.graphql
plugins:
- add: // tslint:disable
- typescript-common
- typescript-client
- typescript
- typescript-operations
- typescript-react-apollo
./dev-test/githunt/types.reactApollo.noNamespaces.tsx:
config:
withHooks: true
./dev-test/githunt/types.stencilApollo.tsx:
schema: ./dev-test/githunt/schema.json
documents: ./dev-test/githunt/**/*.graphql
config:
noNamespaces: true
plugins:
- add: // tslint:disable
- typescript-common
- typescript-client
- typescript-react-apollo
- typescript
- typescript-operations
- typescript-stencil-apollo
./dev-test/githunt/types.stencilApollo.class.tsx:
schema: ./dev-test/githunt/schema.json
documents: ./dev-test/githunt/**/*.graphql
plugins:
- add: // tslint:disable
- typescript
- typescript-operations
- typescript-stencil-apollo
config:
componentType: class
./dev-test/star-wars/types.ts:
schema: ./dev-test/star-wars/schema.json
documents: ./dev-test/star-wars/**/*.graphql
plugins:
- typescript-common
- typescript-client
./dev-test/star-wars/types.uppercase-enums.ts:
schema: ./dev-test/star-wars/schema.json
plugins:
- add: // tslint:disable
- typescript-common
- typescript-server
config:
namingConvention:
default: change-case#pascalCase
enumValues: change-case#upperCase
- typescript
- typescript-operations
./dev-test/star-wars/types.d.ts:
schema: ./dev-test/star-wars/schema.json
documents: ./dev-test/star-wars/**/*.graphql
config:
enumsAsTypes: true
plugins:
- typescript-common
- typescript-client
- typescript
- typescript-operations
./dev-test/star-wars/types.avoidOptionals.ts:
schema: ./dev-test/star-wars/schema.json
documents: ./dev-test/star-wars/**/*.graphql
config:
avoidOptionals: true
plugins:
- typescript-common
- typescript-client
- typescript
- typescript-operations
./dev-test/star-wars/types.immutableTypes.ts:
schema: ./dev-test/star-wars/schema.json
documents: ./dev-test/star-wars/**/*.graphql
config:
immutableTypes: true
plugins:
- typescript-common
- typescript-client
./dev-test/star-wars/types.noNamespaces.ts:
schema: ./dev-test/star-wars/schema.json
documents: ./dev-test/star-wars/**/*.graphql
config:
immutableTypes: true
plugins:
- typescript-common
- typescript-client
- typescript
- typescript-operations
./dev-test/star-wars/types.skipSchema.ts:
schema: ./dev-test/star-wars/schema.json
documents: ./dev-test/star-wars/**/*.graphql
plugins:
- typescript-common
- typescript-client
./dev-test/test-message/types.reactApollo.noNamespaces.tsx:
schema: ./dev-test/test-message/schema.graphql
documents: ./dev-test/test-message/documents.ts
config:
noNamespaces: true
plugins:
- add: // tslint:disable
- typescript-common
- typescript-client
- typescript-react-apollo
./dev-test/test-message/types.stencilApollo.noNamespaces.tsx:
schema: ./dev-test/test-message/schema.graphql
documents: ./dev-test/test-message/documents.ts
config:
noNamespaces: true
plugins:
- add: // tslint:disable
- typescript-common
- typescript-client
- typescript-stencil-apollo
./dev-test/test-mongodb/types.ts:
schema: ./dev-test/test-mongodb/schema.graphql
config:
scalars:
Date: Date
plugins:
- add: // tslint:disable
- typescript-common
- typescript-server
- typescript-mongodb
- typescript-resolvers
- typescript
- typescript-operations
2 changes: 1 addition & 1 deletion dev-test/generate-all.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#/bin/sh

node packages/graphql-codegen-cli/dist/cli.js --config ./dev-test/codegen.yml
node packages/graphql-codegen-cli/dist/commonjs/cli.js --config ./dev-test/codegen.yml
2 changes: 1 addition & 1 deletion dev-test/generate-watch.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#/bin/sh

node packages/graphql-codegen-cli/dist/cli.js --config ./dev-test/codegen-watch.yml
node packages/graphql-codegen-cli/dist/commonjs/cli.js --config ./dev-test/codegen.yml -w
Loading