diff --git a/CHANGELOG.md b/CHANGELOG.md
index f5464be81cb..dc9d3aaf505 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,376 +1 @@
-## Note: >0.9.2 Releases CHANGELOG moved to GitHub releases
-
-
-
-## [0.9.1](https://github.com/dotansimha/graphql-codegen/compare/0.9.0...0.9.1) (2018-05-08)
-
-- TypeScript template: added missing `readonly` for `__typename` field when generating immutable types
-- TypeScript template: added missing imports for ts-multiple templates when generating fragments
-
-
-
-## [0.9.0](https://github.com/dotansimha/graphql-codegen/compare/0.8.21...0.9.0) (2018-05-07)
-
-- Update all dependencies
-- Fix bugs with document finder ([#233](https://github.com/dotansimha/graphql-code-generator/issues/233), [#216](https://github.com/dotansimha/graphql-code-generator/pull/216))
-- Respect `--out` when generating a project ([#210](https://github.com/dotansimha/graphql-code-generator/pull/210), Thanks @micimize)
-- Automatically registerPartial custom templates without breaking normal partial registration ([#210](https://github.com/dotansimha/graphql-code-generator/pull/210), Thanks @micimize)
-- Make `ts.{ schema, documents }.handlebars` work without a prefix (e.g. `ts.schema.handlebars` => `schema.ts`) ([#210](https://github.com/dotansimha/graphql-code-generator/pull/210), Thanks @micimize)
-- Mark template comments as safe to avoid url escaping ([#210](https://github.com/dotansimha/graphql-code-generator/pull/210), Thanks @micimize)
-- Fixed some links in the docs and add relevant docs for the included changes ([#210](https://github.com/dotansimha/graphql-code-generator/pull/210), Thanks @micimize)
-- Fix export CLI short alias ([#255](https://github.com/dotansimha/graphql-code-generator/pull/255), Thanks @eritikass)
-- Deprecate `--export`, `--file`, `--url` in favor of `--schema` ([#208](https://github.com/dotansimha/graphql-code-generator/pull/208))
-- Added support for a `Promise` as export value ([#208](https://github.com/dotansimha/graphql-code-generator/pull/208))
-- New template! TypeScript typings with MongoDB models!
-- Added support for custom output processor ([#263](https://github.com/dotansimha/graphql-code-generator/issues/263))
-- Better detection of `GraphQLSchema` objects
-- Added programmatic usage ([#288](https://github.com/dotansimha/graphql-code-generator/pull/288))
-- TypeScript generated comments are now `docstring` valid!
-- Added `isNullableArray` and `raw` type name to `ResolvedType` interface.
-- Fixed TypeScript template output: handle nullables correctly (See [#260](https://github.com/dotansimha/graphql-code-generator/issues/260))
-- You can now pass generator-specific config using environment variables with the prefix `CODEGEN_` (See [#260](https://github.com/dotansimha/graphql-code-generator/issues/260))
-- Added `avoidOptionals` option to TypeScript generators (See [#260](https://github.com/dotansimha/graphql-code-generator/issues/260))
-- Added `enumsAsTypes` option to TypeScript generators (See [#260](https://github.com/dotansimha/graphql-code-generator/issues/260))
-- Added `immutableTypes` option to TypeScript generators (See [#260](https://github.com/dotansimha/graphql-code-generator/issues/260))
-
-### BREAKING CHANGES
-
-- `--no-schema` changed to `--skip-schema`
-- `--no-documents` changed to `--skip-documents`
-- **Templates are no longer part of the core package, and they needed to be installed separately (see README installation notes)**
-
-
-
-## [0.8.21](https://github.com/dotansimha/graphql-codegen/compare/0.8.20...0.8.21) (2018-03-17)
-
-- Use default `.ts` extension for TypeScript generatos (instead of `.d.ts`) to avoid errors with enums (Thanks @guilhermehubner)
-- Update some dependencies to the latest version.
-
-
-
-## [0.8.20](https://github.com/dotansimha/graphql-codegen/compare/0.8.19...0.8.20) (2018-03-14)
-
-- Fixed a bug with `gql` detection on TSX files
-
-
-
-## [0.8.19](https://github.com/dotansimha/graphql-codegen/compare/0.8.18...0.8.19) (2018-03-13)
-
-- Ignore commented code in document files
-- Better detection for GraphQL documents usage with `gql` tag.
-- Added prettier support (see README)
-
-
-
-## [0.8.18](https://github.com/dotansimha/graphql-codegen/compare/0.8.16...0.8.18) (2018-03-13)
-
-- Added `__typename` to TypeScript templates, with support for inline fragments.
-- Added `stringify` Handlebars helpers for easy debugging.
-- Codegen compiler: trim templates before using it.
-- Refactor parts of the TypeScript templates
-- Change inline fragments behavior in generated TypeScript code to use `|` instead of `&`.
-- Added `--no-overwrite` flag to skip overwriting existing files
-- Generator will not throw an error if a glob expression does not match any GraphQL document files
-- Generator will not write a file to file system if the content is empty
-
-
-
-## [0.8.16](https://github.com/dotansimha/graphql-codegen/compare/0.8.15...0.8.16) (2018-03-13)
-
-- Handle lists and non-null properly (Thanks @FredyC)
-
-
-
-## [0.8.15](https://github.com/dotansimha/graphql-codegen/compare/0.8.14...0.8.15) (2018-03-13)
-
-- Added support for generator-specific config in `gql-gen.json` file.
-- Generated config is now exposed in the template under the name `config` in the root context.
-- Added `currentTime` to the context.
-- Added support for GraphQL 0.13
-- Updated all dependencies
-- Added support for using custom `require` using `--require` flag (Thanks Jonas Kello)
-- Update TypeScript enum template (Thanks @darthtrevino)
-
-### Breaking Changes
-
-- Changed CLI option that points to `gql-gen.json` file from `--project-config` to `--config`.
-
-
-
-## [0.8.14](https://github.com/dotansimha/graphql-codegen/compare/0.8.12...0.8.14) (2017-10-29)
-
-- (Compiler) Fixed execution context for `ifDirective` and `unlessDirective` (now the parent is also available, no need for `../`)
-- (TypeScript) Fix for nullable types [Fixes #155](https://github.com/dotansimha/graphql-code-generator/issues/155)
-
-
-
-## [0.8.12](https://github.com/dotansimha/graphql-codegen/compare/0.8.11...0.8.12) (2017-09-21)
-
-- Fix for custom templates in an external project that use `.` in result file name (for example: `my-file.d.ts.schema.handlebars`)
-
-
-
-## [0.8.11](https://github.com/dotansimha/graphql-codegen/compare/0.8.10...0.8.11) (2017-09-20)
-
-- Export all available interfaces from the compiler package (Fixes [#144](https://github.com/dotansimha/graphql-code-generator/issues/144)
-- Fixed incorrect typings path (Fixes [#143](https://github.com/dotansimha/graphql-code-generator/issues/143))
-- Simplify fragment emitting for selection sets (Fixes [#139](https://github.com/dotansimha/graphql-code-generator/issues/139))
-- Change TypeScript optional to use `?` instead of `| null` ([#142](https://github.com/dotansimha/graphql-code-generator/pull/142))
-- Allow insecure HTTP requests (Fixes [#137](https://github.com/dotansimha/graphql-code-generator/issues/137))
-
-
-
-## [0.8.10](https://github.com/dotansimha/graphql-codegen/compare/0.8.9...0.8.10) (2017-07-24)
-
-- Fixed bug with relative path for export JS
-
-
-
-## [0.8.9](https://github.com/dotansimha/graphql-codegen/compare/0.8.8...0.8.9) (2017-07-24)
-
-- Fixed bug with relative path for file schema
-
-
-
-## [0.8.8](https://github.com/dotansimha/graphql-codegen/compare/0.8.7...0.8.8) (2017-07-24)
-
-- Added support for custom helpers when generating custom templates
-- Added more Handlebars helpers
-- Some fixed for `ifDirective` helper
-- Updated docs
-
-
-
-## [0.8.7](https://github.com/dotansimha/graphql-codegen/compare/0.8.6...0.8.7) (2017-07-23)
-
-- Fixed issue with remote GraphQL endpoint and custom headers
-
-
-
-## [0.8.6](https://github.com/dotansimha/graphql-codegen/compare/0.8.5...0.8.6) (2017-07-20)
-
-- Fixed issue with loading GraphQLSchema export from JS file
-- Changed `graphql` to be peer dependency to avoid multiple instance of GraphQL
-- Fixed issue with custom templates without prefix name
-
-
-
-## [0.8.5](https://github.com/dotansimha/graphql-codegen/compare/0.8.4...0.8.5) (2017-07-19)
-
-- Fixed issue with missing indicators for variables and selection set node
-- Better imports optimization and detection
-- Removed default file extension for imports builder
-
-
-
-## [0.8.4](https://github.com/dotansimha/graphql-codegen/compare/0.8.3...0.8.4) (2017-07-19)
-
-- Fixed issue with generated result missing Fragment spread
-- Fixed issue with wrong output for GraphQL primitives
-- Fixed issue with default output file overrides the `out` cli parameter
-
-
-
-## [0.8.3](https://github.com/dotansimha/graphql-codegen/compare/0.8.2...0.8.3) (2017-07-19)
-
-- Fixed issue with \_\_typename in selectionSet
-
-
-
-## [0.8.2](https://github.com/dotansimha/graphql-codegen/compare/0.8.1...0.8.2) (2017-07-18)
-
-- Fixed issue with NPM installation
-
-
-
-## [0.8.1](https://github.com/dotansimha/graphql-codegen/compare/0.8.0...0.8.1) (2017-07-18)
-
-- Fixed issue with NPM installation
-
-
-
-## [0.8.0](https://github.com/dotansimha/graphql-codegen/compare/0.5.5...0.8.0) (2017-07-17)
-
-- Refactor everything :)
-
-
-
-## [0.5.5](https://github.com/dotansimha/graphql-codegen/compare/0.5.4...0.5.5) (2017-07-13)
-
-- fixed peer dependencies issue
-- fixed error with template resolution [PR #110](https://github.com/dotansimha/graphql-code-generator/pull/110)
-- update depndencies
-- Prevent primitives from being output like other models [PR #116](https://github.com/dotansimha/graphql-code-generator/pull/116)
-
-
-
-## [0.5.4](https://github.com/dotansimha/graphql-codegen/compare/0.5.2...0.5.4) (2017-06-24)
-
-- updated all dependencies
-
-
-
-## [0.5.2](https://github.com/dotansimha/graphql-codegen/compare/0.5.1...v0.5.2) (2017-05-03)
-
-## Bug fixes
-
-- Added support for Anonymous operations (closes [#82](https://github.com/dotansimha/graphql-code-generator/issues/82))
-- Fixed a bug with missing root types (closes [#83](https://github.com/dotansimha/graphql-code-generator/issues/83))
-- Fixed a bug with multiple extends for TypeScript generator [#81](https://github.com/dotansimha/graphql-code-generator/pull/81) - Thanks @Anthonyzou
-- Fixed a issue with generated TypeScript file and TSLint warnings [#81](https://github.com/dotansimha/graphql-code-generator/pull/81) - Thanks @Anthonyzou
-
-### Other
-
-- Updated all dependencies to their latest version.
-- **package:** update graphql to version 0.9.1 ([2782925](https://github.com/dotansimha/graphql-codegen/commit/2782925))
-
-
-
-## [0.5.1](https://github.com/dotansimha/graphql-codegen/compare/0.5.0...v0.5.1) (2017-01-03)
-
-- updated dependecies
-
-
-
-# [0.5.0](https://github.com/dotansimha/graphql-codegen/compare/0.3.0...v0.5.0) (2016-12-29)
-
-### Features
-
-- **core:** add support for loading GraphQL schema from js export file ([1587ef7](https://github.com/dotansimha/graphql-codegen/commit/1587ef7))
-
-
-
-# [0.4.0](https://github.com/dotansimha/graphql-codegen/compare/0.3.0...v0.4.0) (2016-12-28)
-
-### Bug Fixes
-
-- **package:** update [@types](https://github.com/types)/request to version 0.0.37 ([4fcdc32](https://github.com/dotansimha/graphql-codegen/commit/4fcdc32))
-
-### Features
-
-- **libify:** added lib exports ([7175e11](https://github.com/dotansimha/graphql-codegen/commit/7175e11))
-- **core:** added support for server side schema arguments
-
-
-
-# [0.3.0](https://github.com/dotansimha/graphql-codegen/compare/0.2.5...v0.3.0) (2016-12-26)
-
-### Bug Fixes
-
-- **generators:** fixes for ts generators ([2f72d44](https://github.com/dotansimha/graphql-codegen/commit/2f72d44))
-
-### Features
-
-- **generators:** generated ts/swift result examples ([e43f289](https://github.com/dotansimha/graphql-codegen/commit/e43f289))
-- **generators:** swift with Apollo iOS generator ([cee08c8](https://github.com/dotansimha/graphql-codegen/commit/cee08c8))
-- **generators:** add support for fragments spread for swift generator ([f95fa72](https://github.com/dotansimha/graphql-codegen/commit/f95fa72))
-- **generators:** More fixes for swift generator ([487a249](https://github.com/dotansimha/graphql-codegen/commit/487a249))
-
-
-
-## [0.2.5](https://github.com/dotansimha/graphql-codegen/compare/0.2.4...v0.2.5) (2016-12-24)
-
-### Bug Fixes
-
-- **generators:** fixed a small bug with typescript generator after code modifications ([33a4b83](https://github.com/dotansimha/graphql-codegen/commit/33a4b83))
-
-### Features
-
-- **generators:** WIP: added swift generator support for inline fragments ([3c087b4](https://github.com/dotansimha/graphql-codegen/commit/3c087b4))
-- **generators:** WIP: some more fixes and template code for swift generator ([3b0d0f9](https://github.com/dotansimha/graphql-codegen/commit/3b0d0f9))
-- **generators:** WIP: swift generator and some bug fixes ([f5b0b92](https://github.com/dotansimha/graphql-codegen/commit/f5b0b92))
-
-
-
-## [0.2.4](https://github.com/dotansimha/graphql-codegen/compare/0.2.3...v0.2.4) (2016-12-24)
-
-### Features
-
-- **cli:** add support for --no-documents and --no-schema flags ([1a6a692](https://github.com/dotansimha/graphql-codegen/commit/1a6a692))
-
-
-
-## [0.2.3](https://github.com/dotansimha/graphql-codegen/compare/0.2.2...v0.2.3) (2016-12-24)
-
-### Features
-
-- **documents-finder:** add support for finding GraphQL documents inside code files ([1d11980](https://github.com/dotansimha/graphql-codegen/commit/1d11980))
-
-
-
-## [0.2.2](https://github.com/dotansimha/graphql-codegen/compare/0.2.1...v0.2.2) (2016-12-23)
-
-### Bug Fixes
-
-- **fragments:** added rootType to fragments ([af9b932](https://github.com/dotansimha/graphql-codegen/commit/af9b932))
-
-
-
-## [0.2.1](https://github.com/dotansimha/graphql-codegen/compare/0.2.0...v0.2.1) (2016-12-23)
-
-### Features
-
-- **flatten, partials:** add support for non-flatten innerTypes ([1f6d001](https://github.com/dotansimha/graphql-codegen/commit/1f6d001))
-
-
-
-# [0.2.0](https://github.com/dotansimha/graphql-codegen/compare/0.1.9...v0.2.0) (2016-12-14)
-
-### Features
-
-- **core:** added custom headers for remote GraphQL endpoint ([d3b2cf9](https://github.com/dotansimha/graphql-codegen/commit/d3b2cf9))
-
-
-
-## [0.1.9](https://github.com/dotansimha/graphql-codegen/compare/0.1.8...v0.1.9) (2016-12-14)
-
-### Features
-
-- **cli:** added package version to cli ([df698d8](https://github.com/dotansimha/graphql-codegen/commit/df698d8))
-- **core:** added support for custom scalar types ([6ce7aa9](https://github.com/dotansimha/graphql-codegen/commit/6ce7aa9))
-
-
-
-## 0.1.8 (2016-12-14)
-
-### Bug Fixes
-
-- **core:** fixes for cli and template path resolve ([b7a3540](https://github.com/dotansimha/graphql-codegen/commit/b7a3540))
-- **typescript:** fixed enum template ([c05acd6](https://github.com/dotansimha/graphql-codegen/commit/c05acd6))
-
-### Features
-
-- **cli:** added basic cli support ([12b4458](https://github.com/dotansimha/graphql-codegen/commit/12b4458))
-- **cli:** added support for introspection from URL, and updated README ([cc15899](https://github.com/dotansimha/graphql-codegen/commit/cc15899))
-- **core:** added document content, added basic Swift generated content ([2d144ff](https://github.com/dotansimha/graphql-codegen/commit/2d144ff))
-- **core:** added generated root result object to the generated innertypes ([086d019](https://github.com/dotansimha/graphql-codegen/commit/086d019))
-- **core:** added handlebars helpers and added more swift support ([657c9f6](https://github.com/dotansimha/graphql-codegen/commit/657c9f6))
-- **core:** added inner types resolution and basic typescript template ([c173fc3](https://github.com/dotansimha/graphql-codegen/commit/c173fc3))
-- **core:** added more template helpers and added variables generation ([6da0d88](https://github.com/dotansimha/graphql-codegen/commit/6da0d88))
-- **core:** added primitives map, fixes for typescript generators ([ebc117b](https://github.com/dotansimha/graphql-codegen/commit/ebc117b))
-- **core:** added support for generated fragments and it's use inside documents ([fbd268c](https://github.com/dotansimha/graphql-codegen/commit/fbd268c))
-- **core:** added support for generated type as array based on server-side schema ([a37c849](https://github.com/dotansimha/graphql-codegen/commit/a37c849))
-- **core:** added support for index file for multiple-files generators ([7519de0](https://github.com/dotansimha/graphql-codegen/commit/7519de0))
-- **core:** added support for inline fragments ([f432ecd](https://github.com/dotansimha/graphql-codegen/commit/f432ecd))
-- **core:** added support for multiple-files generation, added typescript-multiple generator, added ([0af3cd0](https://github.com/dotansimha/graphql-codegen/commit/0af3cd0))
-- **core:** added support for operations variables generation ([a9bf28f](https://github.com/dotansimha/graphql-codegen/commit/a9bf28f))
-- **core:** added support for schema interfaces, and update typescript generator ([22d3ad0](https://github.com/dotansimha/graphql-codegen/commit/22d3ad0))
-- **core:** added support for server side types generation only ([2bec16f](https://github.com/dotansimha/graphql-codegen/commit/2bec16f))
-- **core:** added support for spread fragment when used in client side query ([8e9b093](https://github.com/dotansimha/graphql-codegen/commit/8e9b093))
-- **core:** added support for union types, updated typescript templates ([0172461](https://github.com/dotansimha/graphql-codegen/commit/0172461))
-- **core:** fixes for generated array types ([e2fb340](https://github.com/dotansimha/graphql-codegen/commit/e2fb340))
-- **core:** handle multiple inner types with the same name ([614ea3a](https://github.com/dotansimha/graphql-codegen/commit/614ea3a))
-- **core:** minor fixes and some changes in swift generator ([8d30bad](https://github.com/dotansimha/graphql-codegen/commit/8d30bad))
-- **core:** minor name fix ([5509b1d](https://github.com/dotansimha/graphql-codegen/commit/5509b1d))
-- **core:** remove swift ([85f1956](https://github.com/dotansimha/graphql-codegen/commit/85f1956))
-- **core:** some fixes ([60d4494](https://github.com/dotansimha/graphql-codegen/commit/60d4494))
-- **core, cli:** added cli and more core features ([b858693](https://github.com/dotansimha/graphql-codegen/commit/b858693))
-- **flow:** add flow generator template ([af72bbb](https://github.com/dotansimha/graphql-codegen/commit/af72bbb))
-- **generator:** added code generator for scheme basic types ([f04b3a0](https://github.com/dotansimha/graphql-codegen/commit/f04b3a0))
-- **generator:** added typescript basic template ([00739db](https://github.com/dotansimha/graphql-codegen/commit/00739db))
-- **generator:** fixes for type handling and added support for lists and nullable types ([8c4c498](https://github.com/dotansimha/graphql-codegen/commit/8c4c498))
-- **generator:** minor fixes for code generation for schema ([f69f375](https://github.com/dotansimha/graphql-codegen/commit/f69f375))
-- **generator:** refactor some code of the generator, added stub for operation handler ([156d710](https://github.com/dotansimha/graphql-codegen/commit/156d710))
-- **loader:** added basic schema loader and validator from JSON introspection file ([13b3dec](https://github.com/dotansimha/graphql-codegen/commit/13b3dec))
-- **parser:** added basic parser for documents and added some basic interfaces ([8ecaf4e](https://github.com/dotansimha/graphql-codegen/commit/8ecaf4e))
-- **typescript:** fixed issue with fragment name ([e3799da](https://github.com/dotansimha/graphql-codegen/commit/e3799da))
+## CHANGELOG moved to [GitHub releases](https://github.com/dotansimha/graphql-code-generator/releases)
diff --git a/README.md b/README.md
index c432e97a9b4..61df42532c7 100644
--- a/README.md
+++ b/README.md
@@ -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
```
diff --git a/dev-test/codegen-watch.yml b/dev-test/codegen-watch.yml
deleted file mode 100644
index bcd69456f1a..00000000000
--- a/dev-test/codegen-watch.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-overwrite: true
-watch: true
-generates:
- ./dev-test/githunt/types.ts:
- schema: ./dev-test/githunt/schema.json
- documents: ./dev-test/githunt/**/*.graphql
- plugins:
- - typescript-common
- - typescript-client
diff --git a/dev-test/codegen.yml b/dev-test/codegen.yml
index 47adb027574..ae6daea2c2d 100644
--- a/dev-test/codegen.yml
+++ b/dev-test/codegen.yml
@@ -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
@@ -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
@@ -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
diff --git a/dev-test/generate-all.sh b/dev-test/generate-all.sh
index 45cdf7287b7..6006ff085f7 100755
--- a/dev-test/generate-all.sh
+++ b/dev-test/generate-all.sh
@@ -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
diff --git a/dev-test/generate-watch.sh b/dev-test/generate-watch.sh
index c6f0095bec9..2b385d1a813 100755
--- a/dev-test/generate-watch.sh
+++ b/dev-test/generate-watch.sh
@@ -1,3 +1,3 @@
#/bin/sh
-node packages/graphql-codegen-cli/dist/cli.js --config ./dev-test/codegen-watch.yml
\ No newline at end of file
+node packages/graphql-codegen-cli/dist/commonjs/cli.js --config ./dev-test/codegen.yml -w
diff --git a/dev-test/githunt/graphql-declared-modules.d.ts b/dev-test/githunt/graphql-declared-modules.d.ts
index a45f2ad576d..30f44516ebf 100644
--- a/dev-test/githunt/graphql-declared-modules.d.ts
+++ b/dev-test/githunt/graphql-declared-modules.d.ts
@@ -1,133 +1,100 @@
// tslint:disable
+
declare module '*/comment-added.subscription.graphql' {
- import { DocumentNode } from 'graphql';
- const defaultDocument: DocumentNode;
- const onCommentAdded: DocumentNode;
-
- export {
- onCommentAdded,
- };
+ import { DocumentNode } from 'graphql';
+ const defaultDocument: DocumentNode;
+ export const onCommentAdded: DocumentNode;
- export default defaultDocument;
+ export default defaultDocument;
}
+
declare module '*/comment.query.graphql' {
- import { DocumentNode } from 'graphql';
- const defaultDocument: DocumentNode;
- const Comment: DocumentNode;
+ import { DocumentNode } from 'graphql';
+ const defaultDocument: DocumentNode;
+ export const Comment: DocumentNode;
+
+ export default defaultDocument;
+}
- export {
- Comment,
- };
- export default defaultDocument;
+declare module '*/comments-page-comment.fragment.graphql' {
+ import { DocumentNode } from 'graphql';
+ const defaultDocument: DocumentNode;
+ export const CommentsPageComment: DocumentNode;
+
+ export default defaultDocument;
}
+
declare module '*/current-user.query.graphql' {
- import { DocumentNode } from 'graphql';
- const defaultDocument: DocumentNode;
- const CurrentUserForProfile: DocumentNode;
+ import { DocumentNode } from 'graphql';
+ const defaultDocument: DocumentNode;
+ export const CurrentUserForProfile: DocumentNode;
+
+ export default defaultDocument;
+}
- export {
- CurrentUserForProfile,
- };
- export default defaultDocument;
+declare module '*/feed-entry.fragment.graphql' {
+ import { DocumentNode } from 'graphql';
+ const defaultDocument: DocumentNode;
+ export const FeedEntry: DocumentNode;
+
+ export default defaultDocument;
}
+
declare module '*/feed.query.graphql' {
- import { DocumentNode } from 'graphql';
- const defaultDocument: DocumentNode;
- const Feed: DocumentNode;
-
- export {
- Feed,
- };
+ import { DocumentNode } from 'graphql';
+ const defaultDocument: DocumentNode;
+ export const Feed: DocumentNode;
- export default defaultDocument;
+ export default defaultDocument;
}
+
declare module '*/new-entry.mutation.graphql' {
- import { DocumentNode } from 'graphql';
- const defaultDocument: DocumentNode;
- const submitRepository: DocumentNode;
-
- export {
- submitRepository,
- };
+ import { DocumentNode } from 'graphql';
+ const defaultDocument: DocumentNode;
+ export const submitRepository: DocumentNode;
- export default defaultDocument;
+ export default defaultDocument;
}
-
-declare module '*/submit-comment.mutation.graphql' {
- import { DocumentNode } from 'graphql';
- const defaultDocument: DocumentNode;
- const submitComment: DocumentNode;
- export {
- submitComment,
- };
-
- export default defaultDocument;
-}
-declare module '*/vote.mutation.graphql' {
- import { DocumentNode } from 'graphql';
- const defaultDocument: DocumentNode;
- const vote: DocumentNode;
-
- export {
- vote,
- };
+declare module '*/repo-info.fragment.graphql' {
+ import { DocumentNode } from 'graphql';
+ const defaultDocument: DocumentNode;
+ export const RepoInfo: DocumentNode;
- export default defaultDocument;
+ export default defaultDocument;
}
-
-declare module '*/comments-page-comment.fragment.graphql' {
- import { DocumentNode } from 'graphql';
- const defaultDocument: DocumentNode;
-
- export {
-
- };
-
- export default defaultDocument;
-}
-declare module '*/feed-entry.fragment.graphql' {
- import { DocumentNode } from 'graphql';
- const defaultDocument: DocumentNode;
-
-
- export {
-
- };
+declare module '*/submit-comment.mutation.graphql' {
+ import { DocumentNode } from 'graphql';
+ const defaultDocument: DocumentNode;
+ export const submitComment: DocumentNode;
- export default defaultDocument;
+ export default defaultDocument;
}
-
-declare module '*/repo-info.fragment.graphql' {
- import { DocumentNode } from 'graphql';
- const defaultDocument: DocumentNode;
-
- export {
-
- };
-
- export default defaultDocument;
-}
declare module '*/vote-buttons.fragment.graphql' {
- import { DocumentNode } from 'graphql';
- const defaultDocument: DocumentNode;
-
-
- export {
-
- };
+ import { DocumentNode } from 'graphql';
+ const defaultDocument: DocumentNode;
+ export const VoteButtons: DocumentNode;
- export default defaultDocument;
+ export default defaultDocument;
}
+
+declare module '*/vote.mutation.graphql' {
+ import { DocumentNode } from 'graphql';
+ const defaultDocument: DocumentNode;
+ export const vote: DocumentNode;
+
+ export default defaultDocument;
+}
+
\ No newline at end of file
diff --git a/dev-test/githunt/types.avoidOptionals.ts b/dev-test/githunt/types.avoidOptionals.ts
index 5aae0f25a6b..7930dfc05e5 100644
--- a/dev-test/githunt/types.avoidOptionals.ts
+++ b/dev-test/githunt/types.avoidOptionals.ts
@@ -1,323 +1,168 @@
-export type Maybe = T | null;
-
-/** A list of options for the sort order of the feed */
- export enum FeedType {
- Hot = 'HOT',
- New = 'NEW',
- Top = 'TOP',
- }
-/** The type of vote to record, when submitting a vote */
- export enum VoteType {
- Up = 'UP',
- Down = 'DOWN',
- Cancel = 'CANCEL',
- }
-
-
-// ====================================================
-// Documents
-// ====================================================
-
-
-
-export namespace OnCommentAdded {
- export type Variables = {
- repoFullName: string;
- };
-
- export type Subscription = {
- __typename?: 'Subscription';
-
- commentAdded: Maybe;
- };
-
- export type CommentAdded = {
- __typename?: 'Comment';
-
- id: number;
-
- postedBy: PostedBy;
-
- createdAt: number;
-
- content: string;
- };
-
- export type PostedBy = {
- __typename?: 'User';
-
- login: string;
-
- html_url: string;
- };
+type Maybe = T | null;
+export type Comment = {
+ id: number,
+ postedBy: User,
+ createdAt: number,
+ content: string,
+ repoName: string,
+};
+
+export type Entry = {
+ repository: Repository,
+ postedBy: User,
+ createdAt: number,
+ score: number,
+ hotScore: number,
+ comments: Array>,
+ commentCount: number,
+ id: number,
+ vote: Vote,
+};
+
+
+export type EntryCommentsArgs = {
+ limit: Maybe,
+ offset: Maybe
+};
+
+export enum FeedType {
+ Hot = 'HOT',
+ New = 'NEW',
+ Top = 'TOP'
}
-export namespace Comment {
- export type Variables = {
- repoFullName: string;
- limit: Maybe;
- offset: Maybe;
- };
-
- export type Query = {
- __typename?: 'Query';
-
- currentUser: Maybe;
-
- entry: Maybe;
- };
+export type Mutation = {
+ submitRepository: Maybe,
+ vote: Maybe,
+ submitComment: Maybe,
+};
- export type CurrentUser = {
- __typename?: 'User';
- login: string;
+export type MutationSubmitRepositoryArgs = {
+ repoFullName: string
+};
- html_url: string;
- };
- export type Entry = {
- __typename?: 'Entry';
+export type MutationVoteArgs = {
+ repoFullName: string,
+ type: VoteType
+};
- id: number;
- postedBy: PostedBy;
+export type MutationSubmitCommentArgs = {
+ repoFullName: string,
+ commentContent: string
+};
- createdAt: number;
+export type Query = {
+ feed: Maybe>>,
+ entry: Maybe,
+ currentUser: Maybe,
+};
- comments: (Maybe)[];
- commentCount: number;
+export type QueryFeedArgs = {
+ type: FeedType,
+ offset: Maybe,
+ limit: Maybe
+};
- repository: Repository;
- };
- export type PostedBy = {
- __typename?: 'User';
+export type QueryEntryArgs = {
+ repoFullName: string
+};
- login: string;
+export type Repository = {
+ name: string,
+ full_name: string,
+ description: Maybe,
+ html_url: string,
+ stargazers_count: number,
+ open_issues_count: Maybe,
+ owner: Maybe,
+};
- html_url: string;
- };
+export type Subscription = {
+ commentAdded: Maybe,
+};
- export type Comments = CommentsPageComment.Fragment;
- export type Repository = {
- __typename?: RepositoryInlineFragment['__typename'];
+export type SubscriptionCommentAddedArgs = {
+ repoFullName: string
+};
- full_name: string;
+export type User = {
+ login: string,
+ avatar_url: string,
+ html_url: string,
+};
- html_url: string;
- } & RepositoryInlineFragment;
+export type Vote = {
+ vote_value: number,
+};
- export type RepositoryInlineFragment = {
- __typename?: 'Repository';
-
- description: Maybe;
-
- open_issues_count: Maybe;
-
- stargazers_count: number;
- };
-}
-
-export namespace CurrentUserForProfile {
- export type Variables = {
- };
-
- export type Query = {
- __typename?: 'Query';
-
- currentUser: Maybe;
- };
-
- export type CurrentUser = {
- __typename?: 'User';
-
- login: string;
-
- avatar_url: string;
- };
+export enum VoteType {
+ Up = 'UP',
+ Down = 'DOWN',
+ Cancel = 'CANCEL'
}
+export type OnCommentAddedSubscriptionVariables = {
+ repoFullName: string
+};
-export namespace Feed {
- export type Variables = {
- type: FeedType;
- offset: Maybe;
- limit: Maybe;
- };
- export type Query = {
- __typename?: 'Query';
+export type OnCommentAddedSubscription = ({ __typename?: 'Subscription' } & { commentAdded: Maybe<({ __typename?: 'Comment' } & Pick & { postedBy: ({ __typename?: 'User' } & Pick) })> });
- currentUser: Maybe;
+export type CommentQueryVariables = {
+ repoFullName: string,
+ limit: Maybe,
+ offset: Maybe
+};
- feed: Maybe<(Maybe)[]>;
- };
- export type CurrentUser = {
- __typename?: 'User';
+export type CommentQuery = ({ __typename?: 'Query' } & { currentUser: Maybe<({ __typename?: 'User' } & Pick)>, entry: Maybe<({ __typename?: 'Entry' } & Pick & { postedBy: ({ __typename?: 'User' } & Pick), comments: Array>, repository: ({ __typename?: 'Repository' } & Pick & (({ __typename?: 'Repository' } & Pick))) })> });
- login: string;
- };
+export type CommentsPageCommentFragment = ({ __typename?: 'Comment' } & Pick & { postedBy: ({ __typename?: 'User' } & Pick) });
- export type Feed = FeedEntry.Fragment;
-}
+export type CurrentUserForProfileQueryVariables = {};
-export namespace SubmitRepository {
- export type Variables = {
- repoFullName: string;
- };
- export type Mutation = {
- __typename?: 'Mutation';
+export type CurrentUserForProfileQuery = ({ __typename?: 'Query' } & { currentUser: Maybe<({ __typename?: 'User' } & Pick)> });
- submitRepository: Maybe;
- };
+export type FeedEntryFragment = ({ __typename?: 'Entry' } & Pick & { repository: ({ __typename?: 'Repository' } & Pick & { owner: Maybe<({ __typename?: 'User' } & Pick)> }) } & (VoteButtonsFragment & RepoInfoFragment));
- export type SubmitRepository = {
- __typename?: 'Entry';
+export type FeedQueryVariables = {
+ type: FeedType,
+ offset: Maybe,
+ limit: Maybe
+};
- createdAt: number;
- };
-}
-export namespace SubmitComment {
- export type Variables = {
- repoFullName: string;
- commentContent: string;
- };
+export type FeedQuery = ({ __typename?: 'Query' } & { currentUser: Maybe<({ __typename?: 'User' } & Pick)>, feed: Maybe>> });
- export type Mutation = {
- __typename?: 'Mutation';
+export type SubmitRepositoryMutationVariables = {
+ repoFullName: string
+};
- submitComment: Maybe;
- };
-
- export type SubmitComment = CommentsPageComment.Fragment;
-}
-export namespace Vote {
- export type Variables = {
- repoFullName: string;
- type: VoteType;
- };
+export type SubmitRepositoryMutation = ({ __typename?: 'Mutation' } & { submitRepository: Maybe<({ __typename?: 'Entry' } & Pick)> });
- export type Mutation = {
- __typename?: 'Mutation';
+export type RepoInfoFragment = ({ __typename?: 'Entry' } & Pick & { repository: ({ __typename?: 'Repository' } & Pick), postedBy: ({ __typename?: 'User' } & Pick) });
- vote: Maybe;
- };
+export type SubmitCommentMutationVariables = {
+ repoFullName: string,
+ commentContent: string
+};
- export type Vote = {
- __typename?: 'Entry';
- score: number;
+export type SubmitCommentMutation = ({ __typename?: 'Mutation' } & { submitComment: Maybe<({ __typename?: 'Comment' } & CommentsPageCommentFragment)> });
- id: number;
-
- vote: _Vote;
- };
-
- export type _Vote = {
- __typename?: 'Vote';
-
- vote_value: number;
- };
-}
+export type VoteButtonsFragment = ({ __typename?: 'Entry' } & Pick & { vote: ({ __typename?: 'Vote' } & Pick) });
-export namespace CommentsPageComment {
- export type Fragment = {
- __typename?: 'Comment';
+export type VoteMutationVariables = {
+ repoFullName: string,
+ type: VoteType
+};
- id: number;
-
- postedBy: PostedBy;
-
- createdAt: number;
-
- content: string;
- };
-
- export type PostedBy = {
- __typename?: 'User';
-
- login: string;
-
- html_url: string;
- };
-}
-
-export namespace FeedEntry {
- export type Fragment = {
- __typename?: 'Entry';
-
- id: number;
-
- commentCount: number;
-
- repository: Repository;
- } & (VoteButtons.Fragment & RepoInfo.Fragment);
-
- export type Repository = {
- __typename?: 'Repository';
-
- full_name: string;
-
- html_url: string;
-
- owner: Maybe;
- };
-
- export type Owner = {
- __typename?: 'User';
-
- avatar_url: string;
- };
-}
-
-export namespace RepoInfo {
- export type Fragment = {
- __typename?: 'Entry';
-
- createdAt: number;
-
- repository: Repository;
-
- postedBy: PostedBy;
- };
-
- export type Repository = {
- __typename?: 'Repository';
-
- description: Maybe;
-
- stargazers_count: number;
-
- open_issues_count: Maybe;
- };
-
- export type PostedBy = {
- __typename?: 'User';
-
- html_url: string;
-
- login: string;
- };
-}
-
-export namespace VoteButtons {
- export type Fragment = {
- __typename?: 'Entry';
-
- score: number;
-
- vote: Vote;
- };
-
- export type Vote = {
- __typename?: 'Vote';
-
- vote_value: number;
- };
-}
+export type VoteMutation = ({ __typename?: 'Mutation' } & { vote: Maybe<({ __typename?: 'Entry' } & Pick & { vote: ({ __typename?: 'Vote' } & Pick) })> });
diff --git a/dev-test/githunt/types.d.ts b/dev-test/githunt/types.d.ts
index 27ff1ecbcde..90abe027980 100644
--- a/dev-test/githunt/types.d.ts
+++ b/dev-test/githunt/types.d.ts
@@ -1,315 +1,160 @@
-export type Maybe = T | null;
+type Maybe = T | null;
+export type Comment = {
+ id: number,
+ postedBy: User,
+ createdAt: number,
+ content: string,
+ repoName: string,
+};
+
+export type Entry = {
+ repository: Repository,
+ postedBy: User,
+ createdAt: number,
+ score: number,
+ hotScore: number,
+ comments: Array>,
+ commentCount: number,
+ id: number,
+ vote: Vote,
+};
-/** A list of options for the sort order of the feed */
- export type FeedType = 'HOT' | 'NEW' | 'TOP';
-/** The type of vote to record, when submitting a vote */
- export type VoteType = 'UP' | 'DOWN' | 'CANCEL';
+export type EntryCommentsArgs = {
+ limit?: Maybe,
+ offset?: Maybe
+};
-// ====================================================
-// Documents
-// ====================================================
+export type FeedType = 'HOT' | 'NEW' | 'TOP';
+export type Mutation = {
+ submitRepository?: Maybe,
+ vote?: Maybe,
+ submitComment?: Maybe,
+};
-export namespace OnCommentAdded {
- export type Variables = {
- repoFullName: string;
- };
+export type MutationSubmitRepositoryArgs = {
+ repoFullName: string
+};
- export type Subscription = {
- __typename?: 'Subscription';
- commentAdded: Maybe;
- };
+export type MutationVoteArgs = {
+ repoFullName: string,
+ type: VoteType
+};
- export type CommentAdded = {
- __typename?: 'Comment';
- id: number;
+export type MutationSubmitCommentArgs = {
+ repoFullName: string,
+ commentContent: string
+};
- postedBy: PostedBy;
+export type Query = {
+ feed?: Maybe>>,
+ entry?: Maybe,
+ currentUser?: Maybe,
+};
- createdAt: number;
- content: string;
- };
+export type QueryFeedArgs = {
+ type: FeedType,
+ offset?: Maybe,
+ limit?: Maybe
+};
- export type PostedBy = {
- __typename?: 'User';
- login: string;
+export type QueryEntryArgs = {
+ repoFullName: string
+};
- html_url: string;
- };
-}
+export type Repository = {
+ name: string,
+ full_name: string,
+ description?: Maybe,
+ html_url: string,
+ stargazers_count: number,
+ open_issues_count?: Maybe,
+ owner?: Maybe,
+};
-export namespace Comment {
- export type Variables = {
- repoFullName: string;
- limit?: Maybe;
- offset?: Maybe;
- };
+export type Subscription = {
+ commentAdded?: Maybe,
+};
- export type Query = {
- __typename?: 'Query';
- currentUser: Maybe;
+export type SubscriptionCommentAddedArgs = {
+ repoFullName: string
+};
- entry: Maybe;
- };
+export type User = {
+ login: string,
+ avatar_url: string,
+ html_url: string,
+};
- export type CurrentUser = {
- __typename?: 'User';
+export type Vote = {
+ vote_value: number,
+};
- login: string;
+export type VoteType = 'UP' | 'DOWN' | 'CANCEL';
+export type OnCommentAddedSubscriptionVariables = {
+ repoFullName: string
+};
- html_url: string;
- };
- export type Entry = {
- __typename?: 'Entry';
+export type OnCommentAddedSubscription = ({ __typename?: 'Subscription' } & { commentAdded: Maybe<({ __typename?: 'Comment' } & Pick & { postedBy: ({ __typename?: 'User' } & Pick) })> });
- id: number;
+export type CommentQueryVariables = {
+ repoFullName: string,
+ limit?: Maybe,
+ offset?: Maybe
+};
- postedBy: PostedBy;
- createdAt: number;
+export type CommentQuery = ({ __typename?: 'Query' } & { currentUser: Maybe<({ __typename?: 'User' } & Pick)>, entry: Maybe<({ __typename?: 'Entry' } & Pick & { postedBy: ({ __typename?: 'User' } & Pick), comments: Array>, repository: ({ __typename?: 'Repository' } & Pick & (({ __typename?: 'Repository' } & Pick))) })> });
- comments: (Maybe)[];
+export type CommentsPageCommentFragment = ({ __typename?: 'Comment' } & Pick & { postedBy: ({ __typename?: 'User' } & Pick) });
- commentCount: number;
+export type CurrentUserForProfileQueryVariables = {};
- repository: Repository;
- };
- export type PostedBy = {
- __typename?: 'User';
+export type CurrentUserForProfileQuery = ({ __typename?: 'Query' } & { currentUser: Maybe<({ __typename?: 'User' } & Pick)> });
- login: string;
+export type FeedEntryFragment = ({ __typename?: 'Entry' } & Pick & { repository: ({ __typename?: 'Repository' } & Pick & { owner: Maybe<({ __typename?: 'User' } & Pick)> }) } & (VoteButtonsFragment & RepoInfoFragment));
- html_url: string;
- };
+export type FeedQueryVariables = {
+ type: FeedType,
+ offset?: Maybe,
+ limit?: Maybe
+};
- export type Comments = CommentsPageComment.Fragment;
- export type Repository = {
- __typename?: RepositoryInlineFragment['__typename'];
+export type FeedQuery = ({ __typename?: 'Query' } & { currentUser: Maybe<({ __typename?: 'User' } & Pick)>, feed: Maybe>> });
- full_name: string;
+export type SubmitRepositoryMutationVariables = {
+ repoFullName: string
+};
- html_url: string;
- } & RepositoryInlineFragment;
- export type RepositoryInlineFragment = {
- __typename?: 'Repository';
+export type SubmitRepositoryMutation = ({ __typename?: 'Mutation' } & { submitRepository: Maybe<({ __typename?: 'Entry' } & Pick)> });
- description: Maybe;
+export type RepoInfoFragment = ({ __typename?: 'Entry' } & Pick & { repository: ({ __typename?: 'Repository' } & Pick), postedBy: ({ __typename?: 'User' } & Pick) });
- open_issues_count: Maybe;
+export type SubmitCommentMutationVariables = {
+ repoFullName: string,
+ commentContent: string
+};
- stargazers_count: number;
- };
-}
-export namespace CurrentUserForProfile {
- export type Variables = {
- };
+export type SubmitCommentMutation = ({ __typename?: 'Mutation' } & { submitComment: Maybe<({ __typename?: 'Comment' } & CommentsPageCommentFragment)> });
- export type Query = {
- __typename?: 'Query';
+export type VoteButtonsFragment = ({ __typename?: 'Entry' } & Pick & { vote: ({ __typename?: 'Vote' } & Pick) });
- currentUser: Maybe;
- };
+export type VoteMutationVariables = {
+ repoFullName: string,
+ type: VoteType
+};
- export type CurrentUser = {
- __typename?: 'User';
-
- login: string;
-
- avatar_url: string;
- };
-}
-
-export namespace Feed {
- export type Variables = {
- type: FeedType;
- offset?: Maybe;
- limit?: Maybe;
- };
-
- export type Query = {
- __typename?: 'Query';
-
- currentUser: Maybe;
-
- feed: Maybe<(Maybe)[]>;
- };
-
- export type CurrentUser = {
- __typename?: 'User';
-
- login: string;
- };
-
- export type Feed = FeedEntry.Fragment;
-}
-
-export namespace SubmitRepository {
- export type Variables = {
- repoFullName: string;
- };
-
- export type Mutation = {
- __typename?: 'Mutation';
-
- submitRepository: Maybe;
- };
-
- export type SubmitRepository = {
- __typename?: 'Entry';
-
- createdAt: number;
- };
-}
-
-export namespace SubmitComment {
- export type Variables = {
- repoFullName: string;
- commentContent: string;
- };
-
- export type Mutation = {
- __typename?: 'Mutation';
-
- submitComment: Maybe;
- };
-
- export type SubmitComment = CommentsPageComment.Fragment;
-}
-
-export namespace Vote {
- export type Variables = {
- repoFullName: string;
- type: VoteType;
- };
-
- export type Mutation = {
- __typename?: 'Mutation';
-
- vote: Maybe;
- };
-
- export type Vote = {
- __typename?: 'Entry';
-
- score: number;
-
- id: number;
-
- vote: _Vote;
- };
-
- export type _Vote = {
- __typename?: 'Vote';
-
- vote_value: number;
- };
-}
-
-export namespace CommentsPageComment {
- export type Fragment = {
- __typename?: 'Comment';
-
- id: number;
-
- postedBy: PostedBy;
-
- createdAt: number;
-
- content: string;
- };
-
- export type PostedBy = {
- __typename?: 'User';
-
- login: string;
-
- html_url: string;
- };
-}
-
-export namespace FeedEntry {
- export type Fragment = {
- __typename?: 'Entry';
-
- id: number;
-
- commentCount: number;
-
- repository: Repository;
- } & (VoteButtons.Fragment & RepoInfo.Fragment);
-
- export type Repository = {
- __typename?: 'Repository';
-
- full_name: string;
-
- html_url: string;
-
- owner: Maybe;
- };
-
- export type Owner = {
- __typename?: 'User';
-
- avatar_url: string;
- };
-}
-
-export namespace RepoInfo {
- export type Fragment = {
- __typename?: 'Entry';
-
- createdAt: number;
-
- repository: Repository;
-
- postedBy: PostedBy;
- };
-
- export type Repository = {
- __typename?: 'Repository';
-
- description: Maybe;
-
- stargazers_count: number;
-
- open_issues_count: Maybe;
- };
-
- export type PostedBy = {
- __typename?: 'User';
-
- html_url: string;
-
- login: string;
- };
-}
-
-export namespace VoteButtons {
- export type Fragment = {
- __typename?: 'Entry';
-
- score: number;
-
- vote: Vote;
- };
-
- export type Vote = {
- __typename?: 'Vote';
-
- vote_value: number;
- };
-}
+export type VoteMutation = ({ __typename?: 'Mutation' } & { vote: Maybe<({ __typename?: 'Entry' } & Pick & { vote: ({ __typename?: 'Vote' } & Pick) })> });
diff --git a/dev-test/githunt/types.enumsAsTypes.ts b/dev-test/githunt/types.enumsAsTypes.ts
index 27ff1ecbcde..90abe027980 100644
--- a/dev-test/githunt/types.enumsAsTypes.ts
+++ b/dev-test/githunt/types.enumsAsTypes.ts
@@ -1,315 +1,160 @@
-export type Maybe = T | null;
+type Maybe = T | null;
+export type Comment = {
+ id: number,
+ postedBy: User,
+ createdAt: number,
+ content: string,
+ repoName: string,
+};
+
+export type Entry = {
+ repository: Repository,
+ postedBy: User,
+ createdAt: number,
+ score: number,
+ hotScore: number,
+ comments: Array>,
+ commentCount: number,
+ id: number,
+ vote: Vote,
+};
-/** A list of options for the sort order of the feed */
- export type FeedType = 'HOT' | 'NEW' | 'TOP';
-/** The type of vote to record, when submitting a vote */
- export type VoteType = 'UP' | 'DOWN' | 'CANCEL';
+export type EntryCommentsArgs = {
+ limit?: Maybe,
+ offset?: Maybe
+};
-// ====================================================
-// Documents
-// ====================================================
+export type FeedType = 'HOT' | 'NEW' | 'TOP';
+export type Mutation = {
+ submitRepository?: Maybe,
+ vote?: Maybe,
+ submitComment?: Maybe,
+};
-export namespace OnCommentAdded {
- export type Variables = {
- repoFullName: string;
- };
+export type MutationSubmitRepositoryArgs = {
+ repoFullName: string
+};
- export type Subscription = {
- __typename?: 'Subscription';
- commentAdded: Maybe;
- };
+export type MutationVoteArgs = {
+ repoFullName: string,
+ type: VoteType
+};
- export type CommentAdded = {
- __typename?: 'Comment';
- id: number;
+export type MutationSubmitCommentArgs = {
+ repoFullName: string,
+ commentContent: string
+};
- postedBy: PostedBy;
+export type Query = {
+ feed?: Maybe>>,
+ entry?: Maybe,
+ currentUser?: Maybe,
+};
- createdAt: number;
- content: string;
- };
+export type QueryFeedArgs = {
+ type: FeedType,
+ offset?: Maybe,
+ limit?: Maybe
+};
- export type PostedBy = {
- __typename?: 'User';
- login: string;
+export type QueryEntryArgs = {
+ repoFullName: string
+};
- html_url: string;
- };
-}
+export type Repository = {
+ name: string,
+ full_name: string,
+ description?: Maybe,
+ html_url: string,
+ stargazers_count: number,
+ open_issues_count?: Maybe,
+ owner?: Maybe,
+};
-export namespace Comment {
- export type Variables = {
- repoFullName: string;
- limit?: Maybe;
- offset?: Maybe;
- };
+export type Subscription = {
+ commentAdded?: Maybe,
+};
- export type Query = {
- __typename?: 'Query';
- currentUser: Maybe;
+export type SubscriptionCommentAddedArgs = {
+ repoFullName: string
+};
- entry: Maybe;
- };
+export type User = {
+ login: string,
+ avatar_url: string,
+ html_url: string,
+};
- export type CurrentUser = {
- __typename?: 'User';
+export type Vote = {
+ vote_value: number,
+};
- login: string;
+export type VoteType = 'UP' | 'DOWN' | 'CANCEL';
+export type OnCommentAddedSubscriptionVariables = {
+ repoFullName: string
+};
- html_url: string;
- };
- export type Entry = {
- __typename?: 'Entry';
+export type OnCommentAddedSubscription = ({ __typename?: 'Subscription' } & { commentAdded: Maybe<({ __typename?: 'Comment' } & Pick & { postedBy: ({ __typename?: 'User' } & Pick) })> });
- id: number;
+export type CommentQueryVariables = {
+ repoFullName: string,
+ limit?: Maybe,
+ offset?: Maybe
+};
- postedBy: PostedBy;
- createdAt: number;
+export type CommentQuery = ({ __typename?: 'Query' } & { currentUser: Maybe<({ __typename?: 'User' } & Pick)>, entry: Maybe<({ __typename?: 'Entry' } & Pick & { postedBy: ({ __typename?: 'User' } & Pick), comments: Array>, repository: ({ __typename?: 'Repository' } & Pick & (({ __typename?: 'Repository' } & Pick))) })> });
- comments: (Maybe)[];
+export type CommentsPageCommentFragment = ({ __typename?: 'Comment' } & Pick & { postedBy: ({ __typename?: 'User' } & Pick) });
- commentCount: number;
+export type CurrentUserForProfileQueryVariables = {};
- repository: Repository;
- };
- export type PostedBy = {
- __typename?: 'User';
+export type CurrentUserForProfileQuery = ({ __typename?: 'Query' } & { currentUser: Maybe<({ __typename?: 'User' } & Pick)> });
- login: string;
+export type FeedEntryFragment = ({ __typename?: 'Entry' } & Pick & { repository: ({ __typename?: 'Repository' } & Pick & { owner: Maybe<({ __typename?: 'User' } & Pick)> }) } & (VoteButtonsFragment & RepoInfoFragment));
- html_url: string;
- };
+export type FeedQueryVariables = {
+ type: FeedType,
+ offset?: Maybe,
+ limit?: Maybe
+};
- export type Comments = CommentsPageComment.Fragment;
- export type Repository = {
- __typename?: RepositoryInlineFragment['__typename'];
+export type FeedQuery = ({ __typename?: 'Query' } & { currentUser: Maybe<({ __typename?: 'User' } & Pick)>, feed: Maybe>> });
- full_name: string;
+export type SubmitRepositoryMutationVariables = {
+ repoFullName: string
+};
- html_url: string;
- } & RepositoryInlineFragment;
- export type RepositoryInlineFragment = {
- __typename?: 'Repository';
+export type SubmitRepositoryMutation = ({ __typename?: 'Mutation' } & { submitRepository: Maybe<({ __typename?: 'Entry' } & Pick)> });
- description: Maybe;
+export type RepoInfoFragment = ({ __typename?: 'Entry' } & Pick & { repository: ({ __typename?: 'Repository' } & Pick), postedBy: ({ __typename?: 'User' } & Pick) });
- open_issues_count: Maybe;
+export type SubmitCommentMutationVariables = {
+ repoFullName: string,
+ commentContent: string
+};
- stargazers_count: number;
- };
-}
-export namespace CurrentUserForProfile {
- export type Variables = {
- };
+export type SubmitCommentMutation = ({ __typename?: 'Mutation' } & { submitComment: Maybe<({ __typename?: 'Comment' } & CommentsPageCommentFragment)> });
- export type Query = {
- __typename?: 'Query';
+export type VoteButtonsFragment = ({ __typename?: 'Entry' } & Pick & { vote: ({ __typename?: 'Vote' } & Pick) });
- currentUser: Maybe;
- };
+export type VoteMutationVariables = {
+ repoFullName: string,
+ type: VoteType
+};
- export type CurrentUser = {
- __typename?: 'User';
-
- login: string;
-
- avatar_url: string;
- };
-}
-
-export namespace Feed {
- export type Variables = {
- type: FeedType;
- offset?: Maybe;
- limit?: Maybe;
- };
-
- export type Query = {
- __typename?: 'Query';
-
- currentUser: Maybe;
-
- feed: Maybe<(Maybe)[]>;
- };
-
- export type CurrentUser = {
- __typename?: 'User';
-
- login: string;
- };
-
- export type Feed = FeedEntry.Fragment;
-}
-
-export namespace SubmitRepository {
- export type Variables = {
- repoFullName: string;
- };
-
- export type Mutation = {
- __typename?: 'Mutation';
-
- submitRepository: Maybe;
- };
-
- export type SubmitRepository = {
- __typename?: 'Entry';
-
- createdAt: number;
- };
-}
-
-export namespace SubmitComment {
- export type Variables = {
- repoFullName: string;
- commentContent: string;
- };
-
- export type Mutation = {
- __typename?: 'Mutation';
-
- submitComment: Maybe;
- };
-
- export type SubmitComment = CommentsPageComment.Fragment;
-}
-
-export namespace Vote {
- export type Variables = {
- repoFullName: string;
- type: VoteType;
- };
-
- export type Mutation = {
- __typename?: 'Mutation';
-
- vote: Maybe;
- };
-
- export type Vote = {
- __typename?: 'Entry';
-
- score: number;
-
- id: number;
-
- vote: _Vote;
- };
-
- export type _Vote = {
- __typename?: 'Vote';
-
- vote_value: number;
- };
-}
-
-export namespace CommentsPageComment {
- export type Fragment = {
- __typename?: 'Comment';
-
- id: number;
-
- postedBy: PostedBy;
-
- createdAt: number;
-
- content: string;
- };
-
- export type PostedBy = {
- __typename?: 'User';
-
- login: string;
-
- html_url: string;
- };
-}
-
-export namespace FeedEntry {
- export type Fragment = {
- __typename?: 'Entry';
-
- id: number;
-
- commentCount: number;
-
- repository: Repository;
- } & (VoteButtons.Fragment & RepoInfo.Fragment);
-
- export type Repository = {
- __typename?: 'Repository';
-
- full_name: string;
-
- html_url: string;
-
- owner: Maybe;
- };
-
- export type Owner = {
- __typename?: 'User';
-
- avatar_url: string;
- };
-}
-
-export namespace RepoInfo {
- export type Fragment = {
- __typename?: 'Entry';
-
- createdAt: number;
-
- repository: Repository;
-
- postedBy: PostedBy;
- };
-
- export type Repository = {
- __typename?: 'Repository';
-
- description: Maybe;
-
- stargazers_count: number;
-
- open_issues_count: Maybe;
- };
-
- export type PostedBy = {
- __typename?: 'User';
-
- html_url: string;
-
- login: string;
- };
-}
-
-export namespace VoteButtons {
- export type Fragment = {
- __typename?: 'Entry';
-
- score: number;
-
- vote: Vote;
- };
-
- export type Vote = {
- __typename?: 'Vote';
-
- vote_value: number;
- };
-}
+export type VoteMutation = ({ __typename?: 'Mutation' } & { vote: Maybe<({ __typename?: 'Entry' } & Pick & { vote: ({ __typename?: 'Vote' } & Pick) })> });
diff --git a/dev-test/githunt/types.immutableTypes.ts b/dev-test/githunt/types.immutableTypes.ts
index 8e02e202a19..84453cd6bb6 100644
--- a/dev-test/githunt/types.immutableTypes.ts
+++ b/dev-test/githunt/types.immutableTypes.ts
@@ -1,323 +1,168 @@
-export type Maybe = T | null;
-
-/** A list of options for the sort order of the feed */
- export enum FeedType {
- Hot = 'HOT',
- New = 'NEW',
- Top = 'TOP',
- }
-/** The type of vote to record, when submitting a vote */
- export enum VoteType {
- Up = 'UP',
- Down = 'DOWN',
- Cancel = 'CANCEL',
- }
-
-
-// ====================================================
-// Documents
-// ====================================================
-
-
-
-export namespace OnCommentAdded {
- export type Variables = {
- readonly repoFullName: string;
- };
-
- export type Subscription = {
- readonly __typename?: 'Subscription';
-
- readonly commentAdded: Maybe;
- };
-
- export type CommentAdded = {
- readonly __typename?: 'Comment';
-
- readonly id: number;
-
- readonly postedBy: PostedBy;
-
- readonly createdAt: number;
-
- readonly content: string;
- };
-
- export type PostedBy = {
- readonly __typename?: 'User';
-
- readonly login: string;
-
- readonly html_url: string;
- };
+type Maybe = T | null;
+export type Comment = {
+ readonly id: number,
+ readonly postedBy: User,
+ readonly createdAt: number,
+ readonly content: string,
+ readonly repoName: string,
+};
+
+export type Entry = {
+ readonly repository: Repository,
+ readonly postedBy: User,
+ readonly createdAt: number,
+ readonly score: number,
+ readonly hotScore: number,
+ readonly comments: ReadonlyArray>,
+ readonly commentCount: number,
+ readonly id: number,
+ readonly vote: Vote,
+};
+
+
+export type EntryCommentsArgs = {
+ limit?: Maybe,
+ offset?: Maybe
+};
+
+export enum FeedType {
+ Hot = 'HOT',
+ New = 'NEW',
+ Top = 'TOP'
}
-export namespace Comment {
- export type Variables = {
- readonly repoFullName: string;
- readonly limit?: Maybe;
- readonly offset?: Maybe;
- };
-
- export type Query = {
- readonly __typename?: 'Query';
-
- readonly currentUser: Maybe;
-
- readonly entry: Maybe;
- };
+export type Mutation = {
+ readonly submitRepository?: Maybe,
+ readonly vote?: Maybe,
+ readonly submitComment?: Maybe,
+};
- export type CurrentUser = {
- readonly __typename?: 'User';
- readonly login: string;
+export type MutationSubmitRepositoryArgs = {
+ repoFullName: string
+};
- readonly html_url: string;
- };
- export type Entry = {
- readonly __typename?: 'Entry';
+export type MutationVoteArgs = {
+ repoFullName: string,
+ type: VoteType
+};
- readonly id: number;
- readonly postedBy: PostedBy;
+export type MutationSubmitCommentArgs = {
+ repoFullName: string,
+ commentContent: string
+};
- readonly createdAt: number;
+export type Query = {
+ readonly feed?: Maybe>>,
+ readonly entry?: Maybe,
+ readonly currentUser?: Maybe,
+};
- readonly comments: ReadonlyArray>;
- readonly commentCount: number;
+export type QueryFeedArgs = {
+ type: FeedType,
+ offset?: Maybe,
+ limit?: Maybe
+};
- readonly repository: Repository;
- };
- export type PostedBy = {
- readonly __typename?: 'User';
+export type QueryEntryArgs = {
+ repoFullName: string
+};
- readonly login: string;
+export type Repository = {
+ readonly name: string,
+ readonly full_name: string,
+ readonly description?: Maybe,
+ readonly html_url: string,
+ readonly stargazers_count: number,
+ readonly open_issues_count?: Maybe,
+ readonly owner?: Maybe,
+};
- readonly html_url: string;
- };
+export type Subscription = {
+ readonly commentAdded?: Maybe,
+};
- export type Comments = CommentsPageComment.Fragment;
- export type Repository = {
- readonly __typename?: RepositoryInlineFragment['__typename'];
+export type SubscriptionCommentAddedArgs = {
+ repoFullName: string
+};
- readonly full_name: string;
+export type User = {
+ readonly login: string,
+ readonly avatar_url: string,
+ readonly html_url: string,
+};
- readonly html_url: string;
- } & RepositoryInlineFragment;
+export type Vote = {
+ readonly vote_value: number,
+};
- export type RepositoryInlineFragment = {
- readonly __typename?: 'Repository';
-
- readonly description: Maybe;
-
- readonly open_issues_count: Maybe;
-
- readonly stargazers_count: number;
- };
-}
-
-export namespace CurrentUserForProfile {
- export type Variables = {
- };
-
- export type Query = {
- readonly __typename?: 'Query';
-
- readonly currentUser: Maybe;
- };
-
- export type CurrentUser = {
- readonly __typename?: 'User';
-
- readonly login: string;
-
- readonly avatar_url: string;
- };
+export enum VoteType {
+ Up = 'UP',
+ Down = 'DOWN',
+ Cancel = 'CANCEL'
}
+export type OnCommentAddedSubscriptionVariables = {
+ repoFullName: string
+};
-export namespace Feed {
- export type Variables = {
- readonly type: FeedType;
- readonly offset?: Maybe;
- readonly limit?: Maybe;
- };
- export type Query = {
- readonly __typename?: 'Query';
+export type OnCommentAddedSubscription = ({ readonly __typename?: 'Subscription' } & { readonly commentAdded: Maybe<({ readonly __typename?: 'Comment' } & Pick & { readonly postedBy: ({ readonly __typename?: 'User' } & Pick) })> });
- readonly currentUser: Maybe;
+export type CommentQueryVariables = {
+ repoFullName: string,
+ limit?: Maybe,
+ offset?: Maybe
+};
- readonly feed: Maybe>>;
- };
- export type CurrentUser = {
- readonly __typename?: 'User';
+export type CommentQuery = ({ readonly __typename?: 'Query' } & { readonly currentUser: Maybe<({ readonly __typename?: 'User' } & Pick)>, readonly entry: Maybe<({ readonly __typename?: 'Entry' } & Pick & { readonly postedBy: ({ readonly __typename?: 'User' } & Pick), readonly comments: ReadonlyArray>, readonly repository: ({ readonly __typename?: 'Repository' } & Pick & (({ readonly __typename?: 'Repository' } & Pick))) })> });
- readonly login: string;
- };
+export type CommentsPageCommentFragment = ({ readonly __typename?: 'Comment' } & Pick & { readonly postedBy: ({ readonly __typename?: 'User' } & Pick) });
- export type Feed = FeedEntry.Fragment;
-}
+export type CurrentUserForProfileQueryVariables = {};
-export namespace SubmitRepository {
- export type Variables = {
- readonly repoFullName: string;
- };
- export type Mutation = {
- readonly __typename?: 'Mutation';
+export type CurrentUserForProfileQuery = ({ readonly __typename?: 'Query' } & { readonly currentUser: Maybe<({ readonly __typename?: 'User' } & Pick)> });
- readonly submitRepository: Maybe;
- };
+export type FeedEntryFragment = ({ readonly __typename?: 'Entry' } & Pick & { readonly repository: ({ readonly __typename?: 'Repository' } & Pick & { readonly owner: Maybe<({ readonly __typename?: 'User' } & Pick)> }) } & (VoteButtonsFragment & RepoInfoFragment));
- export type SubmitRepository = {
- readonly __typename?: 'Entry';
+export type FeedQueryVariables = {
+ type: FeedType,
+ offset?: Maybe,
+ limit?: Maybe
+};
- readonly createdAt: number;
- };
-}
-export namespace SubmitComment {
- export type Variables = {
- readonly repoFullName: string;
- readonly commentContent: string;
- };
+export type FeedQuery = ({ readonly __typename?: 'Query' } & { readonly currentUser: Maybe<({ readonly __typename?: 'User' } & Pick)>, readonly feed: Maybe>> });
- export type Mutation = {
- readonly __typename?: 'Mutation';
+export type SubmitRepositoryMutationVariables = {
+ repoFullName: string
+};
- readonly submitComment: Maybe;
- };
-
- export type SubmitComment = CommentsPageComment.Fragment;
-}
-export namespace Vote {
- export type Variables = {
- readonly repoFullName: string;
- readonly type: VoteType;
- };
+export type SubmitRepositoryMutation = ({ readonly __typename?: 'Mutation' } & { readonly submitRepository: Maybe<({ readonly __typename?: 'Entry' } & Pick)> });
- export type Mutation = {
- readonly __typename?: 'Mutation';
+export type RepoInfoFragment = ({ readonly __typename?: 'Entry' } & Pick & { readonly repository: ({ readonly __typename?: 'Repository' } & Pick), readonly postedBy: ({ readonly __typename?: 'User' } & Pick) });
- readonly vote: Maybe;
- };
+export type SubmitCommentMutationVariables = {
+ repoFullName: string,
+ commentContent: string
+};
- export type Vote = {
- readonly __typename?: 'Entry';
- readonly score: number;
+export type SubmitCommentMutation = ({ readonly __typename?: 'Mutation' } & { readonly submitComment: Maybe<({ readonly __typename?: 'Comment' } & CommentsPageCommentFragment)> });
- readonly id: number;
-
- readonly vote: _Vote;
- };
-
- export type _Vote = {
- readonly __typename?: 'Vote';
-
- readonly vote_value: number;
- };
-}
+export type VoteButtonsFragment = ({ readonly __typename?: 'Entry' } & Pick & { readonly vote: ({ readonly __typename?: 'Vote' } & Pick) });
-export namespace CommentsPageComment {
- export type Fragment = {
- readonly __typename?: 'Comment';
+export type VoteMutationVariables = {
+ repoFullName: string,
+ type: VoteType
+};
- readonly id: number;
-
- readonly postedBy: PostedBy;
-
- readonly createdAt: number;
-
- readonly content: string;
- };
-
- export type PostedBy = {
- readonly __typename?: 'User';
-
- readonly login: string;
-
- readonly html_url: string;
- };
-}
-
-export namespace FeedEntry {
- export type Fragment = {
- readonly __typename?: 'Entry';
-
- readonly id: number;
-
- readonly commentCount: number;
-
- readonly repository: Repository;
- } & (VoteButtons.Fragment & RepoInfo.Fragment);
-
- export type Repository = {
- readonly __typename?: 'Repository';
-
- readonly full_name: string;
-
- readonly html_url: string;
-
- readonly owner: Maybe;
- };
-
- export type Owner = {
- readonly __typename?: 'User';
-
- readonly avatar_url: string;
- };
-}
-
-export namespace RepoInfo {
- export type Fragment = {
- readonly __typename?: 'Entry';
-
- readonly createdAt: number;
-
- readonly repository: Repository;
-
- readonly postedBy: PostedBy;
- };
-
- export type Repository = {
- readonly __typename?: 'Repository';
-
- readonly description: Maybe;
-
- readonly stargazers_count: number;
-
- readonly open_issues_count: Maybe