diff --git a/.changeset/@graphql-codegen_cli-10496-dependencies.md b/.changeset/@graphql-codegen_cli-10496-dependencies.md
new file mode 100644
index 00000000000..1da26fe3256
--- /dev/null
+++ b/.changeset/@graphql-codegen_cli-10496-dependencies.md
@@ -0,0 +1,6 @@
+---
+"@graphql-codegen/cli": patch
+---
+dependencies updates:
+ - Updated dependency [`@graphql-codegen/client-preset@^5.2.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/client-preset/v/5.2.0) (from `^5.1.2`, in `dependencies`)
+ - Updated dependency [`@graphql-codegen/plugin-helpers@^6.1.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/plugin-helpers/v/6.1.0) (from `^6.0.0`, in `dependencies`)
diff --git a/.changeset/@graphql-codegen_client-preset-10496-dependencies.md b/.changeset/@graphql-codegen_client-preset-10496-dependencies.md
new file mode 100644
index 00000000000..aa76a06c453
--- /dev/null
+++ b/.changeset/@graphql-codegen_client-preset-10496-dependencies.md
@@ -0,0 +1,10 @@
+---
+"@graphql-codegen/client-preset": patch
+---
+dependencies updates:
+ - Updated dependency [`@graphql-codegen/typed-document-node@^6.1.3` ↗︎](https://www.npmjs.com/package/@graphql-codegen/typed-document-node/v/6.1.3) (from `^6.1.2`, in `dependencies`)
+ - Updated dependency [`@graphql-codegen/typescript@^5.0.5` ↗︎](https://www.npmjs.com/package/@graphql-codegen/typescript/v/5.0.5) (from `^5.0.4`, in `dependencies`)
+ - Updated dependency [`@graphql-codegen/typescript-operations@^5.0.5` ↗︎](https://www.npmjs.com/package/@graphql-codegen/typescript-operations/v/5.0.5) (from `^5.0.4`, in `dependencies`)
+ - Updated dependency [`@graphql-codegen/gql-tag-operations@5.1.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/gql-tag-operations/v/5.1.0) (from `5.0.5`, in `dependencies`)
+ - Updated dependency [`@graphql-codegen/plugin-helpers@^6.1.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/plugin-helpers/v/6.1.0) (from `^6.0.0`, in `dependencies`)
+ - Updated dependency [`@graphql-codegen/visitor-plugin-common@^6.2.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/visitor-plugin-common/v/6.2.0) (from `^6.1.2`, in `dependencies`)
diff --git a/.changeset/@graphql-codegen_gql-tag-operations-10496-dependencies.md b/.changeset/@graphql-codegen_gql-tag-operations-10496-dependencies.md
new file mode 100644
index 00000000000..8b556536d8a
--- /dev/null
+++ b/.changeset/@graphql-codegen_gql-tag-operations-10496-dependencies.md
@@ -0,0 +1,6 @@
+---
+"@graphql-codegen/gql-tag-operations": patch
+---
+dependencies updates:
+ - Updated dependency [`@graphql-codegen/plugin-helpers@^6.1.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/plugin-helpers/v/6.1.0) (from `^6.0.0`, in `dependencies`)
+ - Updated dependency [`@graphql-codegen/visitor-plugin-common@6.2.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/visitor-plugin-common/v/6.2.0) (from `6.1.2`, in `dependencies`)
diff --git a/.changeset/@graphql-codegen_graphql-modules-preset-10496-dependencies.md b/.changeset/@graphql-codegen_graphql-modules-preset-10496-dependencies.md
new file mode 100644
index 00000000000..5251ebebfdb
--- /dev/null
+++ b/.changeset/@graphql-codegen_graphql-modules-preset-10496-dependencies.md
@@ -0,0 +1,6 @@
+---
+"@graphql-codegen/graphql-modules-preset": patch
+---
+dependencies updates:
+ - Updated dependency [`@graphql-codegen/plugin-helpers@^6.1.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/plugin-helpers/v/6.1.0) (from `^6.0.0`, in `dependencies`)
+ - Updated dependency [`@graphql-codegen/visitor-plugin-common@6.2.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/visitor-plugin-common/v/6.2.0) (from `6.1.2`, in `dependencies`)
diff --git a/.changeset/@graphql-codegen_typed-document-node-10496-dependencies.md b/.changeset/@graphql-codegen_typed-document-node-10496-dependencies.md
new file mode 100644
index 00000000000..ffc6eb27d68
--- /dev/null
+++ b/.changeset/@graphql-codegen_typed-document-node-10496-dependencies.md
@@ -0,0 +1,6 @@
+---
+"@graphql-codegen/typed-document-node": patch
+---
+dependencies updates:
+ - Updated dependency [`@graphql-codegen/plugin-helpers@^6.1.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/plugin-helpers/v/6.1.0) (from `^6.0.0`, in `dependencies`)
+ - Updated dependency [`@graphql-codegen/visitor-plugin-common@6.2.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/visitor-plugin-common/v/6.2.0) (from `6.1.2`, in `dependencies`)
diff --git a/.changeset/@graphql-codegen_typescript-10496-dependencies.md b/.changeset/@graphql-codegen_typescript-10496-dependencies.md
new file mode 100644
index 00000000000..7f1cbc7a52e
--- /dev/null
+++ b/.changeset/@graphql-codegen_typescript-10496-dependencies.md
@@ -0,0 +1,6 @@
+---
+"@graphql-codegen/typescript": patch
+---
+dependencies updates:
+ - Updated dependency [`@graphql-codegen/plugin-helpers@^6.1.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/plugin-helpers/v/6.1.0) (from `^6.0.0`, in `dependencies`)
+ - Updated dependency [`@graphql-codegen/visitor-plugin-common@6.2.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/visitor-plugin-common/v/6.2.0) (from `6.1.2`, in `dependencies`)
diff --git a/.changeset/@graphql-codegen_typescript-document-nodes-10496-dependencies.md b/.changeset/@graphql-codegen_typescript-document-nodes-10496-dependencies.md
new file mode 100644
index 00000000000..e26048ceb9c
--- /dev/null
+++ b/.changeset/@graphql-codegen_typescript-document-nodes-10496-dependencies.md
@@ -0,0 +1,6 @@
+---
+"@graphql-codegen/typescript-document-nodes": patch
+---
+dependencies updates:
+ - Updated dependency [`@graphql-codegen/plugin-helpers@^6.1.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/plugin-helpers/v/6.1.0) (from `^6.0.0`, in `dependencies`)
+ - Updated dependency [`@graphql-codegen/visitor-plugin-common@6.2.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/visitor-plugin-common/v/6.2.0) (from `6.1.2`, in `dependencies`)
diff --git a/.changeset/@graphql-codegen_typescript-operations-10496-dependencies.md b/.changeset/@graphql-codegen_typescript-operations-10496-dependencies.md
new file mode 100644
index 00000000000..f987ce2292c
--- /dev/null
+++ b/.changeset/@graphql-codegen_typescript-operations-10496-dependencies.md
@@ -0,0 +1,7 @@
+---
+"@graphql-codegen/typescript-operations": patch
+---
+dependencies updates:
+ - Updated dependency [`@graphql-codegen/plugin-helpers@^6.1.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/plugin-helpers/v/6.1.0) (from `^6.0.0`, in `dependencies`)
+ - Updated dependency [`@graphql-codegen/typescript@^5.0.5` ↗︎](https://www.npmjs.com/package/@graphql-codegen/typescript/v/5.0.5) (from `^5.0.4`, in `dependencies`)
+ - Updated dependency [`@graphql-codegen/visitor-plugin-common@6.2.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/visitor-plugin-common/v/6.2.0) (from `6.1.2`, in `dependencies`)
diff --git a/.changeset/@graphql-codegen_typescript-resolvers-10496-dependencies.md b/.changeset/@graphql-codegen_typescript-resolvers-10496-dependencies.md
new file mode 100644
index 00000000000..90c2beaf989
--- /dev/null
+++ b/.changeset/@graphql-codegen_typescript-resolvers-10496-dependencies.md
@@ -0,0 +1,7 @@
+---
+"@graphql-codegen/typescript-resolvers": patch
+---
+dependencies updates:
+ - Updated dependency [`@graphql-codegen/plugin-helpers@^6.1.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/plugin-helpers/v/6.1.0) (from `^6.0.0`, in `dependencies`)
+ - Updated dependency [`@graphql-codegen/typescript@^5.0.5` ↗︎](https://www.npmjs.com/package/@graphql-codegen/typescript/v/5.0.5) (from `^5.0.4`, in `dependencies`)
+ - Updated dependency [`@graphql-codegen/visitor-plugin-common@6.2.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/visitor-plugin-common/v/6.2.0) (from `6.1.2`, in `dependencies`)
diff --git a/.changeset/@graphql-codegen_visitor-plugin-common-10496-dependencies.md b/.changeset/@graphql-codegen_visitor-plugin-common-10496-dependencies.md
new file mode 100644
index 00000000000..7e6a61d5d42
--- /dev/null
+++ b/.changeset/@graphql-codegen_visitor-plugin-common-10496-dependencies.md
@@ -0,0 +1,5 @@
+---
+"@graphql-codegen/visitor-plugin-common": patch
+---
+dependencies updates:
+ - Updated dependency [`@graphql-codegen/plugin-helpers@^6.1.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/plugin-helpers/v/6.1.0) (from `^6.0.0`, in `dependencies`)
diff --git a/.changeset/clever-loops-crash.md b/.changeset/clever-loops-crash.md
new file mode 100644
index 00000000000..c28b7d69057
--- /dev/null
+++ b/.changeset/clever-loops-crash.md
@@ -0,0 +1,6 @@
+---
+'@graphql-codegen/visitor-plugin-common': minor
+'@graphql-codegen/typescript-operations': minor
+---
+
+Add importSchemaTypesFrom support
diff --git a/.changeset/curly-trees-lead.md b/.changeset/curly-trees-lead.md
new file mode 100644
index 00000000000..e6aab78bdca
--- /dev/null
+++ b/.changeset/curly-trees-lead.md
@@ -0,0 +1,5 @@
+---
+'@graphql-codegen/typescript-operations': major
+---
+
+BREAKING CHANGE: typescript-operations plugin now generates enum if it is used in operation.
diff --git a/.changeset/khaki-turtles-juggle.md b/.changeset/khaki-turtles-juggle.md
new file mode 100644
index 00000000000..bb0e0614a6a
--- /dev/null
+++ b/.changeset/khaki-turtles-juggle.md
@@ -0,0 +1,6 @@
+---
+'@graphql-codegen/typescript-operations': major
+'@graphql-codegen/typescript': minor
+---
+
+The `typescript-operations` plugin no longer generates InputMaybe and Scalars types; it now uses native Typescript types instead.
diff --git a/.changeset/lovely-sloths-kiss.md b/.changeset/lovely-sloths-kiss.md
new file mode 100644
index 00000000000..3005f29b02b
--- /dev/null
+++ b/.changeset/lovely-sloths-kiss.md
@@ -0,0 +1,7 @@
+---
+'@graphql-codegen/typescript-operations': major
+'@graphql-codegen/typescript': major
+'@graphql-codegen/client-preset': major
+---
+
+BREAKING CHANGE: `typescript` plugin no longer generates `Exact` utility type. Instead, `typescript-operations` generates said utility type for every file it creates. This is because it is used _only_ for `Variables`, so we only need to generate it once for every generated operation file.
diff --git a/.changeset/proud-cougars-hear.md b/.changeset/proud-cougars-hear.md
new file mode 100644
index 00000000000..f02764b32ff
--- /dev/null
+++ b/.changeset/proud-cougars-hear.md
@@ -0,0 +1,5 @@
+---
+'@graphql-codegen/visitor-plugin-common': major
+---
+
+BREAKING CHANGE: `@graphql-codegen/visitor-plugin-common`'s `base-types-visitor` no longer has `getNodeComment` or `buildEnumValuesBlock` method.
diff --git a/.changeset/proud-jobs-decide.md b/.changeset/proud-jobs-decide.md
new file mode 100644
index 00000000000..36c3a298ac4
--- /dev/null
+++ b/.changeset/proud-jobs-decide.md
@@ -0,0 +1,6 @@
+---
+'@graphql-codegen/visitor-plugin-common': minor
+'@graphql-codegen/typescript-operations': minor
+---
+
+Add generatesOperationTypes to typescript-operations to allow omitting operation types such as Variables, Query/Mutation/Subscription selection set, and Fragment types
diff --git a/.changeset/salty-guests-retire.md b/.changeset/salty-guests-retire.md
new file mode 100644
index 00000000000..78587b447ad
--- /dev/null
+++ b/.changeset/salty-guests-retire.md
@@ -0,0 +1,6 @@
+---
+'@graphql-codegen/typescript-operations': major
+'@graphql-codegen/client-preset': major
+---
+
+Integrate new typescript-operations into client-preset
diff --git a/.changeset/silly-kiwis-sip.md b/.changeset/silly-kiwis-sip.md
new file mode 100644
index 00000000000..31295846e7e
--- /dev/null
+++ b/.changeset/silly-kiwis-sip.md
@@ -0,0 +1,5 @@
+---
+'@graphql-codegen/typescript': patch
+---
+
+Extract utilities from base-type-visitor to be shared with other plugins later: convertSchemaEnumToDeclarationBlockString, getNodeComment
diff --git a/.changeset/tidy-jobs-unite.md b/.changeset/tidy-jobs-unite.md
new file mode 100644
index 00000000000..c4eb57e9cd1
--- /dev/null
+++ b/.changeset/tidy-jobs-unite.md
@@ -0,0 +1,9 @@
+---
+'@graphql-codegen/visitor-plugin-common': patch
+'@graphql-codegen/typescript-operations': patch
+'@graphql-codegen/typescript': patch
+'@graphql-codegen/typescript-resolvers': patch
+'@graphql-codegen/client-preset': patch
+---
+
+Abstract how enum imports are generated into visitor-plugin-common package
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 1584793fa41..caa2bf6d938 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -4,9 +4,11 @@ on:
push:
branches:
- master
+ - master-next # FIXME:eddeee888 Remove once done
pull_request:
branches:
- master
+ - master-next # FIXME:eddeee888 Remove once released
env:
NODE_OPTIONS: '--max_old_space_size=4096'
diff --git a/README.md b/README.md
index 823b7e7ece5..64d27e9e5db 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,5 @@
+FIXME:eddeee888
+
diff --git a/dev-test/codegen.ts b/dev-test/codegen.ts
index 04584a36395..075ee2918be 100644
--- a/dev-test/codegen.ts
+++ b/dev-test/codegen.ts
@@ -40,7 +40,6 @@ const config: CodegenConfig = {
{ add: { content: 'declare namespace GraphQL {' } },
{ add: { placement: 'append', content: '}' } },
'typescript',
- 'typescript-operations',
],
},
'./dev-test/test-schema/env.types.ts': { schema: process.env.SCHEMA_PATH, plugins: ['typescript'] },
@@ -65,81 +64,81 @@ const config: CodegenConfig = {
'./dev-test/githunt/typed-document-nodes.ts': {
schema: './dev-test/githunt/schema.json',
documents: './dev-test/githunt/**/*.graphql',
- plugins: ['typescript', 'typescript-operations', 'typed-document-node'],
+ plugins: ['typescript-operations', 'typed-document-node'],
},
'./dev-test/githunt/types.ts': {
schema: './dev-test/githunt/schema.json',
documents: './dev-test/githunt/**/*.graphql',
- plugins: ['typescript', 'typescript-operations'],
+ plugins: ['typescript-operations'],
},
'./dev-test/githunt/types.preResolveTypes.ts': {
schema: './dev-test/githunt/schema.json',
documents: './dev-test/githunt/**/*.graphql',
config: { preResolveTypes: true },
- plugins: ['typescript', 'typescript-operations'],
+ plugins: ['typescript-operations'],
},
'./dev-test/githunt/types.onlyEnums.ts': {
schema: './dev-test/githunt/schema.json',
documents: './dev-test/githunt/**/*.graphql',
- config: { onlyEnums: true },
- plugins: ['typescript'],
+ config: { generatesOperationTypes: false },
+ plugins: ['typescript-operations'],
},
'./dev-test/githunt/types.preResolveTypes.onlyOperationTypes.ts': {
schema: './dev-test/githunt/schema.json',
documents: './dev-test/githunt/**/*.graphql',
- config: { preResolveTypes: true, onlyOperationTypes: true },
- plugins: ['typescript', 'typescript-operations'],
+ config: { preResolveTypes: true },
+ plugins: ['typescript-operations'],
},
'./dev-test/githunt/types.flatten.preResolveTypes.ts': {
schema: './dev-test/githunt/schema.json',
documents: './dev-test/githunt/**/*.graphql',
config: { preResolveTypes: true, flattenGeneratedTypes: true },
- plugins: ['typescript', 'typescript-operations'],
+ plugins: ['typescript-operations'],
},
'./dev-test/githunt/types.enumsAsTypes.ts': {
schema: './dev-test/githunt/schema.json',
documents: './dev-test/githunt/**/*.graphql',
- config: { enumsAsTypes: true },
- plugins: ['typescript', 'typescript-operations'],
+ config: { enumType: 'string-literal' },
+ plugins: ['typescript-operations'],
},
'./dev-test/githunt/types.d.ts': {
schema: './dev-test/githunt/schema.json',
documents: './dev-test/githunt/**/*.graphql',
- config: { enumsAsTypes: true },
- plugins: ['typescript', 'typescript-operations'],
+ config: {},
+ plugins: ['typescript-operations'],
},
'./dev-test/githunt/types.avoidOptionals.ts': {
schema: './dev-test/githunt/schema.json',
documents: './dev-test/githunt/**/*.graphql',
config: { avoidOptionals: true },
- plugins: ['typescript', 'typescript-operations'],
+ plugins: ['typescript-operations'],
},
'./dev-test/githunt/types.immutableTypes.ts': {
schema: './dev-test/githunt/schema.json',
documents: './dev-test/githunt/**/*.graphql',
config: { immutableTypes: true },
- plugins: ['typescript', 'typescript-operations'],
+ plugins: ['typescript-operations'],
},
'./dev-test/star-wars/types.ts': {
schema: './dev-test/star-wars/schema.json',
documents: './dev-test/star-wars/**/*.graphql',
- plugins: ['typescript', 'typescript-operations'],
+ plugins: ['typescript-operations'],
},
'./dev-test/star-wars/types.excludeQueryAlpha.ts': {
schema: './dev-test/star-wars/schema.json',
documents: ['./dev-test/star-wars/**/*.graphql', '!./dev-test/star-wars/**/ExcludeQueryAlpha.graphql'],
- plugins: ['typescript', 'typescript-operations'],
+ plugins: ['typescript-operations'],
},
'./dev-test/star-wars/types.excludeQueryBeta.ts': {
schema: './dev-test/star-wars/schema.json',
documents: ['./dev-test/star-wars/**/*.graphql', '!./dev-test/star-wars/**/ExcludeQueryBeta.graphql'],
- plugins: ['typescript', 'typescript-operations'],
+ plugins: ['typescript-operations'],
},
'./dev-test/star-wars/types.preResolveTypes.ts': {
schema: './dev-test/star-wars/schema.json',
documents: './dev-test/star-wars/**/*.graphql',
config: { preResolveTypes: true },
- plugins: ['typescript', 'typescript-operations'],
+ plugins: ['typescript-operations'],
},
'./dev-test/star-wars/types.OnlyEnums.ts': {
schema: './dev-test/star-wars/schema.json',
@@ -150,25 +149,25 @@ const config: CodegenConfig = {
'./dev-test/star-wars/types.preResolveTypes.onlyOperationTypes.ts': {
schema: './dev-test/star-wars/schema.json',
documents: './dev-test/star-wars/**/*.graphql',
- config: { preResolveTypes: true, onlyOperationTypes: true },
- plugins: ['typescript', 'typescript-operations'],
+ config: { preResolveTypes: true },
+ plugins: ['typescript-operations'],
},
'./dev-test/test-schema/types.preResolveTypes.ts': {
schema: './dev-test/test-schema/schema.graphql',
documents: ['query test { testArr1 testArr2 testArr3 }'],
config: { preResolveTypes: true },
- plugins: ['typescript', 'typescript-operations'],
+ plugins: ['typescript-operations'],
},
'./dev-test/test-schema/types.preResolveTypes.onlyOperationTypes.ts': {
schema: './dev-test/test-schema/schema.graphql',
documents: ['query test { testArr1 testArr2 testArr3 }'],
- config: { preResolveTypes: true, onlyOperationTypes: true },
- plugins: ['typescript', 'typescript-operations'],
+ config: { preResolveTypes: true },
+ plugins: ['typescript-operations'],
},
'./dev-test/star-wars/types.d.ts': {
schema: './dev-test/star-wars/schema.json',
- config: { enumsAsTypes: true },
- plugins: ['typescript', 'typescript-operations'],
+ config: { enumType: 'string-literal' },
+ plugins: ['typescript-operations'],
},
'./dev-test/modules/': {
schema: './dev-test/modules/*/types/*.graphql',
@@ -179,25 +178,25 @@ const config: CodegenConfig = {
'./dev-test/star-wars/types.globallyAvailable.d.ts': {
schema: './dev-test/star-wars/schema.json',
documents: './dev-test/star-wars/**/*.graphql',
- config: { enumsAsTypes: true, noExport: true },
- plugins: ['typescript', 'typescript-operations'],
+ config: { noExport: true },
+ plugins: ['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', 'typescript-operations'],
+ plugins: ['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', 'typescript-operations'],
+ plugins: ['typescript-operations'],
},
'./dev-test/star-wars/types.skipSchema.ts': {
schema: './dev-test/star-wars/schema.json',
documents: './dev-test/star-wars/**/*.graphql',
- plugins: ['typescript', 'typescript-operations'],
+ plugins: ['typescript-operations'],
},
'./dev-test/gql-tag-operations/gql/': {
schema: './dev-test/gql-tag-operations/schema.graphql',
@@ -224,7 +223,7 @@ const config: CodegenConfig = {
'./dev-test/test-null-value/result.d.ts': {
schema: './dev-test/test-null-value/schema.graphql',
documents: ['./dev-test/test-null-value/query.ts'],
- plugins: ['typescript', 'typescript-operations'],
+ plugins: ['typescript-operations'],
config: {
// The combination of these two flags caused the following issue:
// https://github.com/dotansimha/graphql-code-generator/pull/9709
@@ -256,6 +255,25 @@ const config: CodegenConfig = {
},
},
},
+
+ // standalone-operations
+ './dev-test/standalone-operations/import-schema-types/_base.generated.ts': {
+ schema: './dev-test/standalone-operations/schema.graphql',
+ documents: ['./dev-test/standalone-operations/import-schema-types/*.graphql'],
+ plugins: ['typescript-operations'],
+ config: {
+ generatesOperationTypes: false,
+ },
+ },
+ './dev-test/standalone-operations/import-schema-types/_types.generated.ts': {
+ schema: './dev-test/standalone-operations/schema.graphql',
+ documents: ['./dev-test/standalone-operations/import-schema-types/*.graphql'],
+ plugins: ['typescript-operations'],
+ config: {
+ importSchemaTypesFrom: './dev-test/standalone-operations/import-schema-types/_base.generated.ts',
+ namespacedImportName: 'Types',
+ },
+ },
},
};
diff --git a/dev-test/githunt/typed-document-nodes.ts b/dev-test/githunt/typed-document-nodes.ts
index 5d66b82c399..3cbeb500f21 100644
--- a/dev-test/githunt/typed-document-nodes.ts
+++ b/dev-test/githunt/typed-document-nodes.ts
@@ -1,176 +1,8 @@
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
-export type Maybe = T | null;
-export type InputMaybe = Maybe;
-export type Exact = { [K in keyof T]: T[K] };
-export type MakeOptional = Omit & { [SubKey in K]?: Maybe };
-export type MakeMaybe = Omit & { [SubKey in K]: Maybe };
-export type MakeEmpty = { [_ in K]?: never };
+type Exact = { [K in keyof T]: T[K] };
export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
-/** All built-in and custom scalars, mapped to their actual values */
-export type Scalars = {
- ID: { input: string; output: string };
- String: { input: string; output: string };
- Boolean: { input: boolean; output: boolean };
- Int: { input: number; output: number };
- Float: { input: number; output: number };
-};
-
-/** A comment about an entry, submitted by a user */
-export type Comment = {
- __typename?: 'Comment';
- /** The text of the comment */
- content: Scalars['String']['output'];
- /** A timestamp of when the comment was posted */
- createdAt: Scalars['Float']['output'];
- /** The SQL ID of this entry */
- id: Scalars['Int']['output'];
- /** The GitHub user who posted the comment */
- postedBy: User;
- /** The repository which this comment is about */
- repoName: Scalars['String']['output'];
-};
-
-/** Information about a GitHub repository submitted to GitHunt */
-export type Entry = {
- __typename?: 'Entry';
- /** The number of comments posted about this repository */
- commentCount: Scalars['Int']['output'];
- /** Comments posted about this repository */
- comments: Array>;
- /** A timestamp of when the entry was submitted */
- createdAt: Scalars['Float']['output'];
- /** The hot score of this repository */
- hotScore: Scalars['Float']['output'];
- /** The SQL ID of this entry */
- id: Scalars['Int']['output'];
- /** The GitHub user who submitted this entry */
- postedBy: User;
- /** Information about the repository from GitHub */
- repository: Repository;
- /** The score of this repository, upvotes - downvotes */
- score: Scalars['Int']['output'];
- /** XXX to be changed */
- vote: Vote;
-};
-
-/** Information about a GitHub repository submitted to GitHunt */
-export type EntryCommentsArgs = {
- limit?: InputMaybe;
- offset?: InputMaybe;
-};
-
-/** A list of options for the sort order of the feed */
-export enum FeedType {
- /** Sort by a combination of freshness and score, using Reddit's algorithm */
- Hot = 'HOT',
- /** Newest entries first */
- New = 'NEW',
- /** Highest score entries first */
- Top = 'TOP',
-}
-
-export type Mutation = {
- __typename?: 'Mutation';
- /** Comment on a repository, returns the new comment */
- submitComment?: Maybe;
- /** Submit a new repository, returns the new submission */
- submitRepository?: Maybe;
- /** Vote on a repository submission, returns the submission that was voted on */
- vote?: Maybe;
-};
-
-export type MutationSubmitCommentArgs = {
- commentContent: Scalars['String']['input'];
- repoFullName: Scalars['String']['input'];
-};
-
-export type MutationSubmitRepositoryArgs = {
- repoFullName: Scalars['String']['input'];
-};
-
-export type MutationVoteArgs = {
- repoFullName: Scalars['String']['input'];
- type: VoteType;
-};
-
-export type Query = {
- __typename?: 'Query';
- /** Return the currently logged in user, or null if nobody is logged in */
- currentUser?: Maybe;
- /** A single entry */
- entry?: Maybe;
- /** A feed of repository submissions */
- feed?: Maybe>>;
-};
-
-export type QueryEntryArgs = {
- repoFullName: Scalars['String']['input'];
-};
-
-export type QueryFeedArgs = {
- limit?: InputMaybe;
- offset?: InputMaybe;
- type: FeedType;
-};
-
-/**
- * A repository object from the GitHub API. This uses the exact field names returned by the
- * GitHub API for simplicity, even though the convention for GraphQL is usually to camel case.
- */
-export type Repository = {
- __typename?: 'Repository';
- /** The description of the repository */
- description?: Maybe;
- /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */
- full_name: Scalars['String']['output'];
- /** The link to the repository on GitHub */
- html_url: Scalars['String']['output'];
- /** Just the name of the repository, e.g. GitHunt-API */
- name: Scalars['String']['output'];
- /** The number of open issues on this repository on GitHub */
- open_issues_count?: Maybe;
- /** The owner of this repository on GitHub, e.g. apollostack */
- owner?: Maybe;
- /** The number of people who have starred this repository on GitHub */
- stargazers_count: Scalars['Int']['output'];
-};
-
-export type Subscription = {
- __typename?: 'Subscription';
- /** Subscription fires on every comment added */
- commentAdded?: Maybe;
-};
-
-export type SubscriptionCommentAddedArgs = {
- repoFullName: Scalars['String']['input'];
-};
-
-/** A user object from the GitHub API. This uses the exact field names returned from the GitHub API. */
-export type User = {
- __typename?: 'User';
- /** The URL to a directly embeddable image for this user's avatar */
- avatar_url: Scalars['String']['output'];
- /** The URL of this user's GitHub page */
- html_url: Scalars['String']['output'];
- /** The name of the user, e.g. apollostack */
- login: Scalars['String']['output'];
-};
-
-/** XXX to be removed */
-export type Vote = {
- __typename?: 'Vote';
- vote_value: Scalars['Int']['output'];
-};
-
-/** The type of vote to record, when submitting a vote */
-export enum VoteType {
- Cancel = 'CANCEL',
- Down = 'DOWN',
- Up = 'UP',
-}
-
export type OnCommentAddedSubscriptionVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
}>;
export type OnCommentAddedSubscription = {
@@ -185,9 +17,9 @@ export type OnCommentAddedSubscription = {
};
export type CommentQueryVariables = Exact<{
- repoFullName: Scalars['String']['input'];
- limit?: InputMaybe;
- offset?: InputMaybe;
+ repoFullName: string;
+ limit?: number | null;
+ offset?: number | null;
}>;
export type CommentQuery = {
@@ -253,8 +85,8 @@ export type FeedEntryFragment = {
export type FeedQueryVariables = Exact<{
type: FeedType;
- offset?: InputMaybe;
- limit?: InputMaybe;
+ offset?: number | null;
+ limit?: number | null;
}>;
export type FeedQuery = {
@@ -281,7 +113,7 @@ export type FeedQuery = {
};
export type SubmitRepositoryMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
}>;
export type SubmitRepositoryMutation = {
@@ -302,8 +134,8 @@ export type RepoInfoFragment = {
};
export type SubmitCommentMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
- commentContent: Scalars['String']['input'];
+ repoFullName: string;
+ commentContent: string;
}>;
export type SubmitCommentMutation = {
@@ -324,7 +156,7 @@ export type VoteButtonsFragment = {
};
export type VoteMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
type: VoteType;
}>;
diff --git a/dev-test/githunt/types.avoidOptionals.ts b/dev-test/githunt/types.avoidOptionals.ts
index fae92412f8c..e566e5cec23 100644
--- a/dev-test/githunt/types.avoidOptionals.ts
+++ b/dev-test/githunt/types.avoidOptionals.ts
@@ -1,175 +1,7 @@
-export type Maybe = T | null;
-export type InputMaybe = Maybe;
-export type Exact = { [K in keyof T]: T[K] };
-export type MakeOptional = Omit & { [SubKey in K]?: Maybe };
-export type MakeMaybe = Omit & { [SubKey in K]: Maybe };
-export type MakeEmpty = { [_ in K]?: never };
+type Exact = { [K in keyof T]: T[K] };
export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
-/** All built-in and custom scalars, mapped to their actual values */
-export type Scalars = {
- ID: { input: string; output: string };
- String: { input: string; output: string };
- Boolean: { input: boolean; output: boolean };
- Int: { input: number; output: number };
- Float: { input: number; output: number };
-};
-
-/** A comment about an entry, submitted by a user */
-export type Comment = {
- __typename?: 'Comment';
- /** The text of the comment */
- content: Scalars['String']['output'];
- /** A timestamp of when the comment was posted */
- createdAt: Scalars['Float']['output'];
- /** The SQL ID of this entry */
- id: Scalars['Int']['output'];
- /** The GitHub user who posted the comment */
- postedBy: User;
- /** The repository which this comment is about */
- repoName: Scalars['String']['output'];
-};
-
-/** Information about a GitHub repository submitted to GitHunt */
-export type Entry = {
- __typename?: 'Entry';
- /** The number of comments posted about this repository */
- commentCount: Scalars['Int']['output'];
- /** Comments posted about this repository */
- comments: Array>;
- /** A timestamp of when the entry was submitted */
- createdAt: Scalars['Float']['output'];
- /** The hot score of this repository */
- hotScore: Scalars['Float']['output'];
- /** The SQL ID of this entry */
- id: Scalars['Int']['output'];
- /** The GitHub user who submitted this entry */
- postedBy: User;
- /** Information about the repository from GitHub */
- repository: Repository;
- /** The score of this repository, upvotes - downvotes */
- score: Scalars['Int']['output'];
- /** XXX to be changed */
- vote: Vote;
-};
-
-/** Information about a GitHub repository submitted to GitHunt */
-export type EntryCommentsArgs = {
- limit: InputMaybe;
- offset: InputMaybe;
-};
-
-/** A list of options for the sort order of the feed */
-export enum FeedType {
- /** Sort by a combination of freshness and score, using Reddit's algorithm */
- Hot = 'HOT',
- /** Newest entries first */
- New = 'NEW',
- /** Highest score entries first */
- Top = 'TOP',
-}
-
-export type Mutation = {
- __typename?: 'Mutation';
- /** Comment on a repository, returns the new comment */
- submitComment: Maybe;
- /** Submit a new repository, returns the new submission */
- submitRepository: Maybe;
- /** Vote on a repository submission, returns the submission that was voted on */
- vote: Maybe;
-};
-
-export type MutationSubmitCommentArgs = {
- commentContent: Scalars['String']['input'];
- repoFullName: Scalars['String']['input'];
-};
-
-export type MutationSubmitRepositoryArgs = {
- repoFullName: Scalars['String']['input'];
-};
-
-export type MutationVoteArgs = {
- repoFullName: Scalars['String']['input'];
- type: VoteType;
-};
-
-export type Query = {
- __typename?: 'Query';
- /** Return the currently logged in user, or null if nobody is logged in */
- currentUser: Maybe;
- /** A single entry */
- entry: Maybe;
- /** A feed of repository submissions */
- feed: Maybe>>;
-};
-
-export type QueryEntryArgs = {
- repoFullName: Scalars['String']['input'];
-};
-
-export type QueryFeedArgs = {
- limit: InputMaybe;
- offset: InputMaybe;
- type: FeedType;
-};
-
-/**
- * A repository object from the GitHub API. This uses the exact field names returned by the
- * GitHub API for simplicity, even though the convention for GraphQL is usually to camel case.
- */
-export type Repository = {
- __typename?: 'Repository';
- /** The description of the repository */
- description: Maybe;
- /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */
- full_name: Scalars['String']['output'];
- /** The link to the repository on GitHub */
- html_url: Scalars['String']['output'];
- /** Just the name of the repository, e.g. GitHunt-API */
- name: Scalars['String']['output'];
- /** The number of open issues on this repository on GitHub */
- open_issues_count: Maybe;
- /** The owner of this repository on GitHub, e.g. apollostack */
- owner: Maybe;
- /** The number of people who have starred this repository on GitHub */
- stargazers_count: Scalars['Int']['output'];
-};
-
-export type Subscription = {
- __typename?: 'Subscription';
- /** Subscription fires on every comment added */
- commentAdded: Maybe;
-};
-
-export type SubscriptionCommentAddedArgs = {
- repoFullName: Scalars['String']['input'];
-};
-
-/** A user object from the GitHub API. This uses the exact field names returned from the GitHub API. */
-export type User = {
- __typename?: 'User';
- /** The URL to a directly embeddable image for this user's avatar */
- avatar_url: Scalars['String']['output'];
- /** The URL of this user's GitHub page */
- html_url: Scalars['String']['output'];
- /** The name of the user, e.g. apollostack */
- login: Scalars['String']['output'];
-};
-
-/** XXX to be removed */
-export type Vote = {
- __typename?: 'Vote';
- vote_value: Scalars['Int']['output'];
-};
-
-/** The type of vote to record, when submitting a vote */
-export enum VoteType {
- Cancel = 'CANCEL',
- Down = 'DOWN',
- Up = 'UP',
-}
-
export type OnCommentAddedSubscriptionVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
}>;
export type OnCommentAddedSubscription = {
@@ -184,9 +16,9 @@ export type OnCommentAddedSubscription = {
};
export type CommentQueryVariables = Exact<{
- repoFullName: Scalars['String']['input'];
- limit: InputMaybe;
- offset: InputMaybe;
+ repoFullName: string;
+ limit: number | null;
+ offset: number | null;
}>;
export type CommentQuery = {
@@ -252,8 +84,8 @@ export type FeedEntryFragment = {
export type FeedQueryVariables = Exact<{
type: FeedType;
- offset: InputMaybe;
- limit: InputMaybe;
+ offset: number | null;
+ limit: number | null;
}>;
export type FeedQuery = {
@@ -280,7 +112,7 @@ export type FeedQuery = {
};
export type SubmitRepositoryMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
}>;
export type SubmitRepositoryMutation = {
@@ -301,8 +133,8 @@ export type RepoInfoFragment = {
};
export type SubmitCommentMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
- commentContent: Scalars['String']['input'];
+ repoFullName: string;
+ commentContent: string;
}>;
export type SubmitCommentMutation = {
@@ -323,7 +155,7 @@ export type VoteButtonsFragment = {
};
export type VoteMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
type: VoteType;
}>;
diff --git a/dev-test/githunt/types.d.ts b/dev-test/githunt/types.d.ts
index a3214fa9248..87e35a2a5da 100644
--- a/dev-test/githunt/types.d.ts
+++ b/dev-test/githunt/types.d.ts
@@ -1,170 +1,7 @@
-export type Maybe = T | null;
-export type InputMaybe = Maybe;
-export type Exact = { [K in keyof T]: T[K] };
-export type MakeOptional = Omit & { [SubKey in K]?: Maybe };
-export type MakeMaybe = Omit & { [SubKey in K]: Maybe };
-export type MakeEmpty = { [_ in K]?: never };
+type Exact = { [K in keyof T]: T[K] };
export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
-/** All built-in and custom scalars, mapped to their actual values */
-export type Scalars = {
- ID: { input: string; output: string };
- String: { input: string; output: string };
- Boolean: { input: boolean; output: boolean };
- Int: { input: number; output: number };
- Float: { input: number; output: number };
-};
-
-/** A comment about an entry, submitted by a user */
-export type Comment = {
- __typename?: 'Comment';
- /** The text of the comment */
- content: Scalars['String']['output'];
- /** A timestamp of when the comment was posted */
- createdAt: Scalars['Float']['output'];
- /** The SQL ID of this entry */
- id: Scalars['Int']['output'];
- /** The GitHub user who posted the comment */
- postedBy: User;
- /** The repository which this comment is about */
- repoName: Scalars['String']['output'];
-};
-
-/** Information about a GitHub repository submitted to GitHunt */
-export type Entry = {
- __typename?: 'Entry';
- /** The number of comments posted about this repository */
- commentCount: Scalars['Int']['output'];
- /** Comments posted about this repository */
- comments: Array>;
- /** A timestamp of when the entry was submitted */
- createdAt: Scalars['Float']['output'];
- /** The hot score of this repository */
- hotScore: Scalars['Float']['output'];
- /** The SQL ID of this entry */
- id: Scalars['Int']['output'];
- /** The GitHub user who submitted this entry */
- postedBy: User;
- /** Information about the repository from GitHub */
- repository: Repository;
- /** The score of this repository, upvotes - downvotes */
- score: Scalars['Int']['output'];
- /** XXX to be changed */
- vote: Vote;
-};
-
-/** Information about a GitHub repository submitted to GitHunt */
-export type EntryCommentsArgs = {
- limit?: InputMaybe;
- offset?: InputMaybe;
-};
-
-/** A list of options for the sort order of the feed */
-export type FeedType =
- /** Sort by a combination of freshness and score, using Reddit's algorithm */
- | 'HOT'
- /** Newest entries first */
- | 'NEW'
- /** Highest score entries first */
- | 'TOP';
-
-export type Mutation = {
- __typename?: 'Mutation';
- /** Comment on a repository, returns the new comment */
- submitComment?: Maybe;
- /** Submit a new repository, returns the new submission */
- submitRepository?: Maybe;
- /** Vote on a repository submission, returns the submission that was voted on */
- vote?: Maybe;
-};
-
-export type MutationSubmitCommentArgs = {
- commentContent: Scalars['String']['input'];
- repoFullName: Scalars['String']['input'];
-};
-
-export type MutationSubmitRepositoryArgs = {
- repoFullName: Scalars['String']['input'];
-};
-
-export type MutationVoteArgs = {
- repoFullName: Scalars['String']['input'];
- type: VoteType;
-};
-
-export type Query = {
- __typename?: 'Query';
- /** Return the currently logged in user, or null if nobody is logged in */
- currentUser?: Maybe;
- /** A single entry */
- entry?: Maybe;
- /** A feed of repository submissions */
- feed?: Maybe>>;
-};
-
-export type QueryEntryArgs = {
- repoFullName: Scalars['String']['input'];
-};
-
-export type QueryFeedArgs = {
- limit?: InputMaybe;
- offset?: InputMaybe;
- type: FeedType;
-};
-
-/**
- * A repository object from the GitHub API. This uses the exact field names returned by the
- * GitHub API for simplicity, even though the convention for GraphQL is usually to camel case.
- */
-export type Repository = {
- __typename?: 'Repository';
- /** The description of the repository */
- description?: Maybe;
- /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */
- full_name: Scalars['String']['output'];
- /** The link to the repository on GitHub */
- html_url: Scalars['String']['output'];
- /** Just the name of the repository, e.g. GitHunt-API */
- name: Scalars['String']['output'];
- /** The number of open issues on this repository on GitHub */
- open_issues_count?: Maybe;
- /** The owner of this repository on GitHub, e.g. apollostack */
- owner?: Maybe;
- /** The number of people who have starred this repository on GitHub */
- stargazers_count: Scalars['Int']['output'];
-};
-
-export type Subscription = {
- __typename?: 'Subscription';
- /** Subscription fires on every comment added */
- commentAdded?: Maybe;
-};
-
-export type SubscriptionCommentAddedArgs = {
- repoFullName: Scalars['String']['input'];
-};
-
-/** A user object from the GitHub API. This uses the exact field names returned from the GitHub API. */
-export type User = {
- __typename?: 'User';
- /** The URL to a directly embeddable image for this user's avatar */
- avatar_url: Scalars['String']['output'];
- /** The URL of this user's GitHub page */
- html_url: Scalars['String']['output'];
- /** The name of the user, e.g. apollostack */
- login: Scalars['String']['output'];
-};
-
-/** XXX to be removed */
-export type Vote = {
- __typename?: 'Vote';
- vote_value: Scalars['Int']['output'];
-};
-
-/** The type of vote to record, when submitting a vote */
-export type VoteType = 'CANCEL' | 'DOWN' | 'UP';
-
export type OnCommentAddedSubscriptionVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
}>;
export type OnCommentAddedSubscription = {
@@ -179,9 +16,9 @@ export type OnCommentAddedSubscription = {
};
export type CommentQueryVariables = Exact<{
- repoFullName: Scalars['String']['input'];
- limit?: InputMaybe;
- offset?: InputMaybe;
+ repoFullName: string;
+ limit?: number | null;
+ offset?: number | null;
}>;
export type CommentQuery = {
@@ -247,8 +84,8 @@ export type FeedEntryFragment = {
export type FeedQueryVariables = Exact<{
type: FeedType;
- offset?: InputMaybe;
- limit?: InputMaybe;
+ offset?: number | null;
+ limit?: number | null;
}>;
export type FeedQuery = {
@@ -275,7 +112,7 @@ export type FeedQuery = {
};
export type SubmitRepositoryMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
}>;
export type SubmitRepositoryMutation = {
@@ -296,8 +133,8 @@ export type RepoInfoFragment = {
};
export type SubmitCommentMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
- commentContent: Scalars['String']['input'];
+ repoFullName: string;
+ commentContent: string;
}>;
export type SubmitCommentMutation = {
@@ -318,7 +155,7 @@ export type VoteButtonsFragment = {
};
export type VoteMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
type: VoteType;
}>;
diff --git a/dev-test/githunt/types.enumsAsTypes.ts b/dev-test/githunt/types.enumsAsTypes.ts
index a3214fa9248..87e35a2a5da 100644
--- a/dev-test/githunt/types.enumsAsTypes.ts
+++ b/dev-test/githunt/types.enumsAsTypes.ts
@@ -1,170 +1,7 @@
-export type Maybe = T | null;
-export type InputMaybe = Maybe;
-export type Exact = { [K in keyof T]: T[K] };
-export type MakeOptional = Omit & { [SubKey in K]?: Maybe };
-export type MakeMaybe = Omit & { [SubKey in K]: Maybe };
-export type MakeEmpty = { [_ in K]?: never };
+type Exact = { [K in keyof T]: T[K] };
export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
-/** All built-in and custom scalars, mapped to their actual values */
-export type Scalars = {
- ID: { input: string; output: string };
- String: { input: string; output: string };
- Boolean: { input: boolean; output: boolean };
- Int: { input: number; output: number };
- Float: { input: number; output: number };
-};
-
-/** A comment about an entry, submitted by a user */
-export type Comment = {
- __typename?: 'Comment';
- /** The text of the comment */
- content: Scalars['String']['output'];
- /** A timestamp of when the comment was posted */
- createdAt: Scalars['Float']['output'];
- /** The SQL ID of this entry */
- id: Scalars['Int']['output'];
- /** The GitHub user who posted the comment */
- postedBy: User;
- /** The repository which this comment is about */
- repoName: Scalars['String']['output'];
-};
-
-/** Information about a GitHub repository submitted to GitHunt */
-export type Entry = {
- __typename?: 'Entry';
- /** The number of comments posted about this repository */
- commentCount: Scalars['Int']['output'];
- /** Comments posted about this repository */
- comments: Array>;
- /** A timestamp of when the entry was submitted */
- createdAt: Scalars['Float']['output'];
- /** The hot score of this repository */
- hotScore: Scalars['Float']['output'];
- /** The SQL ID of this entry */
- id: Scalars['Int']['output'];
- /** The GitHub user who submitted this entry */
- postedBy: User;
- /** Information about the repository from GitHub */
- repository: Repository;
- /** The score of this repository, upvotes - downvotes */
- score: Scalars['Int']['output'];
- /** XXX to be changed */
- vote: Vote;
-};
-
-/** Information about a GitHub repository submitted to GitHunt */
-export type EntryCommentsArgs = {
- limit?: InputMaybe;
- offset?: InputMaybe;
-};
-
-/** A list of options for the sort order of the feed */
-export type FeedType =
- /** Sort by a combination of freshness and score, using Reddit's algorithm */
- | 'HOT'
- /** Newest entries first */
- | 'NEW'
- /** Highest score entries first */
- | 'TOP';
-
-export type Mutation = {
- __typename?: 'Mutation';
- /** Comment on a repository, returns the new comment */
- submitComment?: Maybe;
- /** Submit a new repository, returns the new submission */
- submitRepository?: Maybe;
- /** Vote on a repository submission, returns the submission that was voted on */
- vote?: Maybe;
-};
-
-export type MutationSubmitCommentArgs = {
- commentContent: Scalars['String']['input'];
- repoFullName: Scalars['String']['input'];
-};
-
-export type MutationSubmitRepositoryArgs = {
- repoFullName: Scalars['String']['input'];
-};
-
-export type MutationVoteArgs = {
- repoFullName: Scalars['String']['input'];
- type: VoteType;
-};
-
-export type Query = {
- __typename?: 'Query';
- /** Return the currently logged in user, or null if nobody is logged in */
- currentUser?: Maybe;
- /** A single entry */
- entry?: Maybe;
- /** A feed of repository submissions */
- feed?: Maybe>>;
-};
-
-export type QueryEntryArgs = {
- repoFullName: Scalars['String']['input'];
-};
-
-export type QueryFeedArgs = {
- limit?: InputMaybe;
- offset?: InputMaybe;
- type: FeedType;
-};
-
-/**
- * A repository object from the GitHub API. This uses the exact field names returned by the
- * GitHub API for simplicity, even though the convention for GraphQL is usually to camel case.
- */
-export type Repository = {
- __typename?: 'Repository';
- /** The description of the repository */
- description?: Maybe;
- /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */
- full_name: Scalars['String']['output'];
- /** The link to the repository on GitHub */
- html_url: Scalars['String']['output'];
- /** Just the name of the repository, e.g. GitHunt-API */
- name: Scalars['String']['output'];
- /** The number of open issues on this repository on GitHub */
- open_issues_count?: Maybe;
- /** The owner of this repository on GitHub, e.g. apollostack */
- owner?: Maybe;
- /** The number of people who have starred this repository on GitHub */
- stargazers_count: Scalars['Int']['output'];
-};
-
-export type Subscription = {
- __typename?: 'Subscription';
- /** Subscription fires on every comment added */
- commentAdded?: Maybe;
-};
-
-export type SubscriptionCommentAddedArgs = {
- repoFullName: Scalars['String']['input'];
-};
-
-/** A user object from the GitHub API. This uses the exact field names returned from the GitHub API. */
-export type User = {
- __typename?: 'User';
- /** The URL to a directly embeddable image for this user's avatar */
- avatar_url: Scalars['String']['output'];
- /** The URL of this user's GitHub page */
- html_url: Scalars['String']['output'];
- /** The name of the user, e.g. apollostack */
- login: Scalars['String']['output'];
-};
-
-/** XXX to be removed */
-export type Vote = {
- __typename?: 'Vote';
- vote_value: Scalars['Int']['output'];
-};
-
-/** The type of vote to record, when submitting a vote */
-export type VoteType = 'CANCEL' | 'DOWN' | 'UP';
-
export type OnCommentAddedSubscriptionVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
}>;
export type OnCommentAddedSubscription = {
@@ -179,9 +16,9 @@ export type OnCommentAddedSubscription = {
};
export type CommentQueryVariables = Exact<{
- repoFullName: Scalars['String']['input'];
- limit?: InputMaybe;
- offset?: InputMaybe;
+ repoFullName: string;
+ limit?: number | null;
+ offset?: number | null;
}>;
export type CommentQuery = {
@@ -247,8 +84,8 @@ export type FeedEntryFragment = {
export type FeedQueryVariables = Exact<{
type: FeedType;
- offset?: InputMaybe;
- limit?: InputMaybe;
+ offset?: number | null;
+ limit?: number | null;
}>;
export type FeedQuery = {
@@ -275,7 +112,7 @@ export type FeedQuery = {
};
export type SubmitRepositoryMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
}>;
export type SubmitRepositoryMutation = {
@@ -296,8 +133,8 @@ export type RepoInfoFragment = {
};
export type SubmitCommentMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
- commentContent: Scalars['String']['input'];
+ repoFullName: string;
+ commentContent: string;
}>;
export type SubmitCommentMutation = {
@@ -318,7 +155,7 @@ export type VoteButtonsFragment = {
};
export type VoteMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
type: VoteType;
}>;
diff --git a/dev-test/githunt/types.flatten.preResolveTypes.ts b/dev-test/githunt/types.flatten.preResolveTypes.ts
index 6a71babaaf6..a68bbeba546 100644
--- a/dev-test/githunt/types.flatten.preResolveTypes.ts
+++ b/dev-test/githunt/types.flatten.preResolveTypes.ts
@@ -1,175 +1,7 @@
-export type Maybe = T | null;
-export type InputMaybe = Maybe;
-export type Exact = { [K in keyof T]: T[K] };
-export type MakeOptional = Omit & { [SubKey in K]?: Maybe };
-export type MakeMaybe = Omit & { [SubKey in K]: Maybe };
-export type MakeEmpty = { [_ in K]?: never };
+type Exact = { [K in keyof T]: T[K] };
export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
-/** All built-in and custom scalars, mapped to their actual values */
-export type Scalars = {
- ID: { input: string; output: string };
- String: { input: string; output: string };
- Boolean: { input: boolean; output: boolean };
- Int: { input: number; output: number };
- Float: { input: number; output: number };
-};
-
-/** A comment about an entry, submitted by a user */
-export type Comment = {
- __typename?: 'Comment';
- /** The text of the comment */
- content: Scalars['String']['output'];
- /** A timestamp of when the comment was posted */
- createdAt: Scalars['Float']['output'];
- /** The SQL ID of this entry */
- id: Scalars['Int']['output'];
- /** The GitHub user who posted the comment */
- postedBy: User;
- /** The repository which this comment is about */
- repoName: Scalars['String']['output'];
-};
-
-/** Information about a GitHub repository submitted to GitHunt */
-export type Entry = {
- __typename?: 'Entry';
- /** The number of comments posted about this repository */
- commentCount: Scalars['Int']['output'];
- /** Comments posted about this repository */
- comments: Array>;
- /** A timestamp of when the entry was submitted */
- createdAt: Scalars['Float']['output'];
- /** The hot score of this repository */
- hotScore: Scalars['Float']['output'];
- /** The SQL ID of this entry */
- id: Scalars['Int']['output'];
- /** The GitHub user who submitted this entry */
- postedBy: User;
- /** Information about the repository from GitHub */
- repository: Repository;
- /** The score of this repository, upvotes - downvotes */
- score: Scalars['Int']['output'];
- /** XXX to be changed */
- vote: Vote;
-};
-
-/** Information about a GitHub repository submitted to GitHunt */
-export type EntryCommentsArgs = {
- limit?: InputMaybe;
- offset?: InputMaybe;
-};
-
-/** A list of options for the sort order of the feed */
-export enum FeedType {
- /** Sort by a combination of freshness and score, using Reddit's algorithm */
- Hot = 'HOT',
- /** Newest entries first */
- New = 'NEW',
- /** Highest score entries first */
- Top = 'TOP',
-}
-
-export type Mutation = {
- __typename?: 'Mutation';
- /** Comment on a repository, returns the new comment */
- submitComment?: Maybe;
- /** Submit a new repository, returns the new submission */
- submitRepository?: Maybe;
- /** Vote on a repository submission, returns the submission that was voted on */
- vote?: Maybe;
-};
-
-export type MutationSubmitCommentArgs = {
- commentContent: Scalars['String']['input'];
- repoFullName: Scalars['String']['input'];
-};
-
-export type MutationSubmitRepositoryArgs = {
- repoFullName: Scalars['String']['input'];
-};
-
-export type MutationVoteArgs = {
- repoFullName: Scalars['String']['input'];
- type: VoteType;
-};
-
-export type Query = {
- __typename?: 'Query';
- /** Return the currently logged in user, or null if nobody is logged in */
- currentUser?: Maybe;
- /** A single entry */
- entry?: Maybe;
- /** A feed of repository submissions */
- feed?: Maybe>>;
-};
-
-export type QueryEntryArgs = {
- repoFullName: Scalars['String']['input'];
-};
-
-export type QueryFeedArgs = {
- limit?: InputMaybe;
- offset?: InputMaybe;
- type: FeedType;
-};
-
-/**
- * A repository object from the GitHub API. This uses the exact field names returned by the
- * GitHub API for simplicity, even though the convention for GraphQL is usually to camel case.
- */
-export type Repository = {
- __typename?: 'Repository';
- /** The description of the repository */
- description?: Maybe;
- /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */
- full_name: Scalars['String']['output'];
- /** The link to the repository on GitHub */
- html_url: Scalars['String']['output'];
- /** Just the name of the repository, e.g. GitHunt-API */
- name: Scalars['String']['output'];
- /** The number of open issues on this repository on GitHub */
- open_issues_count?: Maybe;
- /** The owner of this repository on GitHub, e.g. apollostack */
- owner?: Maybe;
- /** The number of people who have starred this repository on GitHub */
- stargazers_count: Scalars['Int']['output'];
-};
-
-export type Subscription = {
- __typename?: 'Subscription';
- /** Subscription fires on every comment added */
- commentAdded?: Maybe;
-};
-
-export type SubscriptionCommentAddedArgs = {
- repoFullName: Scalars['String']['input'];
-};
-
-/** A user object from the GitHub API. This uses the exact field names returned from the GitHub API. */
-export type User = {
- __typename?: 'User';
- /** The URL to a directly embeddable image for this user's avatar */
- avatar_url: Scalars['String']['output'];
- /** The URL of this user's GitHub page */
- html_url: Scalars['String']['output'];
- /** The name of the user, e.g. apollostack */
- login: Scalars['String']['output'];
-};
-
-/** XXX to be removed */
-export type Vote = {
- __typename?: 'Vote';
- vote_value: Scalars['Int']['output'];
-};
-
-/** The type of vote to record, when submitting a vote */
-export enum VoteType {
- Cancel = 'CANCEL',
- Down = 'DOWN',
- Up = 'UP',
-}
-
export type OnCommentAddedSubscriptionVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
}>;
export type OnCommentAddedSubscription = {
@@ -184,9 +16,9 @@ export type OnCommentAddedSubscription = {
};
export type CommentQueryVariables = Exact<{
- repoFullName: Scalars['String']['input'];
- limit?: InputMaybe;
- offset?: InputMaybe;
+ repoFullName: string;
+ limit?: number | null;
+ offset?: number | null;
}>;
export type CommentQuery = {
@@ -225,8 +57,8 @@ export type CurrentUserForProfileQuery = {
export type FeedQueryVariables = Exact<{
type: FeedType;
- offset?: InputMaybe;
- limit?: InputMaybe;
+ offset?: number | null;
+ limit?: number | null;
}>;
export type FeedQuery = {
@@ -253,7 +85,7 @@ export type FeedQuery = {
};
export type SubmitRepositoryMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
}>;
export type SubmitRepositoryMutation = {
@@ -262,8 +94,8 @@ export type SubmitRepositoryMutation = {
};
export type SubmitCommentMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
- commentContent: Scalars['String']['input'];
+ repoFullName: string;
+ commentContent: string;
}>;
export type SubmitCommentMutation = {
@@ -278,7 +110,7 @@ export type SubmitCommentMutation = {
};
export type VoteMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
type: VoteType;
}>;
diff --git a/dev-test/githunt/types.immutableTypes.ts b/dev-test/githunt/types.immutableTypes.ts
index df6b6d82851..32423b2970d 100644
--- a/dev-test/githunt/types.immutableTypes.ts
+++ b/dev-test/githunt/types.immutableTypes.ts
@@ -1,175 +1,7 @@
-export type Maybe = T | null;
-export type InputMaybe = Maybe;
-export type Exact = { [K in keyof T]: T[K] };
-export type MakeOptional = Omit & { [SubKey in K]?: Maybe };
-export type MakeMaybe = Omit & { [SubKey in K]: Maybe };
-export type MakeEmpty = { [_ in K]?: never };
+type Exact = { [K in keyof T]: T[K] };
export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
-/** All built-in and custom scalars, mapped to their actual values */
-export type Scalars = {
- ID: { input: string; output: string };
- String: { input: string; output: string };
- Boolean: { input: boolean; output: boolean };
- Int: { input: number; output: number };
- Float: { input: number; output: number };
-};
-
-/** A comment about an entry, submitted by a user */
-export type Comment = {
- readonly __typename?: 'Comment';
- /** The text of the comment */
- readonly content: Scalars['String']['output'];
- /** A timestamp of when the comment was posted */
- readonly createdAt: Scalars['Float']['output'];
- /** The SQL ID of this entry */
- readonly id: Scalars['Int']['output'];
- /** The GitHub user who posted the comment */
- readonly postedBy: User;
- /** The repository which this comment is about */
- readonly repoName: Scalars['String']['output'];
-};
-
-/** Information about a GitHub repository submitted to GitHunt */
-export type Entry = {
- readonly __typename?: 'Entry';
- /** The number of comments posted about this repository */
- readonly commentCount: Scalars['Int']['output'];
- /** Comments posted about this repository */
- readonly comments: ReadonlyArray>;
- /** A timestamp of when the entry was submitted */
- readonly createdAt: Scalars['Float']['output'];
- /** The hot score of this repository */
- readonly hotScore: Scalars['Float']['output'];
- /** The SQL ID of this entry */
- readonly id: Scalars['Int']['output'];
- /** The GitHub user who submitted this entry */
- readonly postedBy: User;
- /** Information about the repository from GitHub */
- readonly repository: Repository;
- /** The score of this repository, upvotes - downvotes */
- readonly score: Scalars['Int']['output'];
- /** XXX to be changed */
- readonly vote: Vote;
-};
-
-/** Information about a GitHub repository submitted to GitHunt */
-export type EntryCommentsArgs = {
- limit?: InputMaybe;
- offset?: InputMaybe;
-};
-
-/** A list of options for the sort order of the feed */
-export enum FeedType {
- /** Sort by a combination of freshness and score, using Reddit's algorithm */
- Hot = 'HOT',
- /** Newest entries first */
- New = 'NEW',
- /** Highest score entries first */
- Top = 'TOP',
-}
-
-export type Mutation = {
- readonly __typename?: 'Mutation';
- /** Comment on a repository, returns the new comment */
- readonly submitComment?: Maybe;
- /** Submit a new repository, returns the new submission */
- readonly submitRepository?: Maybe;
- /** Vote on a repository submission, returns the submission that was voted on */
- readonly vote?: Maybe;
-};
-
-export type MutationSubmitCommentArgs = {
- commentContent: Scalars['String']['input'];
- repoFullName: Scalars['String']['input'];
-};
-
-export type MutationSubmitRepositoryArgs = {
- repoFullName: Scalars['String']['input'];
-};
-
-export type MutationVoteArgs = {
- repoFullName: Scalars['String']['input'];
- type: VoteType;
-};
-
-export type Query = {
- readonly __typename?: 'Query';
- /** Return the currently logged in user, or null if nobody is logged in */
- readonly currentUser?: Maybe;
- /** A single entry */
- readonly entry?: Maybe;
- /** A feed of repository submissions */
- readonly feed?: Maybe>>;
-};
-
-export type QueryEntryArgs = {
- repoFullName: Scalars['String']['input'];
-};
-
-export type QueryFeedArgs = {
- limit?: InputMaybe;
- offset?: InputMaybe;
- type: FeedType;
-};
-
-/**
- * A repository object from the GitHub API. This uses the exact field names returned by the
- * GitHub API for simplicity, even though the convention for GraphQL is usually to camel case.
- */
-export type Repository = {
- readonly __typename?: 'Repository';
- /** The description of the repository */
- readonly description?: Maybe;
- /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */
- readonly full_name: Scalars['String']['output'];
- /** The link to the repository on GitHub */
- readonly html_url: Scalars['String']['output'];
- /** Just the name of the repository, e.g. GitHunt-API */
- readonly name: Scalars['String']['output'];
- /** The number of open issues on this repository on GitHub */
- readonly open_issues_count?: Maybe;
- /** The owner of this repository on GitHub, e.g. apollostack */
- readonly owner?: Maybe;
- /** The number of people who have starred this repository on GitHub */
- readonly stargazers_count: Scalars['Int']['output'];
-};
-
-export type Subscription = {
- readonly __typename?: 'Subscription';
- /** Subscription fires on every comment added */
- readonly commentAdded?: Maybe;
-};
-
-export type SubscriptionCommentAddedArgs = {
- repoFullName: Scalars['String']['input'];
-};
-
-/** A user object from the GitHub API. This uses the exact field names returned from the GitHub API. */
-export type User = {
- readonly __typename?: 'User';
- /** The URL to a directly embeddable image for this user's avatar */
- readonly avatar_url: Scalars['String']['output'];
- /** The URL of this user's GitHub page */
- readonly html_url: Scalars['String']['output'];
- /** The name of the user, e.g. apollostack */
- readonly login: Scalars['String']['output'];
-};
-
-/** XXX to be removed */
-export type Vote = {
- readonly __typename?: 'Vote';
- readonly vote_value: Scalars['Int']['output'];
-};
-
-/** The type of vote to record, when submitting a vote */
-export enum VoteType {
- Cancel = 'CANCEL',
- Down = 'DOWN',
- Up = 'UP',
-}
-
export type OnCommentAddedSubscriptionVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
}>;
export type OnCommentAddedSubscription = {
@@ -184,9 +16,9 @@ export type OnCommentAddedSubscription = {
};
export type CommentQueryVariables = Exact<{
- repoFullName: Scalars['String']['input'];
- limit?: InputMaybe;
- offset?: InputMaybe;
+ repoFullName: string;
+ limit?: number | null;
+ offset?: number | null;
}>;
export type CommentQuery = {
@@ -252,8 +84,8 @@ export type FeedEntryFragment = {
export type FeedQueryVariables = Exact<{
type: FeedType;
- offset?: InputMaybe;
- limit?: InputMaybe;
+ offset?: number | null;
+ limit?: number | null;
}>;
export type FeedQuery = {
@@ -280,7 +112,7 @@ export type FeedQuery = {
};
export type SubmitRepositoryMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
}>;
export type SubmitRepositoryMutation = {
@@ -301,8 +133,8 @@ export type RepoInfoFragment = {
};
export type SubmitCommentMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
- commentContent: Scalars['String']['input'];
+ repoFullName: string;
+ commentContent: string;
}>;
export type SubmitCommentMutation = {
@@ -323,7 +155,7 @@ export type VoteButtonsFragment = {
};
export type VoteMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
type: VoteType;
}>;
diff --git a/dev-test/githunt/types.preResolveTypes.onlyOperationTypes.ts b/dev-test/githunt/types.preResolveTypes.onlyOperationTypes.ts
index cdda2177e51..87e35a2a5da 100644
--- a/dev-test/githunt/types.preResolveTypes.onlyOperationTypes.ts
+++ b/dev-test/githunt/types.preResolveTypes.onlyOperationTypes.ts
@@ -1,38 +1,7 @@
-export type Maybe = T | null;
-export type InputMaybe = Maybe;
-export type Exact = { [K in keyof T]: T[K] };
-export type MakeOptional = Omit & { [SubKey in K]?: Maybe };
-export type MakeMaybe = Omit & { [SubKey in K]: Maybe };
-export type MakeEmpty = { [_ in K]?: never };
+type Exact = { [K in keyof T]: T[K] };
export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
-/** All built-in and custom scalars, mapped to their actual values */
-export type Scalars = {
- ID: { input: string; output: string };
- String: { input: string; output: string };
- Boolean: { input: boolean; output: boolean };
- Int: { input: number; output: number };
- Float: { input: number; output: number };
-};
-
-/** A list of options for the sort order of the feed */
-export enum FeedType {
- /** Sort by a combination of freshness and score, using Reddit's algorithm */
- Hot = 'HOT',
- /** Newest entries first */
- New = 'NEW',
- /** Highest score entries first */
- Top = 'TOP',
-}
-
-/** The type of vote to record, when submitting a vote */
-export enum VoteType {
- Cancel = 'CANCEL',
- Down = 'DOWN',
- Up = 'UP',
-}
-
export type OnCommentAddedSubscriptionVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
}>;
export type OnCommentAddedSubscription = {
@@ -47,9 +16,9 @@ export type OnCommentAddedSubscription = {
};
export type CommentQueryVariables = Exact<{
- repoFullName: Scalars['String']['input'];
- limit?: InputMaybe;
- offset?: InputMaybe;
+ repoFullName: string;
+ limit?: number | null;
+ offset?: number | null;
}>;
export type CommentQuery = {
@@ -115,8 +84,8 @@ export type FeedEntryFragment = {
export type FeedQueryVariables = Exact<{
type: FeedType;
- offset?: InputMaybe;
- limit?: InputMaybe;
+ offset?: number | null;
+ limit?: number | null;
}>;
export type FeedQuery = {
@@ -143,7 +112,7 @@ export type FeedQuery = {
};
export type SubmitRepositoryMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
}>;
export type SubmitRepositoryMutation = {
@@ -164,8 +133,8 @@ export type RepoInfoFragment = {
};
export type SubmitCommentMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
- commentContent: Scalars['String']['input'];
+ repoFullName: string;
+ commentContent: string;
}>;
export type SubmitCommentMutation = {
@@ -186,7 +155,7 @@ export type VoteButtonsFragment = {
};
export type VoteMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
type: VoteType;
}>;
diff --git a/dev-test/githunt/types.preResolveTypes.ts b/dev-test/githunt/types.preResolveTypes.ts
index 91e23917b8c..87e35a2a5da 100644
--- a/dev-test/githunt/types.preResolveTypes.ts
+++ b/dev-test/githunt/types.preResolveTypes.ts
@@ -1,175 +1,7 @@
-export type Maybe = T | null;
-export type InputMaybe = Maybe;
-export type Exact = { [K in keyof T]: T[K] };
-export type MakeOptional = Omit & { [SubKey in K]?: Maybe };
-export type MakeMaybe = Omit & { [SubKey in K]: Maybe };
-export type MakeEmpty = { [_ in K]?: never };
+type Exact = { [K in keyof T]: T[K] };
export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
-/** All built-in and custom scalars, mapped to their actual values */
-export type Scalars = {
- ID: { input: string; output: string };
- String: { input: string; output: string };
- Boolean: { input: boolean; output: boolean };
- Int: { input: number; output: number };
- Float: { input: number; output: number };
-};
-
-/** A comment about an entry, submitted by a user */
-export type Comment = {
- __typename?: 'Comment';
- /** The text of the comment */
- content: Scalars['String']['output'];
- /** A timestamp of when the comment was posted */
- createdAt: Scalars['Float']['output'];
- /** The SQL ID of this entry */
- id: Scalars['Int']['output'];
- /** The GitHub user who posted the comment */
- postedBy: User;
- /** The repository which this comment is about */
- repoName: Scalars['String']['output'];
-};
-
-/** Information about a GitHub repository submitted to GitHunt */
-export type Entry = {
- __typename?: 'Entry';
- /** The number of comments posted about this repository */
- commentCount: Scalars['Int']['output'];
- /** Comments posted about this repository */
- comments: Array>;
- /** A timestamp of when the entry was submitted */
- createdAt: Scalars['Float']['output'];
- /** The hot score of this repository */
- hotScore: Scalars['Float']['output'];
- /** The SQL ID of this entry */
- id: Scalars['Int']['output'];
- /** The GitHub user who submitted this entry */
- postedBy: User;
- /** Information about the repository from GitHub */
- repository: Repository;
- /** The score of this repository, upvotes - downvotes */
- score: Scalars['Int']['output'];
- /** XXX to be changed */
- vote: Vote;
-};
-
-/** Information about a GitHub repository submitted to GitHunt */
-export type EntryCommentsArgs = {
- limit?: InputMaybe;
- offset?: InputMaybe;
-};
-
-/** A list of options for the sort order of the feed */
-export enum FeedType {
- /** Sort by a combination of freshness and score, using Reddit's algorithm */
- Hot = 'HOT',
- /** Newest entries first */
- New = 'NEW',
- /** Highest score entries first */
- Top = 'TOP',
-}
-
-export type Mutation = {
- __typename?: 'Mutation';
- /** Comment on a repository, returns the new comment */
- submitComment?: Maybe;
- /** Submit a new repository, returns the new submission */
- submitRepository?: Maybe;
- /** Vote on a repository submission, returns the submission that was voted on */
- vote?: Maybe;
-};
-
-export type MutationSubmitCommentArgs = {
- commentContent: Scalars['String']['input'];
- repoFullName: Scalars['String']['input'];
-};
-
-export type MutationSubmitRepositoryArgs = {
- repoFullName: Scalars['String']['input'];
-};
-
-export type MutationVoteArgs = {
- repoFullName: Scalars['String']['input'];
- type: VoteType;
-};
-
-export type Query = {
- __typename?: 'Query';
- /** Return the currently logged in user, or null if nobody is logged in */
- currentUser?: Maybe;
- /** A single entry */
- entry?: Maybe;
- /** A feed of repository submissions */
- feed?: Maybe>>;
-};
-
-export type QueryEntryArgs = {
- repoFullName: Scalars['String']['input'];
-};
-
-export type QueryFeedArgs = {
- limit?: InputMaybe;
- offset?: InputMaybe;
- type: FeedType;
-};
-
-/**
- * A repository object from the GitHub API. This uses the exact field names returned by the
- * GitHub API for simplicity, even though the convention for GraphQL is usually to camel case.
- */
-export type Repository = {
- __typename?: 'Repository';
- /** The description of the repository */
- description?: Maybe;
- /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */
- full_name: Scalars['String']['output'];
- /** The link to the repository on GitHub */
- html_url: Scalars['String']['output'];
- /** Just the name of the repository, e.g. GitHunt-API */
- name: Scalars['String']['output'];
- /** The number of open issues on this repository on GitHub */
- open_issues_count?: Maybe;
- /** The owner of this repository on GitHub, e.g. apollostack */
- owner?: Maybe;
- /** The number of people who have starred this repository on GitHub */
- stargazers_count: Scalars['Int']['output'];
-};
-
-export type Subscription = {
- __typename?: 'Subscription';
- /** Subscription fires on every comment added */
- commentAdded?: Maybe;
-};
-
-export type SubscriptionCommentAddedArgs = {
- repoFullName: Scalars['String']['input'];
-};
-
-/** A user object from the GitHub API. This uses the exact field names returned from the GitHub API. */
-export type User = {
- __typename?: 'User';
- /** The URL to a directly embeddable image for this user's avatar */
- avatar_url: Scalars['String']['output'];
- /** The URL of this user's GitHub page */
- html_url: Scalars['String']['output'];
- /** The name of the user, e.g. apollostack */
- login: Scalars['String']['output'];
-};
-
-/** XXX to be removed */
-export type Vote = {
- __typename?: 'Vote';
- vote_value: Scalars['Int']['output'];
-};
-
-/** The type of vote to record, when submitting a vote */
-export enum VoteType {
- Cancel = 'CANCEL',
- Down = 'DOWN',
- Up = 'UP',
-}
-
export type OnCommentAddedSubscriptionVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
}>;
export type OnCommentAddedSubscription = {
@@ -184,9 +16,9 @@ export type OnCommentAddedSubscription = {
};
export type CommentQueryVariables = Exact<{
- repoFullName: Scalars['String']['input'];
- limit?: InputMaybe;
- offset?: InputMaybe;
+ repoFullName: string;
+ limit?: number | null;
+ offset?: number | null;
}>;
export type CommentQuery = {
@@ -252,8 +84,8 @@ export type FeedEntryFragment = {
export type FeedQueryVariables = Exact<{
type: FeedType;
- offset?: InputMaybe;
- limit?: InputMaybe;
+ offset?: number | null;
+ limit?: number | null;
}>;
export type FeedQuery = {
@@ -280,7 +112,7 @@ export type FeedQuery = {
};
export type SubmitRepositoryMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
}>;
export type SubmitRepositoryMutation = {
@@ -301,8 +133,8 @@ export type RepoInfoFragment = {
};
export type SubmitCommentMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
- commentContent: Scalars['String']['input'];
+ repoFullName: string;
+ commentContent: string;
}>;
export type SubmitCommentMutation = {
@@ -323,7 +155,7 @@ export type VoteButtonsFragment = {
};
export type VoteMutationVariables = Exact<{
- repoFullName: Scalars['String']['input'];
+ repoFullName: string;
type: VoteType;
}>;
diff --git a/dev-test/githunt/types.ts b/dev-test/githunt/types.ts
index 91e23917b8c..87e35a2a5da 100644
--- a/dev-test/githunt/types.ts
+++ b/dev-test/githunt/types.ts
@@ -1,175 +1,7 @@
-export type Maybe = T | null;
-export type InputMaybe = Maybe;
-export type Exact = { [K in keyof T]: T[K] };
-export type MakeOptional = Omit & { [SubKey in K]?: Maybe };
-export type MakeMaybe = Omit & { [SubKey in K]: Maybe };
-export type MakeEmpty