From ba84a3a2758d94dac27fcfbb1bafdf3ed7c32929 Mon Sep 17 00:00:00 2001 From: Eddy Nguyen Date: Tue, 16 May 2023 05:09:50 +1000 Subject: [PATCH] Update typescript, typescript-operations and typescript-resolvers plugins Scalars input/output type (#9375) * Implement Scalar input/output types - Use Scalars input/output in base typescript plugin - Use Scalars in typescript-operations plugin - Update typescript-resolvers to support input/output - Update related website docs * Make version bump minor * Fix changeset * Fix unit tests * Update tests --- .changeset/gold-frogs-explain.md | 139 +++ dev-test/githunt/typed-document-nodes.ts | 88 +- dev-test/githunt/types.avoidOptionals.ts | 88 +- dev-test/githunt/types.d.ts | 88 +- dev-test/githunt/types.enumsAsTypes.ts | 88 +- .../githunt/types.flatten.preResolveTypes.ts | 88 +- dev-test/githunt/types.immutableTypes.ts | 88 +- ...ypes.preResolveTypes.onlyOperationTypes.ts | 30 +- dev-test/githunt/types.preResolveTypes.ts | 88 +- dev-test/githunt/types.ts | 88 +- .../gql-tag-operations-masking/gql/graphql.ts | 72 +- .../gql-tag-operations-urql/gql/graphql.ts | 72 +- dev-test/gql-tag-operations/gql/graphql.ts | 72 +- .../gql-tag-operations/graphql/graphql.ts | 72 +- dev-test/modules/types.ts | 72 +- dev-test/star-wars/types.avoidOptionals.ts | 86 +- dev-test/star-wars/types.d.ts | 82 +- dev-test/star-wars/types.excludeQueryAlpha.ts | 86 +- dev-test/star-wars/types.excludeQueryBeta.ts | 86 +- .../star-wars/types.globallyAvailable.d.ts | 86 +- dev-test/star-wars/types.immutableTypes.ts | 86 +- ...ypes.preResolveTypes.onlyOperationTypes.ts | 24 +- dev-test/star-wars/types.preResolveTypes.ts | 86 +- dev-test/star-wars/types.skipSchema.ts | 86 +- dev-test/star-wars/types.ts | 86 +- dev-test/test-schema/env.types.ts | 26 +- dev-test/test-schema/resolvers-federation.ts | 44 +- dev-test/test-schema/resolvers-root.ts | 34 +- dev-test/test-schema/resolvers-stitching.ts | 38 +- dev-test/test-schema/resolvers-types.ts | 38 +- ...ypes.preResolveTypes.onlyOperationTypes.ts | 10 +- dev-test/test-schema/types.preResolveTypes.ts | 26 +- .../test-schema/typings.avoidOptionals.ts | 18 +- dev-test/test-schema/typings.enum.ts | 10 +- .../test-schema/typings.immutableTypes.ts | 18 +- dev-test/test-schema/typings.ts | 30 +- dev-test/test-schema/typings.wrapped.ts | 18 +- .../src/gql/graphql.ts | 16 +- .../persisted-documents/src/gql/graphql.ts | 16 +- .../apollo-client-defer/src/gql/graphql.ts | 18 +- .../src/gql/graphql.ts | 460 ++++---- .../react/apollo-client/src/gql/graphql.ts | 460 ++++---- .../react/http-executor/src/gql/graphql.ts | 460 ++++---- examples/react/nextjs-swr/gql/graphql.ts | 460 ++++---- .../tanstack-react-query/src/gql/graphql.ts | 460 ++++---- examples/react/urql/src/gql/graphql.ts | 460 ++++---- examples/typescript-esm/src/gql/graphql.ts | 460 ++++---- .../src/gql/graphql.ts | 460 ++++---- .../typescript-resolvers/src/type-defs.d.ts | 34 +- .../vite/vite-react-cts/src/gql/graphql.ts | 460 ++++---- .../vite/vite-react-mts/src/gql/graphql.ts | 460 ++++---- .../vite/vite-react-ts/src/gql/graphql.ts | 460 ++++---- .../vue/apollo-composable/src/gql/graphql.ts | 460 ++++---- examples/vue/urql/src/gql/graphql.ts | 460 ++++---- examples/vue/villus/src/gql/graphql.ts | 460 ++++---- examples/yoga-tests/src/gql/graphql.ts | 18 +- .../graphql-codegen-cli/tests/codegen.spec.ts | 14 +- .../src/base-resolvers-visitor.ts | 4 +- .../src/base-types-visitor.ts | 46 +- .../visitor-plugin-common/src/base-visitor.ts | 9 +- .../visitor-plugin-common/src/scalars.ts | 25 +- .../src/selection-set-processor/base.ts | 4 +- .../pre-resolve-types.ts | 4 +- .../other/visitor-plugin-common/src/types.ts | 16 +- .../other/visitor-plugin-common/src/utils.ts | 118 ++- .../src/variables-to-object.ts | 2 +- .../tests/create-resolvers-fields.spec.ts | 16 +- .../__snapshots__/ts-documents.spec.ts.snap | 106 +- .../operations/tests/ts-documents.spec.ts | 80 +- .../__snapshots__/ts-resolvers.spec.ts.snap | 146 +-- .../resolvers/tests/mapping.spec.ts | 350 +++---- .../resolvers/tests/ts-resolvers.spec.ts | 126 +-- .../typescript/typescript/src/visitor.ts | 6 +- .../__snapshots__/typescript.spec.ts.snap | 26 +- .../typescript/tests/typescript.spec.ts | 986 ++++++++++-------- .../client/tests/client-preset.spec.ts | 220 ++-- .../pages/docs/advanced/how-does-it-work.mdx | 34 +- 77 files changed, 5829 insertions(+), 5388 deletions(-) create mode 100644 .changeset/gold-frogs-explain.md diff --git a/.changeset/gold-frogs-explain.md b/.changeset/gold-frogs-explain.md new file mode 100644 index 00000000000..03db5c6ed30 --- /dev/null +++ b/.changeset/gold-frogs-explain.md @@ -0,0 +1,139 @@ +--- +'@graphql-codegen/visitor-plugin-common': minor +'@graphql-codegen/typescript-operations': minor +'@graphql-codegen/typescript': minor +'@graphql-codegen/typescript-resolvers': minor +--- + +Implement Scalars with input/output types + +In GraphQL, Scalar types can be different for client and server. For example, given the native GraphQL ID: +- A client may send `string` or `number` in the input +- A client receives `string` in its selection set (i.e output) +- A server receives `string` in the resolver (GraphQL parses `string` or `number` received from the client to `string`) +- A server may return `string` or `number` (GraphQL serializes the value to `string` before sending it to the client ) + +Currently, we represent every Scalar with only one type. This is what codegen generates as base type: + +```ts +export type Scalars = { + ID: string; +} +``` + +Then, this is used in both input and output type e.g. + +```ts +export type Book = { + __typename?: "Book"; + id: Scalars["ID"]; // Output's ID can be `string` 👍 +}; + +export type QueryBookArgs = { + id: Scalars["ID"]; // Input's ID can be `string` or `number`. However, the type is only `string` here 👎 +}; +``` + +This PR extends each Scalar to have input and output: + +```ts +export type Scalars = { + ID: { + input: string | number; + output: string; + } +} +``` + +Then, each input/output GraphQL type can correctly refer to the correct input/output scalar type: + +```ts +export type Book = { + __typename?: "Book"; + id: Scalars["ID"]['output']; // Output's ID can be `string` 👍 +}; + +export type QueryBookArgs = { + id: Scalars["ID"]['input']; // Input's ID can be `string` or `number` 👍 +}; +``` + +Note that for `typescript-resolvers`, the type of ID needs to be inverted. However, the referenced types in GraphQL input/output types should still work correctly: + +```ts +export type Scalars = { + ID: { + input: string; + output: string | number; + } +} + +export type Book = { + __typename?: "Book"; + id: Scalars["ID"]['output']; // Resolvers can return `string` or `number` in ID fields 👍 +}; + +export type QueryBookArgs = { + id: Scalars["ID"]['input']; // Resolvers receive `string` in ID fields 👍 +}; + +export type ResolversTypes = { + ID: ID: ResolverTypeWrapper; // Resolvers can return `string` or `number` in ID fields 👍 +} + +export type ResolversParentTypes = { + ID: Scalars['ID']['output']; // Resolvers receive `string` or `number` from parents 👍 +}; +``` + +--- + +Config changes: + +1. Scalars option can now take input/output types: + +```ts +config: { + scalars: { + ID: { + input: 'string', + output: 'string | number' + } + } +} +``` + +2. If a string is given (instead of an object with input/output fields), it will be used as both input and output types: + +```ts +config: { + scalars: { + ID: 'string' // This means `string` will be used for both ID's input and output types + } +} +``` + +3. (Potential) BREAKING CHANGE: External module Scalar types need to be an object with input/output fields + +```ts +config: { + scalars: { + ID: './path/to/scalar-module' + } +} +``` + +If correctly, wired up, the following will be generated: + +```ts +// Previously, imported `ID` type can be a primitive type, now it must be an object with input/output fields +import { ID } from "./path/to/scalar-module"; + +export type Scalars = { + ID: { input: ID['input']; output: ID['output']; } +}; +``` + +--- + +(Potential) BREAKING CHANGE: This changes Scalar types which could be referenced in other plugins. If you are a plugin maintainer and reference Scalar, please update your plugin to use the correct input/output types. diff --git a/dev-test/githunt/typed-document-nodes.ts b/dev-test/githunt/typed-document-nodes.ts index 8024a2d04e0..02fb126e323 100644 --- a/dev-test/githunt/typed-document-nodes.ts +++ b/dev-test/githunt/typed-document-nodes.ts @@ -8,55 +8,55 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; 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']; + content: Scalars['String']['output']; /** A timestamp of when the comment was posted */ - createdAt: Scalars['Float']; + createdAt: Scalars['Float']['output']; /** The SQL ID of this entry */ - id: Scalars['Int']; + id: Scalars['Int']['output']; /** The GitHub user who posted the comment */ postedBy: User; /** The repository which this comment is about */ - repoName: Scalars['String']; + 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']; + commentCount: Scalars['Int']['output']; /** Comments posted about this repository */ comments: Array>; /** A timestamp of when the entry was submitted */ - createdAt: Scalars['Float']; + createdAt: Scalars['Float']['output']; /** The hot score of this repository */ - hotScore: Scalars['Float']; + hotScore: Scalars['Float']['output']; /** The SQL ID of this entry */ - id: Scalars['Int']; + 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']; + 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; + limit?: InputMaybe; + offset?: InputMaybe; }; /** A list of options for the sort order of the feed */ @@ -80,16 +80,16 @@ export type Mutation = { }; export type MutationSubmitCommentArgs = { - commentContent: Scalars['String']; - repoFullName: Scalars['String']; + commentContent: Scalars['String']['input']; + repoFullName: Scalars['String']['input']; }; export type MutationSubmitRepositoryArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }; export type MutationVoteArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; type: VoteType; }; @@ -104,12 +104,12 @@ export type Query = { }; export type QueryEntryArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }; export type QueryFeedArgs = { - limit?: InputMaybe; - offset?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; type: FeedType; }; @@ -120,19 +120,19 @@ export type QueryFeedArgs = { export type Repository = { __typename?: 'Repository'; /** The description of the repository */ - description?: Maybe; + description?: Maybe; /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */ - full_name: Scalars['String']; + full_name: Scalars['String']['output']; /** The link to the repository on GitHub */ - html_url: Scalars['String']; + html_url: Scalars['String']['output']; /** Just the name of the repository, e.g. GitHunt-API */ - name: Scalars['String']; + name: Scalars['String']['output']; /** The number of open issues on this repository on GitHub */ - open_issues_count?: Maybe; + 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']; + stargazers_count: Scalars['Int']['output']; }; export type Subscription = { @@ -142,24 +142,24 @@ export type Subscription = { }; export type SubscriptionCommentAddedArgs = { - repoFullName: Scalars['String']; + 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']; + avatar_url: Scalars['String']['output']; /** The URL of this user's GitHub page */ - html_url: Scalars['String']; + html_url: Scalars['String']['output']; /** The name of the user, e.g. apollostack */ - login: Scalars['String']; + login: Scalars['String']['output']; }; /** XXX to be removed */ export type Vote = { __typename?: 'Vote'; - vote_value: Scalars['Int']; + vote_value: Scalars['Int']['output']; }; /** The type of vote to record, when submitting a vote */ @@ -170,7 +170,7 @@ export enum VoteType { } export type OnCommentAddedSubscriptionVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }>; export type OnCommentAddedSubscription = { @@ -185,9 +185,9 @@ export type OnCommentAddedSubscription = { }; export type CommentQueryVariables = Exact<{ - repoFullName: Scalars['String']; - limit?: InputMaybe; - offset?: InputMaybe; + repoFullName: Scalars['String']['input']; + limit?: InputMaybe; + offset?: InputMaybe; }>; export type CommentQuery = { @@ -253,8 +253,8 @@ export type FeedEntryFragment = { export type FeedQueryVariables = Exact<{ type: FeedType; - offset?: InputMaybe; - limit?: InputMaybe; + offset?: InputMaybe; + limit?: InputMaybe; }>; export type FeedQuery = { @@ -281,7 +281,7 @@ export type FeedQuery = { }; export type SubmitRepositoryMutationVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }>; export type SubmitRepositoryMutation = { @@ -302,8 +302,8 @@ export type RepoInfoFragment = { }; export type SubmitCommentMutationVariables = Exact<{ - repoFullName: Scalars['String']; - commentContent: Scalars['String']; + repoFullName: Scalars['String']['input']; + commentContent: Scalars['String']['input']; }>; export type SubmitCommentMutation = { @@ -324,7 +324,7 @@ export type VoteButtonsFragment = { }; export type VoteMutationVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; type: VoteType; }>; diff --git a/dev-test/githunt/types.avoidOptionals.ts b/dev-test/githunt/types.avoidOptionals.ts index 87fd3a832b0..addb8eb4649 100644 --- a/dev-test/githunt/types.avoidOptionals.ts +++ b/dev-test/githunt/types.avoidOptionals.ts @@ -7,55 +7,55 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; 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']; + content: Scalars['String']['output']; /** A timestamp of when the comment was posted */ - createdAt: Scalars['Float']; + createdAt: Scalars['Float']['output']; /** The SQL ID of this entry */ - id: Scalars['Int']; + id: Scalars['Int']['output']; /** The GitHub user who posted the comment */ postedBy: User; /** The repository which this comment is about */ - repoName: Scalars['String']; + 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']; + commentCount: Scalars['Int']['output']; /** Comments posted about this repository */ comments: Array>; /** A timestamp of when the entry was submitted */ - createdAt: Scalars['Float']; + createdAt: Scalars['Float']['output']; /** The hot score of this repository */ - hotScore: Scalars['Float']; + hotScore: Scalars['Float']['output']; /** The SQL ID of this entry */ - id: Scalars['Int']; + 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']; + 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; + limit: InputMaybe; + offset: InputMaybe; }; /** A list of options for the sort order of the feed */ @@ -79,16 +79,16 @@ export type Mutation = { }; export type MutationSubmitCommentArgs = { - commentContent: Scalars['String']; - repoFullName: Scalars['String']; + commentContent: Scalars['String']['input']; + repoFullName: Scalars['String']['input']; }; export type MutationSubmitRepositoryArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }; export type MutationVoteArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; type: VoteType; }; @@ -103,12 +103,12 @@ export type Query = { }; export type QueryEntryArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }; export type QueryFeedArgs = { - limit: InputMaybe; - offset: InputMaybe; + limit: InputMaybe; + offset: InputMaybe; type: FeedType; }; @@ -119,19 +119,19 @@ export type QueryFeedArgs = { export type Repository = { __typename?: 'Repository'; /** The description of the repository */ - description: Maybe; + description: Maybe; /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */ - full_name: Scalars['String']; + full_name: Scalars['String']['output']; /** The link to the repository on GitHub */ - html_url: Scalars['String']; + html_url: Scalars['String']['output']; /** Just the name of the repository, e.g. GitHunt-API */ - name: Scalars['String']; + name: Scalars['String']['output']; /** The number of open issues on this repository on GitHub */ - open_issues_count: Maybe; + 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']; + stargazers_count: Scalars['Int']['output']; }; export type Subscription = { @@ -141,24 +141,24 @@ export type Subscription = { }; export type SubscriptionCommentAddedArgs = { - repoFullName: Scalars['String']; + 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']; + avatar_url: Scalars['String']['output']; /** The URL of this user's GitHub page */ - html_url: Scalars['String']; + html_url: Scalars['String']['output']; /** The name of the user, e.g. apollostack */ - login: Scalars['String']; + login: Scalars['String']['output']; }; /** XXX to be removed */ export type Vote = { __typename?: 'Vote'; - vote_value: Scalars['Int']; + vote_value: Scalars['Int']['output']; }; /** The type of vote to record, when submitting a vote */ @@ -169,7 +169,7 @@ export enum VoteType { } export type OnCommentAddedSubscriptionVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }>; export type OnCommentAddedSubscription = { @@ -184,9 +184,9 @@ export type OnCommentAddedSubscription = { }; export type CommentQueryVariables = Exact<{ - repoFullName: Scalars['String']; - limit: InputMaybe; - offset: InputMaybe; + repoFullName: Scalars['String']['input']; + limit: InputMaybe; + offset: InputMaybe; }>; export type CommentQuery = { @@ -252,8 +252,8 @@ export type FeedEntryFragment = { export type FeedQueryVariables = Exact<{ type: FeedType; - offset: InputMaybe; - limit: InputMaybe; + offset: InputMaybe; + limit: InputMaybe; }>; export type FeedQuery = { @@ -280,7 +280,7 @@ export type FeedQuery = { }; export type SubmitRepositoryMutationVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }>; export type SubmitRepositoryMutation = { @@ -301,8 +301,8 @@ export type RepoInfoFragment = { }; export type SubmitCommentMutationVariables = Exact<{ - repoFullName: Scalars['String']; - commentContent: Scalars['String']; + repoFullName: Scalars['String']['input']; + commentContent: Scalars['String']['input']; }>; export type SubmitCommentMutation = { @@ -323,7 +323,7 @@ export type VoteButtonsFragment = { }; export type VoteMutationVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; type: VoteType; }>; diff --git a/dev-test/githunt/types.d.ts b/dev-test/githunt/types.d.ts index 918c2881788..020e8fbadd6 100644 --- a/dev-test/githunt/types.d.ts +++ b/dev-test/githunt/types.d.ts @@ -7,55 +7,55 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; 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']; + content: Scalars['String']['output']; /** A timestamp of when the comment was posted */ - createdAt: Scalars['Float']; + createdAt: Scalars['Float']['output']; /** The SQL ID of this entry */ - id: Scalars['Int']; + id: Scalars['Int']['output']; /** The GitHub user who posted the comment */ postedBy: User; /** The repository which this comment is about */ - repoName: Scalars['String']; + 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']; + commentCount: Scalars['Int']['output']; /** Comments posted about this repository */ comments: Array>; /** A timestamp of when the entry was submitted */ - createdAt: Scalars['Float']; + createdAt: Scalars['Float']['output']; /** The hot score of this repository */ - hotScore: Scalars['Float']; + hotScore: Scalars['Float']['output']; /** The SQL ID of this entry */ - id: Scalars['Int']; + 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']; + 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; + limit?: InputMaybe; + offset?: InputMaybe; }; /** A list of options for the sort order of the feed */ @@ -78,16 +78,16 @@ export type Mutation = { }; export type MutationSubmitCommentArgs = { - commentContent: Scalars['String']; - repoFullName: Scalars['String']; + commentContent: Scalars['String']['input']; + repoFullName: Scalars['String']['input']; }; export type MutationSubmitRepositoryArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }; export type MutationVoteArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; type: VoteType; }; @@ -102,12 +102,12 @@ export type Query = { }; export type QueryEntryArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }; export type QueryFeedArgs = { - limit?: InputMaybe; - offset?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; type: FeedType; }; @@ -118,19 +118,19 @@ export type QueryFeedArgs = { export type Repository = { __typename?: 'Repository'; /** The description of the repository */ - description?: Maybe; + description?: Maybe; /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */ - full_name: Scalars['String']; + full_name: Scalars['String']['output']; /** The link to the repository on GitHub */ - html_url: Scalars['String']; + html_url: Scalars['String']['output']; /** Just the name of the repository, e.g. GitHunt-API */ - name: Scalars['String']; + name: Scalars['String']['output']; /** The number of open issues on this repository on GitHub */ - open_issues_count?: Maybe; + 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']; + stargazers_count: Scalars['Int']['output']; }; export type Subscription = { @@ -140,31 +140,31 @@ export type Subscription = { }; export type SubscriptionCommentAddedArgs = { - repoFullName: Scalars['String']; + 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']; + avatar_url: Scalars['String']['output']; /** The URL of this user's GitHub page */ - html_url: Scalars['String']; + html_url: Scalars['String']['output']; /** The name of the user, e.g. apollostack */ - login: Scalars['String']; + login: Scalars['String']['output']; }; /** XXX to be removed */ export type Vote = { __typename?: 'Vote'; - vote_value: Scalars['Int']; + 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']; + repoFullName: Scalars['String']['input']; }>; export type OnCommentAddedSubscription = { @@ -179,9 +179,9 @@ export type OnCommentAddedSubscription = { }; export type CommentQueryVariables = Exact<{ - repoFullName: Scalars['String']; - limit?: InputMaybe; - offset?: InputMaybe; + repoFullName: Scalars['String']['input']; + limit?: InputMaybe; + offset?: InputMaybe; }>; export type CommentQuery = { @@ -247,8 +247,8 @@ export type FeedEntryFragment = { export type FeedQueryVariables = Exact<{ type: FeedType; - offset?: InputMaybe; - limit?: InputMaybe; + offset?: InputMaybe; + limit?: InputMaybe; }>; export type FeedQuery = { @@ -275,7 +275,7 @@ export type FeedQuery = { }; export type SubmitRepositoryMutationVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }>; export type SubmitRepositoryMutation = { @@ -296,8 +296,8 @@ export type RepoInfoFragment = { }; export type SubmitCommentMutationVariables = Exact<{ - repoFullName: Scalars['String']; - commentContent: Scalars['String']; + repoFullName: Scalars['String']['input']; + commentContent: Scalars['String']['input']; }>; export type SubmitCommentMutation = { @@ -318,7 +318,7 @@ export type VoteButtonsFragment = { }; export type VoteMutationVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; type: VoteType; }>; diff --git a/dev-test/githunt/types.enumsAsTypes.ts b/dev-test/githunt/types.enumsAsTypes.ts index 918c2881788..020e8fbadd6 100644 --- a/dev-test/githunt/types.enumsAsTypes.ts +++ b/dev-test/githunt/types.enumsAsTypes.ts @@ -7,55 +7,55 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; 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']; + content: Scalars['String']['output']; /** A timestamp of when the comment was posted */ - createdAt: Scalars['Float']; + createdAt: Scalars['Float']['output']; /** The SQL ID of this entry */ - id: Scalars['Int']; + id: Scalars['Int']['output']; /** The GitHub user who posted the comment */ postedBy: User; /** The repository which this comment is about */ - repoName: Scalars['String']; + 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']; + commentCount: Scalars['Int']['output']; /** Comments posted about this repository */ comments: Array>; /** A timestamp of when the entry was submitted */ - createdAt: Scalars['Float']; + createdAt: Scalars['Float']['output']; /** The hot score of this repository */ - hotScore: Scalars['Float']; + hotScore: Scalars['Float']['output']; /** The SQL ID of this entry */ - id: Scalars['Int']; + 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']; + 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; + limit?: InputMaybe; + offset?: InputMaybe; }; /** A list of options for the sort order of the feed */ @@ -78,16 +78,16 @@ export type Mutation = { }; export type MutationSubmitCommentArgs = { - commentContent: Scalars['String']; - repoFullName: Scalars['String']; + commentContent: Scalars['String']['input']; + repoFullName: Scalars['String']['input']; }; export type MutationSubmitRepositoryArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }; export type MutationVoteArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; type: VoteType; }; @@ -102,12 +102,12 @@ export type Query = { }; export type QueryEntryArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }; export type QueryFeedArgs = { - limit?: InputMaybe; - offset?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; type: FeedType; }; @@ -118,19 +118,19 @@ export type QueryFeedArgs = { export type Repository = { __typename?: 'Repository'; /** The description of the repository */ - description?: Maybe; + description?: Maybe; /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */ - full_name: Scalars['String']; + full_name: Scalars['String']['output']; /** The link to the repository on GitHub */ - html_url: Scalars['String']; + html_url: Scalars['String']['output']; /** Just the name of the repository, e.g. GitHunt-API */ - name: Scalars['String']; + name: Scalars['String']['output']; /** The number of open issues on this repository on GitHub */ - open_issues_count?: Maybe; + 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']; + stargazers_count: Scalars['Int']['output']; }; export type Subscription = { @@ -140,31 +140,31 @@ export type Subscription = { }; export type SubscriptionCommentAddedArgs = { - repoFullName: Scalars['String']; + 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']; + avatar_url: Scalars['String']['output']; /** The URL of this user's GitHub page */ - html_url: Scalars['String']; + html_url: Scalars['String']['output']; /** The name of the user, e.g. apollostack */ - login: Scalars['String']; + login: Scalars['String']['output']; }; /** XXX to be removed */ export type Vote = { __typename?: 'Vote'; - vote_value: Scalars['Int']; + 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']; + repoFullName: Scalars['String']['input']; }>; export type OnCommentAddedSubscription = { @@ -179,9 +179,9 @@ export type OnCommentAddedSubscription = { }; export type CommentQueryVariables = Exact<{ - repoFullName: Scalars['String']; - limit?: InputMaybe; - offset?: InputMaybe; + repoFullName: Scalars['String']['input']; + limit?: InputMaybe; + offset?: InputMaybe; }>; export type CommentQuery = { @@ -247,8 +247,8 @@ export type FeedEntryFragment = { export type FeedQueryVariables = Exact<{ type: FeedType; - offset?: InputMaybe; - limit?: InputMaybe; + offset?: InputMaybe; + limit?: InputMaybe; }>; export type FeedQuery = { @@ -275,7 +275,7 @@ export type FeedQuery = { }; export type SubmitRepositoryMutationVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }>; export type SubmitRepositoryMutation = { @@ -296,8 +296,8 @@ export type RepoInfoFragment = { }; export type SubmitCommentMutationVariables = Exact<{ - repoFullName: Scalars['String']; - commentContent: Scalars['String']; + repoFullName: Scalars['String']['input']; + commentContent: Scalars['String']['input']; }>; export type SubmitCommentMutation = { @@ -318,7 +318,7 @@ export type VoteButtonsFragment = { }; export type VoteMutationVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; type: VoteType; }>; diff --git a/dev-test/githunt/types.flatten.preResolveTypes.ts b/dev-test/githunt/types.flatten.preResolveTypes.ts index 60c6c2c8a2c..9377847e5c6 100644 --- a/dev-test/githunt/types.flatten.preResolveTypes.ts +++ b/dev-test/githunt/types.flatten.preResolveTypes.ts @@ -7,55 +7,55 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; 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']; + content: Scalars['String']['output']; /** A timestamp of when the comment was posted */ - createdAt: Scalars['Float']; + createdAt: Scalars['Float']['output']; /** The SQL ID of this entry */ - id: Scalars['Int']; + id: Scalars['Int']['output']; /** The GitHub user who posted the comment */ postedBy: User; /** The repository which this comment is about */ - repoName: Scalars['String']; + 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']; + commentCount: Scalars['Int']['output']; /** Comments posted about this repository */ comments: Array>; /** A timestamp of when the entry was submitted */ - createdAt: Scalars['Float']; + createdAt: Scalars['Float']['output']; /** The hot score of this repository */ - hotScore: Scalars['Float']; + hotScore: Scalars['Float']['output']; /** The SQL ID of this entry */ - id: Scalars['Int']; + 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']; + 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; + limit?: InputMaybe; + offset?: InputMaybe; }; /** A list of options for the sort order of the feed */ @@ -79,16 +79,16 @@ export type Mutation = { }; export type MutationSubmitCommentArgs = { - commentContent: Scalars['String']; - repoFullName: Scalars['String']; + commentContent: Scalars['String']['input']; + repoFullName: Scalars['String']['input']; }; export type MutationSubmitRepositoryArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }; export type MutationVoteArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; type: VoteType; }; @@ -103,12 +103,12 @@ export type Query = { }; export type QueryEntryArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }; export type QueryFeedArgs = { - limit?: InputMaybe; - offset?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; type: FeedType; }; @@ -119,19 +119,19 @@ export type QueryFeedArgs = { export type Repository = { __typename?: 'Repository'; /** The description of the repository */ - description?: Maybe; + description?: Maybe; /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */ - full_name: Scalars['String']; + full_name: Scalars['String']['output']; /** The link to the repository on GitHub */ - html_url: Scalars['String']; + html_url: Scalars['String']['output']; /** Just the name of the repository, e.g. GitHunt-API */ - name: Scalars['String']; + name: Scalars['String']['output']; /** The number of open issues on this repository on GitHub */ - open_issues_count?: Maybe; + 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']; + stargazers_count: Scalars['Int']['output']; }; export type Subscription = { @@ -141,24 +141,24 @@ export type Subscription = { }; export type SubscriptionCommentAddedArgs = { - repoFullName: Scalars['String']; + 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']; + avatar_url: Scalars['String']['output']; /** The URL of this user's GitHub page */ - html_url: Scalars['String']; + html_url: Scalars['String']['output']; /** The name of the user, e.g. apollostack */ - login: Scalars['String']; + login: Scalars['String']['output']; }; /** XXX to be removed */ export type Vote = { __typename?: 'Vote'; - vote_value: Scalars['Int']; + vote_value: Scalars['Int']['output']; }; /** The type of vote to record, when submitting a vote */ @@ -169,7 +169,7 @@ export enum VoteType { } export type OnCommentAddedSubscriptionVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }>; export type OnCommentAddedSubscription = { @@ -184,9 +184,9 @@ export type OnCommentAddedSubscription = { }; export type CommentQueryVariables = Exact<{ - repoFullName: Scalars['String']; - limit?: InputMaybe; - offset?: InputMaybe; + repoFullName: Scalars['String']['input']; + limit?: InputMaybe; + offset?: InputMaybe; }>; export type CommentQuery = { @@ -225,8 +225,8 @@ export type CurrentUserForProfileQuery = { export type FeedQueryVariables = Exact<{ type: FeedType; - offset?: InputMaybe; - limit?: InputMaybe; + offset?: InputMaybe; + limit?: InputMaybe; }>; export type FeedQuery = { @@ -253,7 +253,7 @@ export type FeedQuery = { }; export type SubmitRepositoryMutationVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }>; export type SubmitRepositoryMutation = { @@ -262,8 +262,8 @@ export type SubmitRepositoryMutation = { }; export type SubmitCommentMutationVariables = Exact<{ - repoFullName: Scalars['String']; - commentContent: Scalars['String']; + repoFullName: Scalars['String']['input']; + commentContent: Scalars['String']['input']; }>; export type SubmitCommentMutation = { @@ -278,7 +278,7 @@ export type SubmitCommentMutation = { }; export type VoteMutationVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; type: VoteType; }>; diff --git a/dev-test/githunt/types.immutableTypes.ts b/dev-test/githunt/types.immutableTypes.ts index a138437caad..236b7b7ddd0 100644 --- a/dev-test/githunt/types.immutableTypes.ts +++ b/dev-test/githunt/types.immutableTypes.ts @@ -7,55 +7,55 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; 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']; + readonly content: Scalars['String']['output']; /** A timestamp of when the comment was posted */ - readonly createdAt: Scalars['Float']; + readonly createdAt: Scalars['Float']['output']; /** The SQL ID of this entry */ - readonly id: Scalars['Int']; + 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']; + 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']; + 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']; + readonly createdAt: Scalars['Float']['output']; /** The hot score of this repository */ - readonly hotScore: Scalars['Float']; + readonly hotScore: Scalars['Float']['output']; /** The SQL ID of this entry */ - readonly id: Scalars['Int']; + 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']; + 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; + limit?: InputMaybe; + offset?: InputMaybe; }; /** A list of options for the sort order of the feed */ @@ -79,16 +79,16 @@ export type Mutation = { }; export type MutationSubmitCommentArgs = { - commentContent: Scalars['String']; - repoFullName: Scalars['String']; + commentContent: Scalars['String']['input']; + repoFullName: Scalars['String']['input']; }; export type MutationSubmitRepositoryArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }; export type MutationVoteArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; type: VoteType; }; @@ -103,12 +103,12 @@ export type Query = { }; export type QueryEntryArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }; export type QueryFeedArgs = { - limit?: InputMaybe; - offset?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; type: FeedType; }; @@ -119,19 +119,19 @@ export type QueryFeedArgs = { export type Repository = { readonly __typename?: 'Repository'; /** The description of the repository */ - readonly description?: Maybe; + readonly description?: Maybe; /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */ - readonly full_name: Scalars['String']; + readonly full_name: Scalars['String']['output']; /** The link to the repository on GitHub */ - readonly html_url: Scalars['String']; + readonly html_url: Scalars['String']['output']; /** Just the name of the repository, e.g. GitHunt-API */ - readonly name: Scalars['String']; + readonly name: Scalars['String']['output']; /** The number of open issues on this repository on GitHub */ - readonly open_issues_count?: Maybe; + 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']; + readonly stargazers_count: Scalars['Int']['output']; }; export type Subscription = { @@ -141,24 +141,24 @@ export type Subscription = { }; export type SubscriptionCommentAddedArgs = { - repoFullName: Scalars['String']; + 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']; + readonly avatar_url: Scalars['String']['output']; /** The URL of this user's GitHub page */ - readonly html_url: Scalars['String']; + readonly html_url: Scalars['String']['output']; /** The name of the user, e.g. apollostack */ - readonly login: Scalars['String']; + readonly login: Scalars['String']['output']; }; /** XXX to be removed */ export type Vote = { readonly __typename?: 'Vote'; - readonly vote_value: Scalars['Int']; + readonly vote_value: Scalars['Int']['output']; }; /** The type of vote to record, when submitting a vote */ @@ -169,7 +169,7 @@ export enum VoteType { } export type OnCommentAddedSubscriptionVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }>; export type OnCommentAddedSubscription = { @@ -184,9 +184,9 @@ export type OnCommentAddedSubscription = { }; export type CommentQueryVariables = Exact<{ - repoFullName: Scalars['String']; - limit?: InputMaybe; - offset?: InputMaybe; + repoFullName: Scalars['String']['input']; + limit?: InputMaybe; + offset?: InputMaybe; }>; export type CommentQuery = { @@ -252,8 +252,8 @@ export type FeedEntryFragment = { export type FeedQueryVariables = Exact<{ type: FeedType; - offset?: InputMaybe; - limit?: InputMaybe; + offset?: InputMaybe; + limit?: InputMaybe; }>; export type FeedQuery = { @@ -280,7 +280,7 @@ export type FeedQuery = { }; export type SubmitRepositoryMutationVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }>; export type SubmitRepositoryMutation = { @@ -301,8 +301,8 @@ export type RepoInfoFragment = { }; export type SubmitCommentMutationVariables = Exact<{ - repoFullName: Scalars['String']; - commentContent: Scalars['String']; + repoFullName: Scalars['String']['input']; + commentContent: Scalars['String']['input']; }>; export type SubmitCommentMutation = { @@ -323,7 +323,7 @@ export type VoteButtonsFragment = { }; export type VoteMutationVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; type: VoteType; }>; diff --git a/dev-test/githunt/types.preResolveTypes.onlyOperationTypes.ts b/dev-test/githunt/types.preResolveTypes.onlyOperationTypes.ts index ad963fff007..4dac6f7d163 100644 --- a/dev-test/githunt/types.preResolveTypes.onlyOperationTypes.ts +++ b/dev-test/githunt/types.preResolveTypes.onlyOperationTypes.ts @@ -7,11 +7,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; 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 */ @@ -32,7 +32,7 @@ export enum VoteType { } export type OnCommentAddedSubscriptionVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }>; export type OnCommentAddedSubscription = { @@ -47,9 +47,9 @@ export type OnCommentAddedSubscription = { }; export type CommentQueryVariables = Exact<{ - repoFullName: Scalars['String']; - limit?: InputMaybe; - offset?: InputMaybe; + repoFullName: Scalars['String']['input']; + limit?: InputMaybe; + offset?: InputMaybe; }>; export type CommentQuery = { @@ -115,8 +115,8 @@ export type FeedEntryFragment = { export type FeedQueryVariables = Exact<{ type: FeedType; - offset?: InputMaybe; - limit?: InputMaybe; + offset?: InputMaybe; + limit?: InputMaybe; }>; export type FeedQuery = { @@ -143,7 +143,7 @@ export type FeedQuery = { }; export type SubmitRepositoryMutationVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }>; export type SubmitRepositoryMutation = { @@ -164,8 +164,8 @@ export type RepoInfoFragment = { }; export type SubmitCommentMutationVariables = Exact<{ - repoFullName: Scalars['String']; - commentContent: Scalars['String']; + repoFullName: Scalars['String']['input']; + commentContent: Scalars['String']['input']; }>; export type SubmitCommentMutation = { @@ -186,7 +186,7 @@ export type VoteButtonsFragment = { }; export type VoteMutationVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; type: VoteType; }>; diff --git a/dev-test/githunt/types.preResolveTypes.ts b/dev-test/githunt/types.preResolveTypes.ts index 9196055488c..deb381b4377 100644 --- a/dev-test/githunt/types.preResolveTypes.ts +++ b/dev-test/githunt/types.preResolveTypes.ts @@ -7,55 +7,55 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; 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']; + content: Scalars['String']['output']; /** A timestamp of when the comment was posted */ - createdAt: Scalars['Float']; + createdAt: Scalars['Float']['output']; /** The SQL ID of this entry */ - id: Scalars['Int']; + id: Scalars['Int']['output']; /** The GitHub user who posted the comment */ postedBy: User; /** The repository which this comment is about */ - repoName: Scalars['String']; + 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']; + commentCount: Scalars['Int']['output']; /** Comments posted about this repository */ comments: Array>; /** A timestamp of when the entry was submitted */ - createdAt: Scalars['Float']; + createdAt: Scalars['Float']['output']; /** The hot score of this repository */ - hotScore: Scalars['Float']; + hotScore: Scalars['Float']['output']; /** The SQL ID of this entry */ - id: Scalars['Int']; + 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']; + 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; + limit?: InputMaybe; + offset?: InputMaybe; }; /** A list of options for the sort order of the feed */ @@ -79,16 +79,16 @@ export type Mutation = { }; export type MutationSubmitCommentArgs = { - commentContent: Scalars['String']; - repoFullName: Scalars['String']; + commentContent: Scalars['String']['input']; + repoFullName: Scalars['String']['input']; }; export type MutationSubmitRepositoryArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }; export type MutationVoteArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; type: VoteType; }; @@ -103,12 +103,12 @@ export type Query = { }; export type QueryEntryArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }; export type QueryFeedArgs = { - limit?: InputMaybe; - offset?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; type: FeedType; }; @@ -119,19 +119,19 @@ export type QueryFeedArgs = { export type Repository = { __typename?: 'Repository'; /** The description of the repository */ - description?: Maybe; + description?: Maybe; /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */ - full_name: Scalars['String']; + full_name: Scalars['String']['output']; /** The link to the repository on GitHub */ - html_url: Scalars['String']; + html_url: Scalars['String']['output']; /** Just the name of the repository, e.g. GitHunt-API */ - name: Scalars['String']; + name: Scalars['String']['output']; /** The number of open issues on this repository on GitHub */ - open_issues_count?: Maybe; + 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']; + stargazers_count: Scalars['Int']['output']; }; export type Subscription = { @@ -141,24 +141,24 @@ export type Subscription = { }; export type SubscriptionCommentAddedArgs = { - repoFullName: Scalars['String']; + 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']; + avatar_url: Scalars['String']['output']; /** The URL of this user's GitHub page */ - html_url: Scalars['String']; + html_url: Scalars['String']['output']; /** The name of the user, e.g. apollostack */ - login: Scalars['String']; + login: Scalars['String']['output']; }; /** XXX to be removed */ export type Vote = { __typename?: 'Vote'; - vote_value: Scalars['Int']; + vote_value: Scalars['Int']['output']; }; /** The type of vote to record, when submitting a vote */ @@ -169,7 +169,7 @@ export enum VoteType { } export type OnCommentAddedSubscriptionVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }>; export type OnCommentAddedSubscription = { @@ -184,9 +184,9 @@ export type OnCommentAddedSubscription = { }; export type CommentQueryVariables = Exact<{ - repoFullName: Scalars['String']; - limit?: InputMaybe; - offset?: InputMaybe; + repoFullName: Scalars['String']['input']; + limit?: InputMaybe; + offset?: InputMaybe; }>; export type CommentQuery = { @@ -252,8 +252,8 @@ export type FeedEntryFragment = { export type FeedQueryVariables = Exact<{ type: FeedType; - offset?: InputMaybe; - limit?: InputMaybe; + offset?: InputMaybe; + limit?: InputMaybe; }>; export type FeedQuery = { @@ -280,7 +280,7 @@ export type FeedQuery = { }; export type SubmitRepositoryMutationVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }>; export type SubmitRepositoryMutation = { @@ -301,8 +301,8 @@ export type RepoInfoFragment = { }; export type SubmitCommentMutationVariables = Exact<{ - repoFullName: Scalars['String']; - commentContent: Scalars['String']; + repoFullName: Scalars['String']['input']; + commentContent: Scalars['String']['input']; }>; export type SubmitCommentMutation = { @@ -323,7 +323,7 @@ export type VoteButtonsFragment = { }; export type VoteMutationVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; type: VoteType; }>; diff --git a/dev-test/githunt/types.ts b/dev-test/githunt/types.ts index 9196055488c..deb381b4377 100644 --- a/dev-test/githunt/types.ts +++ b/dev-test/githunt/types.ts @@ -7,55 +7,55 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; 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']; + content: Scalars['String']['output']; /** A timestamp of when the comment was posted */ - createdAt: Scalars['Float']; + createdAt: Scalars['Float']['output']; /** The SQL ID of this entry */ - id: Scalars['Int']; + id: Scalars['Int']['output']; /** The GitHub user who posted the comment */ postedBy: User; /** The repository which this comment is about */ - repoName: Scalars['String']; + 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']; + commentCount: Scalars['Int']['output']; /** Comments posted about this repository */ comments: Array>; /** A timestamp of when the entry was submitted */ - createdAt: Scalars['Float']; + createdAt: Scalars['Float']['output']; /** The hot score of this repository */ - hotScore: Scalars['Float']; + hotScore: Scalars['Float']['output']; /** The SQL ID of this entry */ - id: Scalars['Int']; + 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']; + 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; + limit?: InputMaybe; + offset?: InputMaybe; }; /** A list of options for the sort order of the feed */ @@ -79,16 +79,16 @@ export type Mutation = { }; export type MutationSubmitCommentArgs = { - commentContent: Scalars['String']; - repoFullName: Scalars['String']; + commentContent: Scalars['String']['input']; + repoFullName: Scalars['String']['input']; }; export type MutationSubmitRepositoryArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }; export type MutationVoteArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; type: VoteType; }; @@ -103,12 +103,12 @@ export type Query = { }; export type QueryEntryArgs = { - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }; export type QueryFeedArgs = { - limit?: InputMaybe; - offset?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; type: FeedType; }; @@ -119,19 +119,19 @@ export type QueryFeedArgs = { export type Repository = { __typename?: 'Repository'; /** The description of the repository */ - description?: Maybe; + description?: Maybe; /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */ - full_name: Scalars['String']; + full_name: Scalars['String']['output']; /** The link to the repository on GitHub */ - html_url: Scalars['String']; + html_url: Scalars['String']['output']; /** Just the name of the repository, e.g. GitHunt-API */ - name: Scalars['String']; + name: Scalars['String']['output']; /** The number of open issues on this repository on GitHub */ - open_issues_count?: Maybe; + 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']; + stargazers_count: Scalars['Int']['output']; }; export type Subscription = { @@ -141,24 +141,24 @@ export type Subscription = { }; export type SubscriptionCommentAddedArgs = { - repoFullName: Scalars['String']; + 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']; + avatar_url: Scalars['String']['output']; /** The URL of this user's GitHub page */ - html_url: Scalars['String']; + html_url: Scalars['String']['output']; /** The name of the user, e.g. apollostack */ - login: Scalars['String']; + login: Scalars['String']['output']; }; /** XXX to be removed */ export type Vote = { __typename?: 'Vote'; - vote_value: Scalars['Int']; + vote_value: Scalars['Int']['output']; }; /** The type of vote to record, when submitting a vote */ @@ -169,7 +169,7 @@ export enum VoteType { } export type OnCommentAddedSubscriptionVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }>; export type OnCommentAddedSubscription = { @@ -184,9 +184,9 @@ export type OnCommentAddedSubscription = { }; export type CommentQueryVariables = Exact<{ - repoFullName: Scalars['String']; - limit?: InputMaybe; - offset?: InputMaybe; + repoFullName: Scalars['String']['input']; + limit?: InputMaybe; + offset?: InputMaybe; }>; export type CommentQuery = { @@ -252,8 +252,8 @@ export type FeedEntryFragment = { export type FeedQueryVariables = Exact<{ type: FeedType; - offset?: InputMaybe; - limit?: InputMaybe; + offset?: InputMaybe; + limit?: InputMaybe; }>; export type FeedQuery = { @@ -280,7 +280,7 @@ export type FeedQuery = { }; export type SubmitRepositoryMutationVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }>; export type SubmitRepositoryMutation = { @@ -301,8 +301,8 @@ export type RepoInfoFragment = { }; export type SubmitCommentMutationVariables = Exact<{ - repoFullName: Scalars['String']; - commentContent: Scalars['String']; + repoFullName: Scalars['String']['input']; + commentContent: Scalars['String']['input']; }>; export type SubmitCommentMutation = { @@ -323,7 +323,7 @@ export type VoteButtonsFragment = { }; export type VoteMutationVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; type: VoteType; }>; diff --git a/dev-test/gql-tag-operations-masking/gql/graphql.ts b/dev-test/gql-tag-operations-masking/gql/graphql.ts index 20b8154dd3d..ba81b9e621e 100644 --- a/dev-test/gql-tag-operations-masking/gql/graphql.ts +++ b/dev-test/gql-tag-operations-masking/gql/graphql.ts @@ -9,44 +9,44 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; - Date: any; - Url: any; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; + Date: { input: any; output: any }; + Url: { input: any; output: any }; }; export type Meta = { __typename?: 'Meta'; - count?: Maybe; + count?: Maybe; }; export type Mutation = { __typename?: 'Mutation'; createTweet?: Maybe; deleteTweet?: Maybe; - markTweetRead?: Maybe; + markTweetRead?: Maybe; }; export type MutationCreateTweetArgs = { - body?: InputMaybe; + body?: InputMaybe; }; export type MutationDeleteTweetArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type MutationMarkTweetReadArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type Notification = { __typename?: 'Notification'; - date?: Maybe; - id?: Maybe; - type?: Maybe; + date?: Maybe; + id?: Maybe; + type?: Maybe; }; export type Query = { @@ -60,51 +60,51 @@ export type Query = { }; export type QueryNotificationsArgs = { - limit?: InputMaybe; + limit?: InputMaybe; }; export type QueryTweetArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type QueryTweetsArgs = { - limit?: InputMaybe; - skip?: InputMaybe; - sort_field?: InputMaybe; - sort_order?: InputMaybe; + limit?: InputMaybe; + skip?: InputMaybe; + sort_field?: InputMaybe; + sort_order?: InputMaybe; }; export type QueryUserArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type Stat = { __typename?: 'Stat'; - likes?: Maybe; - responses?: Maybe; - retweets?: Maybe; - views?: Maybe; + likes?: Maybe; + responses?: Maybe; + retweets?: Maybe; + views?: Maybe; }; export type Tweet = { __typename?: 'Tweet'; Stats?: Maybe; author: User; - body: Scalars['String']; - date?: Maybe; - id: Scalars['ID']; + body: Scalars['String']['output']; + date?: Maybe; + id: Scalars['ID']['output']; }; export type User = { __typename?: 'User'; - avatar_url?: Maybe; - first_name?: Maybe; - full_name?: Maybe; - id: Scalars['ID']; - last_name?: Maybe; + avatar_url?: Maybe; + first_name?: Maybe; + full_name?: Maybe; + id: Scalars['ID']['output']; + last_name?: Maybe; /** @deprecated Field no longer supported */ - name?: Maybe; - username?: Maybe; + name?: Maybe; + username?: Maybe; }; export type TweetFragmentFragment = ({ __typename?: 'Tweet'; id: string; body: string } & { diff --git a/dev-test/gql-tag-operations-urql/gql/graphql.ts b/dev-test/gql-tag-operations-urql/gql/graphql.ts index 6992bb76696..c12acc6d8ed 100644 --- a/dev-test/gql-tag-operations-urql/gql/graphql.ts +++ b/dev-test/gql-tag-operations-urql/gql/graphql.ts @@ -9,44 +9,44 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; - Date: any; - Url: any; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; + Date: { input: any; output: any }; + Url: { input: any; output: any }; }; export type Meta = { __typename?: 'Meta'; - count?: Maybe; + count?: Maybe; }; export type Mutation = { __typename?: 'Mutation'; createTweet?: Maybe; deleteTweet?: Maybe; - markTweetRead?: Maybe; + markTweetRead?: Maybe; }; export type MutationCreateTweetArgs = { - body?: InputMaybe; + body?: InputMaybe; }; export type MutationDeleteTweetArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type MutationMarkTweetReadArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type Notification = { __typename?: 'Notification'; - date?: Maybe; - id?: Maybe; - type?: Maybe; + date?: Maybe; + id?: Maybe; + type?: Maybe; }; export type Query = { @@ -60,51 +60,51 @@ export type Query = { }; export type QueryNotificationsArgs = { - limit?: InputMaybe; + limit?: InputMaybe; }; export type QueryTweetArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type QueryTweetsArgs = { - limit?: InputMaybe; - skip?: InputMaybe; - sort_field?: InputMaybe; - sort_order?: InputMaybe; + limit?: InputMaybe; + skip?: InputMaybe; + sort_field?: InputMaybe; + sort_order?: InputMaybe; }; export type QueryUserArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type Stat = { __typename?: 'Stat'; - likes?: Maybe; - responses?: Maybe; - retweets?: Maybe; - views?: Maybe; + likes?: Maybe; + responses?: Maybe; + retweets?: Maybe; + views?: Maybe; }; export type Tweet = { __typename?: 'Tweet'; Author?: Maybe; Stats?: Maybe; - body?: Maybe; - date?: Maybe; - id: Scalars['ID']; + body?: Maybe; + date?: Maybe; + id: Scalars['ID']['output']; }; export type User = { __typename?: 'User'; - avatar_url?: Maybe; - first_name?: Maybe; - full_name?: Maybe; - id: Scalars['ID']; - last_name?: Maybe; + avatar_url?: Maybe; + first_name?: Maybe; + full_name?: Maybe; + id: Scalars['ID']['output']; + last_name?: Maybe; /** @deprecated Field no longer supported */ - name?: Maybe; - username?: Maybe; + name?: Maybe; + username?: Maybe; }; export type FooQueryVariables = Exact<{ [key: string]: never }>; diff --git a/dev-test/gql-tag-operations/gql/graphql.ts b/dev-test/gql-tag-operations/gql/graphql.ts index 6992bb76696..c12acc6d8ed 100644 --- a/dev-test/gql-tag-operations/gql/graphql.ts +++ b/dev-test/gql-tag-operations/gql/graphql.ts @@ -9,44 +9,44 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; - Date: any; - Url: any; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; + Date: { input: any; output: any }; + Url: { input: any; output: any }; }; export type Meta = { __typename?: 'Meta'; - count?: Maybe; + count?: Maybe; }; export type Mutation = { __typename?: 'Mutation'; createTweet?: Maybe; deleteTweet?: Maybe; - markTweetRead?: Maybe; + markTweetRead?: Maybe; }; export type MutationCreateTweetArgs = { - body?: InputMaybe; + body?: InputMaybe; }; export type MutationDeleteTweetArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type MutationMarkTweetReadArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type Notification = { __typename?: 'Notification'; - date?: Maybe; - id?: Maybe; - type?: Maybe; + date?: Maybe; + id?: Maybe; + type?: Maybe; }; export type Query = { @@ -60,51 +60,51 @@ export type Query = { }; export type QueryNotificationsArgs = { - limit?: InputMaybe; + limit?: InputMaybe; }; export type QueryTweetArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type QueryTweetsArgs = { - limit?: InputMaybe; - skip?: InputMaybe; - sort_field?: InputMaybe; - sort_order?: InputMaybe; + limit?: InputMaybe; + skip?: InputMaybe; + sort_field?: InputMaybe; + sort_order?: InputMaybe; }; export type QueryUserArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type Stat = { __typename?: 'Stat'; - likes?: Maybe; - responses?: Maybe; - retweets?: Maybe; - views?: Maybe; + likes?: Maybe; + responses?: Maybe; + retweets?: Maybe; + views?: Maybe; }; export type Tweet = { __typename?: 'Tweet'; Author?: Maybe; Stats?: Maybe; - body?: Maybe; - date?: Maybe; - id: Scalars['ID']; + body?: Maybe; + date?: Maybe; + id: Scalars['ID']['output']; }; export type User = { __typename?: 'User'; - avatar_url?: Maybe; - first_name?: Maybe; - full_name?: Maybe; - id: Scalars['ID']; - last_name?: Maybe; + avatar_url?: Maybe; + first_name?: Maybe; + full_name?: Maybe; + id: Scalars['ID']['output']; + last_name?: Maybe; /** @deprecated Field no longer supported */ - name?: Maybe; - username?: Maybe; + name?: Maybe; + username?: Maybe; }; export type FooQueryVariables = Exact<{ [key: string]: never }>; diff --git a/dev-test/gql-tag-operations/graphql/graphql.ts b/dev-test/gql-tag-operations/graphql/graphql.ts index 6992bb76696..c12acc6d8ed 100644 --- a/dev-test/gql-tag-operations/graphql/graphql.ts +++ b/dev-test/gql-tag-operations/graphql/graphql.ts @@ -9,44 +9,44 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; - Date: any; - Url: any; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; + Date: { input: any; output: any }; + Url: { input: any; output: any }; }; export type Meta = { __typename?: 'Meta'; - count?: Maybe; + count?: Maybe; }; export type Mutation = { __typename?: 'Mutation'; createTweet?: Maybe; deleteTweet?: Maybe; - markTweetRead?: Maybe; + markTweetRead?: Maybe; }; export type MutationCreateTweetArgs = { - body?: InputMaybe; + body?: InputMaybe; }; export type MutationDeleteTweetArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type MutationMarkTweetReadArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type Notification = { __typename?: 'Notification'; - date?: Maybe; - id?: Maybe; - type?: Maybe; + date?: Maybe; + id?: Maybe; + type?: Maybe; }; export type Query = { @@ -60,51 +60,51 @@ export type Query = { }; export type QueryNotificationsArgs = { - limit?: InputMaybe; + limit?: InputMaybe; }; export type QueryTweetArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type QueryTweetsArgs = { - limit?: InputMaybe; - skip?: InputMaybe; - sort_field?: InputMaybe; - sort_order?: InputMaybe; + limit?: InputMaybe; + skip?: InputMaybe; + sort_field?: InputMaybe; + sort_order?: InputMaybe; }; export type QueryUserArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type Stat = { __typename?: 'Stat'; - likes?: Maybe; - responses?: Maybe; - retweets?: Maybe; - views?: Maybe; + likes?: Maybe; + responses?: Maybe; + retweets?: Maybe; + views?: Maybe; }; export type Tweet = { __typename?: 'Tweet'; Author?: Maybe; Stats?: Maybe; - body?: Maybe; - date?: Maybe; - id: Scalars['ID']; + body?: Maybe; + date?: Maybe; + id: Scalars['ID']['output']; }; export type User = { __typename?: 'User'; - avatar_url?: Maybe; - first_name?: Maybe; - full_name?: Maybe; - id: Scalars['ID']; - last_name?: Maybe; + avatar_url?: Maybe; + first_name?: Maybe; + full_name?: Maybe; + id: Scalars['ID']['output']; + last_name?: Maybe; /** @deprecated Field no longer supported */ - name?: Maybe; - username?: Maybe; + name?: Maybe; + username?: Maybe; }; export type FooQueryVariables = Exact<{ [key: string]: never }>; diff --git a/dev-test/modules/types.ts b/dev-test/modules/types.ts index a6833e1cfbe..1101f0a16d6 100644 --- a/dev-test/modules/types.ts +++ b/dev-test/modules/types.ts @@ -10,46 +10,46 @@ export type Omit = Pick>; export type RequireFields = Omit & { [P in K]-?: NonNullable }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; export type Article = { __typename?: 'Article'; author: User; - id: Scalars['ID']; - text: Scalars['String']; - title: Scalars['String']; + id: Scalars['ID']['output']; + text: Scalars['String']['output']; + title: Scalars['String']['output']; }; export type CreditCard = { __typename?: 'CreditCard'; - cardNumber: Scalars['Int']; - cardOwner: Scalars['String']; - id: Scalars['ID']; + cardNumber: Scalars['Int']['output']; + cardOwner: Scalars['String']['output']; + id: Scalars['ID']['output']; }; export type Donation = { __typename?: 'Donation'; - amount: Scalars['Float']; - id: Scalars['ID']; + amount: Scalars['Float']['output']; + id: Scalars['ID']['output']; recipient: User; sender: User; }; export type DonationInput = { - amount: Scalars['Float']; - paymentOption: Scalars['ID']; - user: Scalars['ID']; + amount: Scalars['Float']['input']; + paymentOption: Scalars['ID']['input']; + user: Scalars['ID']['input']; }; export type Mutation = { __typename?: 'Mutation'; donate?: Maybe; - pong?: Maybe; + pong?: Maybe; }; export type MutationDonateArgs = { @@ -60,8 +60,8 @@ export type PaymentOption = CreditCard | Paypal; export type Paypal = { __typename?: 'Paypal'; - id: Scalars['ID']; - url: Scalars['String']; + id: Scalars['ID']['output']; + url: Scalars['String']['output']; }; export type Query = { @@ -69,28 +69,28 @@ export type Query = { articleById?: Maybe
; articles?: Maybe>; articlesByUser?: Maybe>; - ping?: Maybe; + ping?: Maybe; userById?: Maybe; users?: Maybe>; }; export type QueryArticleByIdArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type QueryArticlesByUserArgs = { - userId: Scalars['ID']; + userId: Scalars['ID']['input']; }; export type QueryUserByIdArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type User = { __typename?: 'User'; - firstName: Scalars['String']; - id: Scalars['ID']; - lastName: Scalars['String']; + firstName: Scalars['String']['output']; + id: Scalars['ID']['output']; + lastName: Scalars['String']['output']; paymentOptions?: Maybe>; }; @@ -172,18 +172,18 @@ export type ResolversUnionTypes> = { /** Mapping between all available schema types and the resolvers types */ export type ResolversTypes = { Article: ResolverTypeWrapper
; - Boolean: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; CreditCard: ResolverTypeWrapper; Donation: ResolverTypeWrapper; DonationInput: DonationInput; - Float: ResolverTypeWrapper; - ID: ResolverTypeWrapper; - Int: ResolverTypeWrapper; + Float: ResolverTypeWrapper; + ID: ResolverTypeWrapper; + Int: ResolverTypeWrapper; Mutation: ResolverTypeWrapper<{}>; PaymentOption: ResolverTypeWrapper['PaymentOption']>; Paypal: ResolverTypeWrapper; Query: ResolverTypeWrapper<{}>; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; User: ResolverTypeWrapper< Omit & { paymentOptions?: Maybe> } >; @@ -192,18 +192,18 @@ export type ResolversTypes = { /** Mapping between all available schema types and the resolvers parents */ export type ResolversParentTypes = { Article: Article; - Boolean: Scalars['Boolean']; + Boolean: Scalars['Boolean']['output']; CreditCard: CreditCard; Donation: Donation; DonationInput: DonationInput; - Float: Scalars['Float']; - ID: Scalars['ID']; - Int: Scalars['Int']; + Float: Scalars['Float']['output']; + ID: Scalars['ID']['output']; + Int: Scalars['Int']['output']; Mutation: {}; PaymentOption: ResolversUnionTypes['PaymentOption']; Paypal: Paypal; Query: {}; - String: Scalars['String']; + String: Scalars['String']['output']; User: Omit & { paymentOptions?: Maybe> }; }; diff --git a/dev-test/star-wars/types.avoidOptionals.ts b/dev-test/star-wars/types.avoidOptionals.ts index f38112251c6..63b07dc7ef9 100644 --- a/dev-test/star-wars/types.avoidOptionals.ts +++ b/dev-test/star-wars/types.avoidOptionals.ts @@ -7,11 +7,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A character from the Star Wars universe */ @@ -23,22 +23,22 @@ export type Character = { /** The friends of the character exposed as a connection with edges */ friendsConnection: FriendsConnection; /** The ID of the character */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The name of the character */ - name: Scalars['String']; + name: Scalars['String']['output']; }; /** A character from the Star Wars universe */ export type CharacterFriendsConnectionArgs = { - after: InputMaybe; - first: InputMaybe; + after: InputMaybe; + first: InputMaybe; }; /** The input object sent when passing a color */ export type ColorInput = { - blue: Scalars['Int']; - green: Scalars['Int']; - red: Scalars['Int']; + blue: Scalars['Int']['input']; + green: Scalars['Int']['input']; + red: Scalars['Int']['input']; }; /** An autonomous mechanical character in the Star Wars universe */ @@ -51,17 +51,17 @@ export type Droid = Character & { /** The friends of the droid exposed as a connection with edges */ friendsConnection: FriendsConnection; /** The ID of the droid */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** What others call this droid */ - name: Scalars['String']; + name: Scalars['String']['output']; /** This droid's primary function */ - primaryFunction: Maybe; + primaryFunction: Maybe; }; /** An autonomous mechanical character in the Star Wars universe */ export type DroidFriendsConnectionArgs = { - after: InputMaybe; - first: InputMaybe; + after: InputMaybe; + first: InputMaybe; }; /** The episodes in the Star Wars trilogy */ @@ -84,14 +84,14 @@ export type FriendsConnection = { /** Information for paginating this connection */ pageInfo: PageInfo; /** The total number of friends */ - totalCount: Maybe; + totalCount: Maybe; }; /** An edge object for a character's friends */ export type FriendsEdge = { __typename?: 'FriendsEdge'; /** A cursor used for pagination */ - cursor: Scalars['ID']; + cursor: Scalars['ID']['output']; /** The character represented by this friendship edge */ node: Maybe; }; @@ -106,23 +106,23 @@ export type Human = Character & { /** The friends of the human exposed as a connection with edges */ friendsConnection: FriendsConnection; /** Height in the preferred unit, default is meters */ - height: Maybe; + height: Maybe; /** The home planet of the human, or null if unknown */ - homePlanet: Maybe; + homePlanet: Maybe; /** The ID of the human */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** Mass in kilograms, or null if unknown */ - mass: Maybe; + mass: Maybe; /** What this human calls themselves */ - name: Scalars['String']; + name: Scalars['String']['output']; /** A list of starships this person has piloted, or an empty list if none */ starships: Maybe>>; }; /** A humanoid creature from the Star Wars universe */ export type HumanFriendsConnectionArgs = { - after: InputMaybe; - first: InputMaybe; + after: InputMaybe; + first: InputMaybe; }; /** A humanoid creature from the Star Wars universe */ @@ -153,9 +153,9 @@ export type MutationCreateReviewArgs = { /** Information for paginating this connection */ export type PageInfo = { __typename?: 'PageInfo'; - endCursor: Maybe; - hasNextPage: Scalars['Boolean']; - startCursor: Maybe; + endCursor: Maybe; + hasNextPage: Scalars['Boolean']['output']; + startCursor: Maybe; }; /** The query type, represents all of the entry points into our object graph */ @@ -172,12 +172,12 @@ export type Query = { /** The query type, represents all of the entry points into our object graph */ export type QueryCharacterArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ export type QueryDroidArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ @@ -187,7 +187,7 @@ export type QueryHeroArgs = { /** The query type, represents all of the entry points into our object graph */ export type QueryHumanArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ @@ -197,31 +197,31 @@ export type QueryReviewsArgs = { /** The query type, represents all of the entry points into our object graph */ export type QuerySearchArgs = { - text: InputMaybe; + text: InputMaybe; }; /** The query type, represents all of the entry points into our object graph */ export type QueryStarshipArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** Represents a review for a movie */ export type Review = { __typename?: 'Review'; /** Comment about the movie */ - commentary: Maybe; + commentary: Maybe; /** The number of stars this review gave, 1-5 */ - stars: Scalars['Int']; + stars: Scalars['Int']['output']; }; /** The input object sent when someone is creating a new review */ export type ReviewInput = { /** Comment about the movie, optional */ - commentary: InputMaybe; + commentary: InputMaybe; /** Favorite color, optional */ favoriteColor: InputMaybe; /** 0-5 stars */ - stars: Scalars['Int']; + stars: Scalars['Int']['input']; }; export type SearchResult = Droid | Human | Starship; @@ -229,11 +229,11 @@ export type SearchResult = Droid | Human | Starship; export type Starship = { __typename?: 'Starship'; /** The ID of the starship */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** Length of the starship, along the longest axis */ - length: Maybe; + length: Maybe; /** The name of the starship */ - name: Scalars['String']; + name: Scalars['String']['output']; }; export type StarshipLengthArgs = { @@ -339,7 +339,7 @@ export type HeroNameQuery = { export type HeroNameConditionalInclusionQueryVariables = Exact<{ episode: InputMaybe; - includeName: Scalars['Boolean']; + includeName: Scalars['Boolean']['input']; }>; export type HeroNameConditionalInclusionQuery = { @@ -349,7 +349,7 @@ export type HeroNameConditionalInclusionQuery = { export type HeroNameConditionalExclusionQueryVariables = Exact<{ episode: InputMaybe; - skipName: Scalars['Boolean']; + skipName: Scalars['Boolean']['input']; }>; export type HeroNameConditionalExclusionQuery = { diff --git a/dev-test/star-wars/types.d.ts b/dev-test/star-wars/types.d.ts index 8242f8b5c3b..0eec301b4ad 100644 --- a/dev-test/star-wars/types.d.ts +++ b/dev-test/star-wars/types.d.ts @@ -7,11 +7,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A character from the Star Wars universe */ @@ -23,22 +23,22 @@ export type Character = { /** The friends of the character exposed as a connection with edges */ friendsConnection: FriendsConnection; /** The ID of the character */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The name of the character */ - name: Scalars['String']; + name: Scalars['String']['output']; }; /** A character from the Star Wars universe */ export type CharacterFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** The input object sent when passing a color */ export type ColorInput = { - blue: Scalars['Int']; - green: Scalars['Int']; - red: Scalars['Int']; + blue: Scalars['Int']['input']; + green: Scalars['Int']['input']; + red: Scalars['Int']['input']; }; /** An autonomous mechanical character in the Star Wars universe */ @@ -51,17 +51,17 @@ export type Droid = Character & { /** The friends of the droid exposed as a connection with edges */ friendsConnection: FriendsConnection; /** The ID of the droid */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** What others call this droid */ - name: Scalars['String']; + name: Scalars['String']['output']; /** This droid's primary function */ - primaryFunction?: Maybe; + primaryFunction?: Maybe; }; /** An autonomous mechanical character in the Star Wars universe */ export type DroidFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** The episodes in the Star Wars trilogy */ @@ -83,14 +83,14 @@ export type FriendsConnection = { /** Information for paginating this connection */ pageInfo: PageInfo; /** The total number of friends */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge object for a character's friends */ export type FriendsEdge = { __typename?: 'FriendsEdge'; /** A cursor used for pagination */ - cursor: Scalars['ID']; + cursor: Scalars['ID']['output']; /** The character represented by this friendship edge */ node?: Maybe; }; @@ -105,23 +105,23 @@ export type Human = Character & { /** The friends of the human exposed as a connection with edges */ friendsConnection: FriendsConnection; /** Height in the preferred unit, default is meters */ - height?: Maybe; + height?: Maybe; /** The home planet of the human, or null if unknown */ - homePlanet?: Maybe; + homePlanet?: Maybe; /** The ID of the human */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** Mass in kilograms, or null if unknown */ - mass?: Maybe; + mass?: Maybe; /** What this human calls themselves */ - name: Scalars['String']; + name: Scalars['String']['output']; /** A list of starships this person has piloted, or an empty list if none */ starships?: Maybe>>; }; /** A humanoid creature from the Star Wars universe */ export type HumanFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** A humanoid creature from the Star Wars universe */ @@ -151,9 +151,9 @@ export type MutationCreateReviewArgs = { /** Information for paginating this connection */ export type PageInfo = { __typename?: 'PageInfo'; - endCursor?: Maybe; - hasNextPage: Scalars['Boolean']; - startCursor?: Maybe; + endCursor?: Maybe; + hasNextPage: Scalars['Boolean']['output']; + startCursor?: Maybe; }; /** The query type, represents all of the entry points into our object graph */ @@ -170,12 +170,12 @@ export type Query = { /** The query type, represents all of the entry points into our object graph */ export type QueryCharacterArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ export type QueryDroidArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ @@ -185,7 +185,7 @@ export type QueryHeroArgs = { /** The query type, represents all of the entry points into our object graph */ export type QueryHumanArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ @@ -195,31 +195,31 @@ export type QueryReviewsArgs = { /** The query type, represents all of the entry points into our object graph */ export type QuerySearchArgs = { - text?: InputMaybe; + text?: InputMaybe; }; /** The query type, represents all of the entry points into our object graph */ export type QueryStarshipArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** Represents a review for a movie */ export type Review = { __typename?: 'Review'; /** Comment about the movie */ - commentary?: Maybe; + commentary?: Maybe; /** The number of stars this review gave, 1-5 */ - stars: Scalars['Int']; + stars: Scalars['Int']['output']; }; /** The input object sent when someone is creating a new review */ export type ReviewInput = { /** Comment about the movie, optional */ - commentary?: InputMaybe; + commentary?: InputMaybe; /** Favorite color, optional */ favoriteColor?: InputMaybe; /** 0-5 stars */ - stars: Scalars['Int']; + stars: Scalars['Int']['input']; }; export type SearchResult = Droid | Human | Starship; @@ -227,11 +227,11 @@ export type SearchResult = Droid | Human | Starship; export type Starship = { __typename?: 'Starship'; /** The ID of the starship */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** Length of the starship, along the longest axis */ - length?: Maybe; + length?: Maybe; /** The name of the starship */ - name: Scalars['String']; + name: Scalars['String']['output']; }; export type StarshipLengthArgs = { diff --git a/dev-test/star-wars/types.excludeQueryAlpha.ts b/dev-test/star-wars/types.excludeQueryAlpha.ts index aac8608baf1..9d07ac14bb2 100644 --- a/dev-test/star-wars/types.excludeQueryAlpha.ts +++ b/dev-test/star-wars/types.excludeQueryAlpha.ts @@ -7,11 +7,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A character from the Star Wars universe */ @@ -23,22 +23,22 @@ export type Character = { /** The friends of the character exposed as a connection with edges */ friendsConnection: FriendsConnection; /** The ID of the character */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The name of the character */ - name: Scalars['String']; + name: Scalars['String']['output']; }; /** A character from the Star Wars universe */ export type CharacterFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** The input object sent when passing a color */ export type ColorInput = { - blue: Scalars['Int']; - green: Scalars['Int']; - red: Scalars['Int']; + blue: Scalars['Int']['input']; + green: Scalars['Int']['input']; + red: Scalars['Int']['input']; }; /** An autonomous mechanical character in the Star Wars universe */ @@ -51,17 +51,17 @@ export type Droid = Character & { /** The friends of the droid exposed as a connection with edges */ friendsConnection: FriendsConnection; /** The ID of the droid */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** What others call this droid */ - name: Scalars['String']; + name: Scalars['String']['output']; /** This droid's primary function */ - primaryFunction?: Maybe; + primaryFunction?: Maybe; }; /** An autonomous mechanical character in the Star Wars universe */ export type DroidFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** The episodes in the Star Wars trilogy */ @@ -84,14 +84,14 @@ export type FriendsConnection = { /** Information for paginating this connection */ pageInfo: PageInfo; /** The total number of friends */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge object for a character's friends */ export type FriendsEdge = { __typename?: 'FriendsEdge'; /** A cursor used for pagination */ - cursor: Scalars['ID']; + cursor: Scalars['ID']['output']; /** The character represented by this friendship edge */ node?: Maybe; }; @@ -106,23 +106,23 @@ export type Human = Character & { /** The friends of the human exposed as a connection with edges */ friendsConnection: FriendsConnection; /** Height in the preferred unit, default is meters */ - height?: Maybe; + height?: Maybe; /** The home planet of the human, or null if unknown */ - homePlanet?: Maybe; + homePlanet?: Maybe; /** The ID of the human */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** Mass in kilograms, or null if unknown */ - mass?: Maybe; + mass?: Maybe; /** What this human calls themselves */ - name: Scalars['String']; + name: Scalars['String']['output']; /** A list of starships this person has piloted, or an empty list if none */ starships?: Maybe>>; }; /** A humanoid creature from the Star Wars universe */ export type HumanFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** A humanoid creature from the Star Wars universe */ @@ -153,9 +153,9 @@ export type MutationCreateReviewArgs = { /** Information for paginating this connection */ export type PageInfo = { __typename?: 'PageInfo'; - endCursor?: Maybe; - hasNextPage: Scalars['Boolean']; - startCursor?: Maybe; + endCursor?: Maybe; + hasNextPage: Scalars['Boolean']['output']; + startCursor?: Maybe; }; /** The query type, represents all of the entry points into our object graph */ @@ -172,12 +172,12 @@ export type Query = { /** The query type, represents all of the entry points into our object graph */ export type QueryCharacterArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ export type QueryDroidArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ @@ -187,7 +187,7 @@ export type QueryHeroArgs = { /** The query type, represents all of the entry points into our object graph */ export type QueryHumanArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ @@ -197,31 +197,31 @@ export type QueryReviewsArgs = { /** The query type, represents all of the entry points into our object graph */ export type QuerySearchArgs = { - text?: InputMaybe; + text?: InputMaybe; }; /** The query type, represents all of the entry points into our object graph */ export type QueryStarshipArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** Represents a review for a movie */ export type Review = { __typename?: 'Review'; /** Comment about the movie */ - commentary?: Maybe; + commentary?: Maybe; /** The number of stars this review gave, 1-5 */ - stars: Scalars['Int']; + stars: Scalars['Int']['output']; }; /** The input object sent when someone is creating a new review */ export type ReviewInput = { /** Comment about the movie, optional */ - commentary?: InputMaybe; + commentary?: InputMaybe; /** Favorite color, optional */ favoriteColor?: InputMaybe; /** 0-5 stars */ - stars: Scalars['Int']; + stars: Scalars['Int']['input']; }; export type SearchResult = Droid | Human | Starship; @@ -229,11 +229,11 @@ export type SearchResult = Droid | Human | Starship; export type Starship = { __typename?: 'Starship'; /** The ID of the starship */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** Length of the starship, along the longest axis */ - length?: Maybe; + length?: Maybe; /** The name of the starship */ - name: Scalars['String']; + name: Scalars['String']['output']; }; export type StarshipLengthArgs = { @@ -330,7 +330,7 @@ export type HeroNameQuery = { export type HeroNameConditionalInclusionQueryVariables = Exact<{ episode?: InputMaybe; - includeName: Scalars['Boolean']; + includeName: Scalars['Boolean']['input']; }>; export type HeroNameConditionalInclusionQuery = { @@ -340,7 +340,7 @@ export type HeroNameConditionalInclusionQuery = { export type HeroNameConditionalExclusionQueryVariables = Exact<{ episode?: InputMaybe; - skipName: Scalars['Boolean']; + skipName: Scalars['Boolean']['input']; }>; export type HeroNameConditionalExclusionQuery = { diff --git a/dev-test/star-wars/types.excludeQueryBeta.ts b/dev-test/star-wars/types.excludeQueryBeta.ts index 6a346e64460..44cd86ce9e7 100644 --- a/dev-test/star-wars/types.excludeQueryBeta.ts +++ b/dev-test/star-wars/types.excludeQueryBeta.ts @@ -7,11 +7,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A character from the Star Wars universe */ @@ -23,22 +23,22 @@ export type Character = { /** The friends of the character exposed as a connection with edges */ friendsConnection: FriendsConnection; /** The ID of the character */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The name of the character */ - name: Scalars['String']; + name: Scalars['String']['output']; }; /** A character from the Star Wars universe */ export type CharacterFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** The input object sent when passing a color */ export type ColorInput = { - blue: Scalars['Int']; - green: Scalars['Int']; - red: Scalars['Int']; + blue: Scalars['Int']['input']; + green: Scalars['Int']['input']; + red: Scalars['Int']['input']; }; /** An autonomous mechanical character in the Star Wars universe */ @@ -51,17 +51,17 @@ export type Droid = Character & { /** The friends of the droid exposed as a connection with edges */ friendsConnection: FriendsConnection; /** The ID of the droid */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** What others call this droid */ - name: Scalars['String']; + name: Scalars['String']['output']; /** This droid's primary function */ - primaryFunction?: Maybe; + primaryFunction?: Maybe; }; /** An autonomous mechanical character in the Star Wars universe */ export type DroidFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** The episodes in the Star Wars trilogy */ @@ -84,14 +84,14 @@ export type FriendsConnection = { /** Information for paginating this connection */ pageInfo: PageInfo; /** The total number of friends */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge object for a character's friends */ export type FriendsEdge = { __typename?: 'FriendsEdge'; /** A cursor used for pagination */ - cursor: Scalars['ID']; + cursor: Scalars['ID']['output']; /** The character represented by this friendship edge */ node?: Maybe; }; @@ -106,23 +106,23 @@ export type Human = Character & { /** The friends of the human exposed as a connection with edges */ friendsConnection: FriendsConnection; /** Height in the preferred unit, default is meters */ - height?: Maybe; + height?: Maybe; /** The home planet of the human, or null if unknown */ - homePlanet?: Maybe; + homePlanet?: Maybe; /** The ID of the human */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** Mass in kilograms, or null if unknown */ - mass?: Maybe; + mass?: Maybe; /** What this human calls themselves */ - name: Scalars['String']; + name: Scalars['String']['output']; /** A list of starships this person has piloted, or an empty list if none */ starships?: Maybe>>; }; /** A humanoid creature from the Star Wars universe */ export type HumanFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** A humanoid creature from the Star Wars universe */ @@ -153,9 +153,9 @@ export type MutationCreateReviewArgs = { /** Information for paginating this connection */ export type PageInfo = { __typename?: 'PageInfo'; - endCursor?: Maybe; - hasNextPage: Scalars['Boolean']; - startCursor?: Maybe; + endCursor?: Maybe; + hasNextPage: Scalars['Boolean']['output']; + startCursor?: Maybe; }; /** The query type, represents all of the entry points into our object graph */ @@ -172,12 +172,12 @@ export type Query = { /** The query type, represents all of the entry points into our object graph */ export type QueryCharacterArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ export type QueryDroidArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ @@ -187,7 +187,7 @@ export type QueryHeroArgs = { /** The query type, represents all of the entry points into our object graph */ export type QueryHumanArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ @@ -197,31 +197,31 @@ export type QueryReviewsArgs = { /** The query type, represents all of the entry points into our object graph */ export type QuerySearchArgs = { - text?: InputMaybe; + text?: InputMaybe; }; /** The query type, represents all of the entry points into our object graph */ export type QueryStarshipArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** Represents a review for a movie */ export type Review = { __typename?: 'Review'; /** Comment about the movie */ - commentary?: Maybe; + commentary?: Maybe; /** The number of stars this review gave, 1-5 */ - stars: Scalars['Int']; + stars: Scalars['Int']['output']; }; /** The input object sent when someone is creating a new review */ export type ReviewInput = { /** Comment about the movie, optional */ - commentary?: InputMaybe; + commentary?: InputMaybe; /** Favorite color, optional */ favoriteColor?: InputMaybe; /** 0-5 stars */ - stars: Scalars['Int']; + stars: Scalars['Int']['input']; }; export type SearchResult = Droid | Human | Starship; @@ -229,11 +229,11 @@ export type SearchResult = Droid | Human | Starship; export type Starship = { __typename?: 'Starship'; /** The ID of the starship */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** Length of the starship, along the longest axis */ - length?: Maybe; + length?: Maybe; /** The name of the starship */ - name: Scalars['String']; + name: Scalars['String']['output']; }; export type StarshipLengthArgs = { @@ -330,7 +330,7 @@ export type HeroNameQuery = { export type HeroNameConditionalInclusionQueryVariables = Exact<{ episode?: InputMaybe; - includeName: Scalars['Boolean']; + includeName: Scalars['Boolean']['input']; }>; export type HeroNameConditionalInclusionQuery = { @@ -340,7 +340,7 @@ export type HeroNameConditionalInclusionQuery = { export type HeroNameConditionalExclusionQueryVariables = Exact<{ episode?: InputMaybe; - skipName: Scalars['Boolean']; + skipName: Scalars['Boolean']['input']; }>; export type HeroNameConditionalExclusionQuery = { diff --git a/dev-test/star-wars/types.globallyAvailable.d.ts b/dev-test/star-wars/types.globallyAvailable.d.ts index 48637e5d4bf..17c513699c1 100644 --- a/dev-test/star-wars/types.globallyAvailable.d.ts +++ b/dev-test/star-wars/types.globallyAvailable.d.ts @@ -7,11 +7,11 @@ type MakeEmpty = { [_ i 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 */ type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A character from the Star Wars universe */ @@ -23,22 +23,22 @@ type Character = { /** The friends of the character exposed as a connection with edges */ friendsConnection: FriendsConnection; /** The ID of the character */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The name of the character */ - name: Scalars['String']; + name: Scalars['String']['output']; }; /** A character from the Star Wars universe */ type CharacterFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** The input object sent when passing a color */ type ColorInput = { - blue: Scalars['Int']; - green: Scalars['Int']; - red: Scalars['Int']; + blue: Scalars['Int']['input']; + green: Scalars['Int']['input']; + red: Scalars['Int']['input']; }; /** An autonomous mechanical character in the Star Wars universe */ @@ -51,17 +51,17 @@ type Droid = Character & { /** The friends of the droid exposed as a connection with edges */ friendsConnection: FriendsConnection; /** The ID of the droid */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** What others call this droid */ - name: Scalars['String']; + name: Scalars['String']['output']; /** This droid's primary function */ - primaryFunction?: Maybe; + primaryFunction?: Maybe; }; /** An autonomous mechanical character in the Star Wars universe */ type DroidFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** The episodes in the Star Wars trilogy */ @@ -83,14 +83,14 @@ type FriendsConnection = { /** Information for paginating this connection */ pageInfo: PageInfo; /** The total number of friends */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge object for a character's friends */ type FriendsEdge = { __typename?: 'FriendsEdge'; /** A cursor used for pagination */ - cursor: Scalars['ID']; + cursor: Scalars['ID']['output']; /** The character represented by this friendship edge */ node?: Maybe; }; @@ -105,23 +105,23 @@ type Human = Character & { /** The friends of the human exposed as a connection with edges */ friendsConnection: FriendsConnection; /** Height in the preferred unit, default is meters */ - height?: Maybe; + height?: Maybe; /** The home planet of the human, or null if unknown */ - homePlanet?: Maybe; + homePlanet?: Maybe; /** The ID of the human */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** Mass in kilograms, or null if unknown */ - mass?: Maybe; + mass?: Maybe; /** What this human calls themselves */ - name: Scalars['String']; + name: Scalars['String']['output']; /** A list of starships this person has piloted, or an empty list if none */ starships?: Maybe>>; }; /** A humanoid creature from the Star Wars universe */ type HumanFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** A humanoid creature from the Star Wars universe */ @@ -151,9 +151,9 @@ type MutationCreateReviewArgs = { /** Information for paginating this connection */ type PageInfo = { __typename?: 'PageInfo'; - endCursor?: Maybe; - hasNextPage: Scalars['Boolean']; - startCursor?: Maybe; + endCursor?: Maybe; + hasNextPage: Scalars['Boolean']['output']; + startCursor?: Maybe; }; /** The query type, represents all of the entry points into our object graph */ @@ -170,12 +170,12 @@ type Query = { /** The query type, represents all of the entry points into our object graph */ type QueryCharacterArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ type QueryDroidArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ @@ -185,7 +185,7 @@ type QueryHeroArgs = { /** The query type, represents all of the entry points into our object graph */ type QueryHumanArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ @@ -195,31 +195,31 @@ type QueryReviewsArgs = { /** The query type, represents all of the entry points into our object graph */ type QuerySearchArgs = { - text?: InputMaybe; + text?: InputMaybe; }; /** The query type, represents all of the entry points into our object graph */ type QueryStarshipArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** Represents a review for a movie */ type Review = { __typename?: 'Review'; /** Comment about the movie */ - commentary?: Maybe; + commentary?: Maybe; /** The number of stars this review gave, 1-5 */ - stars: Scalars['Int']; + stars: Scalars['Int']['output']; }; /** The input object sent when someone is creating a new review */ type ReviewInput = { /** Comment about the movie, optional */ - commentary?: InputMaybe; + commentary?: InputMaybe; /** Favorite color, optional */ favoriteColor?: InputMaybe; /** 0-5 stars */ - stars: Scalars['Int']; + stars: Scalars['Int']['input']; }; type SearchResult = Droid | Human | Starship; @@ -227,11 +227,11 @@ type SearchResult = Droid | Human | Starship; type Starship = { __typename?: 'Starship'; /** The ID of the starship */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** Length of the starship, along the longest axis */ - length?: Maybe; + length?: Maybe; /** The name of the starship */ - name: Scalars['String']; + name: Scalars['String']['output']; }; type StarshipLengthArgs = { @@ -337,7 +337,7 @@ type HeroNameQuery = { type HeroNameConditionalInclusionQueryVariables = Exact<{ episode?: InputMaybe; - includeName: Scalars['Boolean']; + includeName: Scalars['Boolean']['input']; }>; type HeroNameConditionalInclusionQuery = { @@ -347,7 +347,7 @@ type HeroNameConditionalInclusionQuery = { type HeroNameConditionalExclusionQueryVariables = Exact<{ episode?: InputMaybe; - skipName: Scalars['Boolean']; + skipName: Scalars['Boolean']['input']; }>; type HeroNameConditionalExclusionQuery = { diff --git a/dev-test/star-wars/types.immutableTypes.ts b/dev-test/star-wars/types.immutableTypes.ts index 8bed5b77103..d05e295a233 100644 --- a/dev-test/star-wars/types.immutableTypes.ts +++ b/dev-test/star-wars/types.immutableTypes.ts @@ -7,11 +7,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A character from the Star Wars universe */ @@ -23,22 +23,22 @@ export type Character = { /** The friends of the character exposed as a connection with edges */ readonly friendsConnection: FriendsConnection; /** The ID of the character */ - readonly id: Scalars['ID']; + readonly id: Scalars['ID']['output']; /** The name of the character */ - readonly name: Scalars['String']; + readonly name: Scalars['String']['output']; }; /** A character from the Star Wars universe */ export type CharacterFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** The input object sent when passing a color */ export type ColorInput = { - readonly blue: Scalars['Int']; - readonly green: Scalars['Int']; - readonly red: Scalars['Int']; + readonly blue: Scalars['Int']['input']; + readonly green: Scalars['Int']['input']; + readonly red: Scalars['Int']['input']; }; /** An autonomous mechanical character in the Star Wars universe */ @@ -51,17 +51,17 @@ export type Droid = Character & { /** The friends of the droid exposed as a connection with edges */ readonly friendsConnection: FriendsConnection; /** The ID of the droid */ - readonly id: Scalars['ID']; + readonly id: Scalars['ID']['output']; /** What others call this droid */ - readonly name: Scalars['String']; + readonly name: Scalars['String']['output']; /** This droid's primary function */ - readonly primaryFunction?: Maybe; + readonly primaryFunction?: Maybe; }; /** An autonomous mechanical character in the Star Wars universe */ export type DroidFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** The episodes in the Star Wars trilogy */ @@ -84,14 +84,14 @@ export type FriendsConnection = { /** Information for paginating this connection */ readonly pageInfo: PageInfo; /** The total number of friends */ - readonly totalCount?: Maybe; + readonly totalCount?: Maybe; }; /** An edge object for a character's friends */ export type FriendsEdge = { readonly __typename?: 'FriendsEdge'; /** A cursor used for pagination */ - readonly cursor: Scalars['ID']; + readonly cursor: Scalars['ID']['output']; /** The character represented by this friendship edge */ readonly node?: Maybe; }; @@ -106,23 +106,23 @@ export type Human = Character & { /** The friends of the human exposed as a connection with edges */ readonly friendsConnection: FriendsConnection; /** Height in the preferred unit, default is meters */ - readonly height?: Maybe; + readonly height?: Maybe; /** The home planet of the human, or null if unknown */ - readonly homePlanet?: Maybe; + readonly homePlanet?: Maybe; /** The ID of the human */ - readonly id: Scalars['ID']; + readonly id: Scalars['ID']['output']; /** Mass in kilograms, or null if unknown */ - readonly mass?: Maybe; + readonly mass?: Maybe; /** What this human calls themselves */ - readonly name: Scalars['String']; + readonly name: Scalars['String']['output']; /** A list of starships this person has piloted, or an empty list if none */ readonly starships?: Maybe>>; }; /** A humanoid creature from the Star Wars universe */ export type HumanFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** A humanoid creature from the Star Wars universe */ @@ -153,9 +153,9 @@ export type MutationCreateReviewArgs = { /** Information for paginating this connection */ export type PageInfo = { readonly __typename?: 'PageInfo'; - readonly endCursor?: Maybe; - readonly hasNextPage: Scalars['Boolean']; - readonly startCursor?: Maybe; + readonly endCursor?: Maybe; + readonly hasNextPage: Scalars['Boolean']['output']; + readonly startCursor?: Maybe; }; /** The query type, represents all of the entry points into our object graph */ @@ -172,12 +172,12 @@ export type Query = { /** The query type, represents all of the entry points into our object graph */ export type QueryCharacterArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ export type QueryDroidArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ @@ -187,7 +187,7 @@ export type QueryHeroArgs = { /** The query type, represents all of the entry points into our object graph */ export type QueryHumanArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ @@ -197,31 +197,31 @@ export type QueryReviewsArgs = { /** The query type, represents all of the entry points into our object graph */ export type QuerySearchArgs = { - text?: InputMaybe; + text?: InputMaybe; }; /** The query type, represents all of the entry points into our object graph */ export type QueryStarshipArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** Represents a review for a movie */ export type Review = { readonly __typename?: 'Review'; /** Comment about the movie */ - readonly commentary?: Maybe; + readonly commentary?: Maybe; /** The number of stars this review gave, 1-5 */ - readonly stars: Scalars['Int']; + readonly stars: Scalars['Int']['output']; }; /** The input object sent when someone is creating a new review */ export type ReviewInput = { /** Comment about the movie, optional */ - readonly commentary?: InputMaybe; + readonly commentary?: InputMaybe; /** Favorite color, optional */ readonly favoriteColor?: InputMaybe; /** 0-5 stars */ - readonly stars: Scalars['Int']; + readonly stars: Scalars['Int']['input']; }; export type SearchResult = Droid | Human | Starship; @@ -229,11 +229,11 @@ export type SearchResult = Droid | Human | Starship; export type Starship = { readonly __typename?: 'Starship'; /** The ID of the starship */ - readonly id: Scalars['ID']; + readonly id: Scalars['ID']['output']; /** Length of the starship, along the longest axis */ - readonly length?: Maybe; + readonly length?: Maybe; /** The name of the starship */ - readonly name: Scalars['String']; + readonly name: Scalars['String']['output']; }; export type StarshipLengthArgs = { @@ -368,7 +368,7 @@ export type HeroNameQuery = { export type HeroNameConditionalInclusionQueryVariables = Exact<{ episode?: InputMaybe; - includeName: Scalars['Boolean']; + includeName: Scalars['Boolean']['input']; }>; export type HeroNameConditionalInclusionQuery = { @@ -381,7 +381,7 @@ export type HeroNameConditionalInclusionQuery = { export type HeroNameConditionalExclusionQueryVariables = Exact<{ episode?: InputMaybe; - skipName: Scalars['Boolean']; + skipName: Scalars['Boolean']['input']; }>; export type HeroNameConditionalExclusionQuery = { diff --git a/dev-test/star-wars/types.preResolveTypes.onlyOperationTypes.ts b/dev-test/star-wars/types.preResolveTypes.onlyOperationTypes.ts index 6a1495d94c0..5db843a2cf6 100644 --- a/dev-test/star-wars/types.preResolveTypes.onlyOperationTypes.ts +++ b/dev-test/star-wars/types.preResolveTypes.onlyOperationTypes.ts @@ -7,18 +7,18 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** The input object sent when passing a color */ export type ColorInput = { - blue: Scalars['Int']; - green: Scalars['Int']; - red: Scalars['Int']; + blue: Scalars['Int']['input']; + green: Scalars['Int']['input']; + red: Scalars['Int']['input']; }; /** The episodes in the Star Wars trilogy */ @@ -42,11 +42,11 @@ export enum LengthUnit { /** The input object sent when someone is creating a new review */ export type ReviewInput = { /** Comment about the movie, optional */ - commentary?: InputMaybe; + commentary?: InputMaybe; /** Favorite color, optional */ favoriteColor?: InputMaybe; /** 0-5 stars */ - stars: Scalars['Int']; + stars: Scalars['Int']['input']; }; export type CreateReviewForEpisodeMutationVariables = Exact<{ @@ -148,7 +148,7 @@ export type HeroNameQuery = { export type HeroNameConditionalInclusionQueryVariables = Exact<{ episode?: InputMaybe; - includeName: Scalars['Boolean']; + includeName: Scalars['Boolean']['input']; }>; export type HeroNameConditionalInclusionQuery = { @@ -158,7 +158,7 @@ export type HeroNameConditionalInclusionQuery = { export type HeroNameConditionalExclusionQueryVariables = Exact<{ episode?: InputMaybe; - skipName: Scalars['Boolean']; + skipName: Scalars['Boolean']['input']; }>; export type HeroNameConditionalExclusionQuery = { diff --git a/dev-test/star-wars/types.preResolveTypes.ts b/dev-test/star-wars/types.preResolveTypes.ts index b9821b8b422..b375f71575b 100644 --- a/dev-test/star-wars/types.preResolveTypes.ts +++ b/dev-test/star-wars/types.preResolveTypes.ts @@ -7,11 +7,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A character from the Star Wars universe */ @@ -23,22 +23,22 @@ export type Character = { /** The friends of the character exposed as a connection with edges */ friendsConnection: FriendsConnection; /** The ID of the character */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The name of the character */ - name: Scalars['String']; + name: Scalars['String']['output']; }; /** A character from the Star Wars universe */ export type CharacterFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** The input object sent when passing a color */ export type ColorInput = { - blue: Scalars['Int']; - green: Scalars['Int']; - red: Scalars['Int']; + blue: Scalars['Int']['input']; + green: Scalars['Int']['input']; + red: Scalars['Int']['input']; }; /** An autonomous mechanical character in the Star Wars universe */ @@ -51,17 +51,17 @@ export type Droid = Character & { /** The friends of the droid exposed as a connection with edges */ friendsConnection: FriendsConnection; /** The ID of the droid */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** What others call this droid */ - name: Scalars['String']; + name: Scalars['String']['output']; /** This droid's primary function */ - primaryFunction?: Maybe; + primaryFunction?: Maybe; }; /** An autonomous mechanical character in the Star Wars universe */ export type DroidFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** The episodes in the Star Wars trilogy */ @@ -84,14 +84,14 @@ export type FriendsConnection = { /** Information for paginating this connection */ pageInfo: PageInfo; /** The total number of friends */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge object for a character's friends */ export type FriendsEdge = { __typename?: 'FriendsEdge'; /** A cursor used for pagination */ - cursor: Scalars['ID']; + cursor: Scalars['ID']['output']; /** The character represented by this friendship edge */ node?: Maybe; }; @@ -106,23 +106,23 @@ export type Human = Character & { /** The friends of the human exposed as a connection with edges */ friendsConnection: FriendsConnection; /** Height in the preferred unit, default is meters */ - height?: Maybe; + height?: Maybe; /** The home planet of the human, or null if unknown */ - homePlanet?: Maybe; + homePlanet?: Maybe; /** The ID of the human */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** Mass in kilograms, or null if unknown */ - mass?: Maybe; + mass?: Maybe; /** What this human calls themselves */ - name: Scalars['String']; + name: Scalars['String']['output']; /** A list of starships this person has piloted, or an empty list if none */ starships?: Maybe>>; }; /** A humanoid creature from the Star Wars universe */ export type HumanFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** A humanoid creature from the Star Wars universe */ @@ -153,9 +153,9 @@ export type MutationCreateReviewArgs = { /** Information for paginating this connection */ export type PageInfo = { __typename?: 'PageInfo'; - endCursor?: Maybe; - hasNextPage: Scalars['Boolean']; - startCursor?: Maybe; + endCursor?: Maybe; + hasNextPage: Scalars['Boolean']['output']; + startCursor?: Maybe; }; /** The query type, represents all of the entry points into our object graph */ @@ -172,12 +172,12 @@ export type Query = { /** The query type, represents all of the entry points into our object graph */ export type QueryCharacterArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ export type QueryDroidArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ @@ -187,7 +187,7 @@ export type QueryHeroArgs = { /** The query type, represents all of the entry points into our object graph */ export type QueryHumanArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ @@ -197,31 +197,31 @@ export type QueryReviewsArgs = { /** The query type, represents all of the entry points into our object graph */ export type QuerySearchArgs = { - text?: InputMaybe; + text?: InputMaybe; }; /** The query type, represents all of the entry points into our object graph */ export type QueryStarshipArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** Represents a review for a movie */ export type Review = { __typename?: 'Review'; /** Comment about the movie */ - commentary?: Maybe; + commentary?: Maybe; /** The number of stars this review gave, 1-5 */ - stars: Scalars['Int']; + stars: Scalars['Int']['output']; }; /** The input object sent when someone is creating a new review */ export type ReviewInput = { /** Comment about the movie, optional */ - commentary?: InputMaybe; + commentary?: InputMaybe; /** Favorite color, optional */ favoriteColor?: InputMaybe; /** 0-5 stars */ - stars: Scalars['Int']; + stars: Scalars['Int']['input']; }; export type SearchResult = Droid | Human | Starship; @@ -229,11 +229,11 @@ export type SearchResult = Droid | Human | Starship; export type Starship = { __typename?: 'Starship'; /** The ID of the starship */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** Length of the starship, along the longest axis */ - length?: Maybe; + length?: Maybe; /** The name of the starship */ - name: Scalars['String']; + name: Scalars['String']['output']; }; export type StarshipLengthArgs = { @@ -339,7 +339,7 @@ export type HeroNameQuery = { export type HeroNameConditionalInclusionQueryVariables = Exact<{ episode?: InputMaybe; - includeName: Scalars['Boolean']; + includeName: Scalars['Boolean']['input']; }>; export type HeroNameConditionalInclusionQuery = { @@ -349,7 +349,7 @@ export type HeroNameConditionalInclusionQuery = { export type HeroNameConditionalExclusionQueryVariables = Exact<{ episode?: InputMaybe; - skipName: Scalars['Boolean']; + skipName: Scalars['Boolean']['input']; }>; export type HeroNameConditionalExclusionQuery = { diff --git a/dev-test/star-wars/types.skipSchema.ts b/dev-test/star-wars/types.skipSchema.ts index b9821b8b422..b375f71575b 100644 --- a/dev-test/star-wars/types.skipSchema.ts +++ b/dev-test/star-wars/types.skipSchema.ts @@ -7,11 +7,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A character from the Star Wars universe */ @@ -23,22 +23,22 @@ export type Character = { /** The friends of the character exposed as a connection with edges */ friendsConnection: FriendsConnection; /** The ID of the character */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The name of the character */ - name: Scalars['String']; + name: Scalars['String']['output']; }; /** A character from the Star Wars universe */ export type CharacterFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** The input object sent when passing a color */ export type ColorInput = { - blue: Scalars['Int']; - green: Scalars['Int']; - red: Scalars['Int']; + blue: Scalars['Int']['input']; + green: Scalars['Int']['input']; + red: Scalars['Int']['input']; }; /** An autonomous mechanical character in the Star Wars universe */ @@ -51,17 +51,17 @@ export type Droid = Character & { /** The friends of the droid exposed as a connection with edges */ friendsConnection: FriendsConnection; /** The ID of the droid */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** What others call this droid */ - name: Scalars['String']; + name: Scalars['String']['output']; /** This droid's primary function */ - primaryFunction?: Maybe; + primaryFunction?: Maybe; }; /** An autonomous mechanical character in the Star Wars universe */ export type DroidFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** The episodes in the Star Wars trilogy */ @@ -84,14 +84,14 @@ export type FriendsConnection = { /** Information for paginating this connection */ pageInfo: PageInfo; /** The total number of friends */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge object for a character's friends */ export type FriendsEdge = { __typename?: 'FriendsEdge'; /** A cursor used for pagination */ - cursor: Scalars['ID']; + cursor: Scalars['ID']['output']; /** The character represented by this friendship edge */ node?: Maybe; }; @@ -106,23 +106,23 @@ export type Human = Character & { /** The friends of the human exposed as a connection with edges */ friendsConnection: FriendsConnection; /** Height in the preferred unit, default is meters */ - height?: Maybe; + height?: Maybe; /** The home planet of the human, or null if unknown */ - homePlanet?: Maybe; + homePlanet?: Maybe; /** The ID of the human */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** Mass in kilograms, or null if unknown */ - mass?: Maybe; + mass?: Maybe; /** What this human calls themselves */ - name: Scalars['String']; + name: Scalars['String']['output']; /** A list of starships this person has piloted, or an empty list if none */ starships?: Maybe>>; }; /** A humanoid creature from the Star Wars universe */ export type HumanFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** A humanoid creature from the Star Wars universe */ @@ -153,9 +153,9 @@ export type MutationCreateReviewArgs = { /** Information for paginating this connection */ export type PageInfo = { __typename?: 'PageInfo'; - endCursor?: Maybe; - hasNextPage: Scalars['Boolean']; - startCursor?: Maybe; + endCursor?: Maybe; + hasNextPage: Scalars['Boolean']['output']; + startCursor?: Maybe; }; /** The query type, represents all of the entry points into our object graph */ @@ -172,12 +172,12 @@ export type Query = { /** The query type, represents all of the entry points into our object graph */ export type QueryCharacterArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ export type QueryDroidArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ @@ -187,7 +187,7 @@ export type QueryHeroArgs = { /** The query type, represents all of the entry points into our object graph */ export type QueryHumanArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ @@ -197,31 +197,31 @@ export type QueryReviewsArgs = { /** The query type, represents all of the entry points into our object graph */ export type QuerySearchArgs = { - text?: InputMaybe; + text?: InputMaybe; }; /** The query type, represents all of the entry points into our object graph */ export type QueryStarshipArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** Represents a review for a movie */ export type Review = { __typename?: 'Review'; /** Comment about the movie */ - commentary?: Maybe; + commentary?: Maybe; /** The number of stars this review gave, 1-5 */ - stars: Scalars['Int']; + stars: Scalars['Int']['output']; }; /** The input object sent when someone is creating a new review */ export type ReviewInput = { /** Comment about the movie, optional */ - commentary?: InputMaybe; + commentary?: InputMaybe; /** Favorite color, optional */ favoriteColor?: InputMaybe; /** 0-5 stars */ - stars: Scalars['Int']; + stars: Scalars['Int']['input']; }; export type SearchResult = Droid | Human | Starship; @@ -229,11 +229,11 @@ export type SearchResult = Droid | Human | Starship; export type Starship = { __typename?: 'Starship'; /** The ID of the starship */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** Length of the starship, along the longest axis */ - length?: Maybe; + length?: Maybe; /** The name of the starship */ - name: Scalars['String']; + name: Scalars['String']['output']; }; export type StarshipLengthArgs = { @@ -339,7 +339,7 @@ export type HeroNameQuery = { export type HeroNameConditionalInclusionQueryVariables = Exact<{ episode?: InputMaybe; - includeName: Scalars['Boolean']; + includeName: Scalars['Boolean']['input']; }>; export type HeroNameConditionalInclusionQuery = { @@ -349,7 +349,7 @@ export type HeroNameConditionalInclusionQuery = { export type HeroNameConditionalExclusionQueryVariables = Exact<{ episode?: InputMaybe; - skipName: Scalars['Boolean']; + skipName: Scalars['Boolean']['input']; }>; export type HeroNameConditionalExclusionQuery = { diff --git a/dev-test/star-wars/types.ts b/dev-test/star-wars/types.ts index b9821b8b422..b375f71575b 100644 --- a/dev-test/star-wars/types.ts +++ b/dev-test/star-wars/types.ts @@ -7,11 +7,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A character from the Star Wars universe */ @@ -23,22 +23,22 @@ export type Character = { /** The friends of the character exposed as a connection with edges */ friendsConnection: FriendsConnection; /** The ID of the character */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The name of the character */ - name: Scalars['String']; + name: Scalars['String']['output']; }; /** A character from the Star Wars universe */ export type CharacterFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** The input object sent when passing a color */ export type ColorInput = { - blue: Scalars['Int']; - green: Scalars['Int']; - red: Scalars['Int']; + blue: Scalars['Int']['input']; + green: Scalars['Int']['input']; + red: Scalars['Int']['input']; }; /** An autonomous mechanical character in the Star Wars universe */ @@ -51,17 +51,17 @@ export type Droid = Character & { /** The friends of the droid exposed as a connection with edges */ friendsConnection: FriendsConnection; /** The ID of the droid */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** What others call this droid */ - name: Scalars['String']; + name: Scalars['String']['output']; /** This droid's primary function */ - primaryFunction?: Maybe; + primaryFunction?: Maybe; }; /** An autonomous mechanical character in the Star Wars universe */ export type DroidFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** The episodes in the Star Wars trilogy */ @@ -84,14 +84,14 @@ export type FriendsConnection = { /** Information for paginating this connection */ pageInfo: PageInfo; /** The total number of friends */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge object for a character's friends */ export type FriendsEdge = { __typename?: 'FriendsEdge'; /** A cursor used for pagination */ - cursor: Scalars['ID']; + cursor: Scalars['ID']['output']; /** The character represented by this friendship edge */ node?: Maybe; }; @@ -106,23 +106,23 @@ export type Human = Character & { /** The friends of the human exposed as a connection with edges */ friendsConnection: FriendsConnection; /** Height in the preferred unit, default is meters */ - height?: Maybe; + height?: Maybe; /** The home planet of the human, or null if unknown */ - homePlanet?: Maybe; + homePlanet?: Maybe; /** The ID of the human */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** Mass in kilograms, or null if unknown */ - mass?: Maybe; + mass?: Maybe; /** What this human calls themselves */ - name: Scalars['String']; + name: Scalars['String']['output']; /** A list of starships this person has piloted, or an empty list if none */ starships?: Maybe>>; }; /** A humanoid creature from the Star Wars universe */ export type HumanFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; + after?: InputMaybe; + first?: InputMaybe; }; /** A humanoid creature from the Star Wars universe */ @@ -153,9 +153,9 @@ export type MutationCreateReviewArgs = { /** Information for paginating this connection */ export type PageInfo = { __typename?: 'PageInfo'; - endCursor?: Maybe; - hasNextPage: Scalars['Boolean']; - startCursor?: Maybe; + endCursor?: Maybe; + hasNextPage: Scalars['Boolean']['output']; + startCursor?: Maybe; }; /** The query type, represents all of the entry points into our object graph */ @@ -172,12 +172,12 @@ export type Query = { /** The query type, represents all of the entry points into our object graph */ export type QueryCharacterArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ export type QueryDroidArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ @@ -187,7 +187,7 @@ export type QueryHeroArgs = { /** The query type, represents all of the entry points into our object graph */ export type QueryHumanArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** The query type, represents all of the entry points into our object graph */ @@ -197,31 +197,31 @@ export type QueryReviewsArgs = { /** The query type, represents all of the entry points into our object graph */ export type QuerySearchArgs = { - text?: InputMaybe; + text?: InputMaybe; }; /** The query type, represents all of the entry points into our object graph */ export type QueryStarshipArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; /** Represents a review for a movie */ export type Review = { __typename?: 'Review'; /** Comment about the movie */ - commentary?: Maybe; + commentary?: Maybe; /** The number of stars this review gave, 1-5 */ - stars: Scalars['Int']; + stars: Scalars['Int']['output']; }; /** The input object sent when someone is creating a new review */ export type ReviewInput = { /** Comment about the movie, optional */ - commentary?: InputMaybe; + commentary?: InputMaybe; /** Favorite color, optional */ favoriteColor?: InputMaybe; /** 0-5 stars */ - stars: Scalars['Int']; + stars: Scalars['Int']['input']; }; export type SearchResult = Droid | Human | Starship; @@ -229,11 +229,11 @@ export type SearchResult = Droid | Human | Starship; export type Starship = { __typename?: 'Starship'; /** The ID of the starship */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** Length of the starship, along the longest axis */ - length?: Maybe; + length?: Maybe; /** The name of the starship */ - name: Scalars['String']; + name: Scalars['String']['output']; }; export type StarshipLengthArgs = { @@ -339,7 +339,7 @@ export type HeroNameQuery = { export type HeroNameConditionalInclusionQueryVariables = Exact<{ episode?: InputMaybe; - includeName: Scalars['Boolean']; + includeName: Scalars['Boolean']['input']; }>; export type HeroNameConditionalInclusionQuery = { @@ -349,7 +349,7 @@ export type HeroNameConditionalInclusionQuery = { export type HeroNameConditionalExclusionQueryVariables = Exact<{ episode?: InputMaybe; - skipName: Scalars['Boolean']; + skipName: Scalars['Boolean']['input']; }>; export type HeroNameConditionalExclusionQuery = { diff --git a/dev-test/test-schema/env.types.ts b/dev-test/test-schema/env.types.ts index d10823f189d..ed24257b957 100644 --- a/dev-test/test-schema/env.types.ts +++ b/dev-test/test-schema/env.types.ts @@ -7,11 +7,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; export type Query = { @@ -21,20 +21,20 @@ export type Query = { * Generates a new answer for th * guessing game */ - answer: Array; - testArr1?: Maybe>>; - testArr2: Array>; - testArr3: Array; + answer: Array; + testArr1?: Maybe>>; + testArr2: Array>; + testArr3: Array; userById?: Maybe; }; export type QueryUserByIdArgs = { - id: Scalars['Int']; + id: Scalars['Int']['input']; }; export type User = { __typename?: 'User'; - email: Scalars['String']; - id: Scalars['Int']; - name: Scalars['String']; + email: Scalars['String']['output']; + id: Scalars['Int']['output']; + name: Scalars['String']['output']; }; diff --git a/dev-test/test-schema/resolvers-federation.ts b/dev-test/test-schema/resolvers-federation.ts index 256d3146f9d..5dff237b8fb 100644 --- a/dev-test/test-schema/resolvers-federation.ts +++ b/dev-test/test-schema/resolvers-federation.ts @@ -8,30 +8,30 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; - _FieldSet: any; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; + _FieldSet: { input: any; output: any }; }; export type Address = { __typename?: 'Address'; - city?: Maybe; + city?: Maybe; lines: Lines; - state?: Maybe; + state?: Maybe; }; export type Book = { __typename?: 'Book'; - id: Scalars['ID']; + id: Scalars['ID']['output']; }; export type Lines = { __typename?: 'Lines'; - line1: Scalars['String']; - line2?: Maybe; + line1: Scalars['String']['output']; + line2?: Maybe; }; export type Query = { @@ -42,9 +42,9 @@ export type Query = { export type User = { __typename?: 'User'; address?: Maybe
; - email: Scalars['String']; - id: Scalars['Int']; - name: Scalars['String']; + email: Scalars['String']['output']; + id: Scalars['Int']['output']; + name: Scalars['String']['output']; }; export type ResolverTypeWrapper = Promise | T; @@ -131,27 +131,27 @@ export type DirectiveResolverFn; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; Book: ResolverTypeWrapper; - ID: ResolverTypeWrapper; + ID: ResolverTypeWrapper; Lines: ResolverTypeWrapper; Query: ResolverTypeWrapper<{}>; User: ResolverTypeWrapper; - Int: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; + Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; }; /** Mapping between all available schema types and the resolvers parents */ export type ResolversParentTypes = { Address: Address; - String: Scalars['String']; + String: Scalars['String']['output']; Book: Book; - ID: Scalars['ID']; + ID: Scalars['ID']['output']; Lines: Lines; Query: {}; User: User; - Int: Scalars['Int']; - Boolean: Scalars['Boolean']; + Int: Scalars['Int']['output']; + Boolean: Scalars['Boolean']['output']; }; export type AddressResolvers< diff --git a/dev-test/test-schema/resolvers-root.ts b/dev-test/test-schema/resolvers-root.ts index 6d0f385db1d..3c59b544755 100644 --- a/dev-test/test-schema/resolvers-root.ts +++ b/dev-test/test-schema/resolvers-root.ts @@ -9,27 +9,27 @@ export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | export type RequireFields = Omit & { [P in K]-?: NonNullable }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; export type Query = { __typename?: 'Query'; - someDummyField: Scalars['Int']; + someDummyField: Scalars['Int']['output']; }; export type QueryRoot = { __typename?: 'QueryRoot'; allUsers: Array>; - answer: Array; + answer: Array; userById?: Maybe; }; export type QueryRootUserByIdArgs = { - id: Scalars['Int']; + id: Scalars['Int']['input']; }; export type SubscriptionRoot = { @@ -39,9 +39,9 @@ export type SubscriptionRoot = { export type User = { __typename?: 'User'; - email: Scalars['String']; - id: Scalars['Int']; - name: Scalars['String']; + email: Scalars['String']['output']; + id: Scalars['Int']['output']; + name: Scalars['String']['output']; }; export type ResolverTypeWrapper = Promise | T; @@ -116,22 +116,22 @@ export type DirectiveResolverFn; - Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; + Int: ResolverTypeWrapper; Query: ResolverTypeWrapper; QueryRoot: ResolverTypeWrapper<{}>; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; SubscriptionRoot: ResolverTypeWrapper<{}>; User: ResolverTypeWrapper; }; /** Mapping between all available schema types and the resolvers parents */ export type ResolversParentTypes = { - Boolean: Scalars['Boolean']; - Int: Scalars['Int']; + Boolean: Scalars['Boolean']['output']; + Int: Scalars['Int']['output']; Query: Query; QueryRoot: {}; - String: Scalars['String']; + String: Scalars['String']['output']; SubscriptionRoot: {}; User: User; }; diff --git a/dev-test/test-schema/resolvers-stitching.ts b/dev-test/test-schema/resolvers-stitching.ts index fd588e89449..d312d4982c5 100644 --- a/dev-test/test-schema/resolvers-stitching.ts +++ b/dev-test/test-schema/resolvers-stitching.ts @@ -9,11 +9,11 @@ export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | export type RequireFields = Omit & { [P in K]-?: NonNullable }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; export type Query = { @@ -23,22 +23,22 @@ export type Query = { * Generates a new answer for th * guessing game */ - answer: Array; - testArr1?: Maybe>>; - testArr2: Array>; - testArr3: Array; + answer: Array; + testArr1?: Maybe>>; + testArr2: Array>; + testArr3: Array; userById?: Maybe; }; export type QueryUserByIdArgs = { - id: Scalars['Int']; + id: Scalars['Int']['input']; }; export type User = { __typename?: 'User'; - email: Scalars['String']; - id: Scalars['Int']; - name: Scalars['String']; + email: Scalars['String']['output']; + id: Scalars['Int']['output']; + name: Scalars['String']['output']; }; export type ResolverTypeWrapper = Promise | T; @@ -127,19 +127,19 @@ export type DirectiveResolverFn; - Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; + Int: ResolverTypeWrapper; Query: ResolverTypeWrapper<{}>; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; User: ResolverTypeWrapper; }; /** Mapping between all available schema types and the resolvers parents */ export type ResolversParentTypes = { - Boolean: Scalars['Boolean']; - Int: Scalars['Int']; + Boolean: Scalars['Boolean']['output']; + Int: Scalars['Int']['output']; Query: {}; - String: Scalars['String']; + String: Scalars['String']['output']; User: User; }; diff --git a/dev-test/test-schema/resolvers-types.ts b/dev-test/test-schema/resolvers-types.ts index 4e1754d6976..4fd6f9fca4d 100644 --- a/dev-test/test-schema/resolvers-types.ts +++ b/dev-test/test-schema/resolvers-types.ts @@ -9,11 +9,11 @@ export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | export type RequireFields = Omit & { [P in K]-?: NonNullable }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; export type Query = { @@ -23,22 +23,22 @@ export type Query = { * Generates a new answer for th * guessing game */ - answer: Array; - testArr1?: Maybe>>; - testArr2: Array>; - testArr3: Array; + answer: Array; + testArr1?: Maybe>>; + testArr2: Array>; + testArr3: Array; userById?: Maybe; }; export type QueryUserByIdArgs = { - id: Scalars['Int']; + id: Scalars['Int']['input']; }; export type User = { __typename?: 'User'; - email: Scalars['String']; - id: Scalars['Int']; - name: Scalars['String']; + email: Scalars['String']['output']; + id: Scalars['Int']['output']; + name: Scalars['String']['output']; }; export type ResolverTypeWrapper = Promise | T; @@ -113,19 +113,19 @@ export type DirectiveResolverFn; - Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; + Int: ResolverTypeWrapper; Query: ResolverTypeWrapper<{}>; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; User: ResolverTypeWrapper; }; /** Mapping between all available schema types and the resolvers parents */ export type ResolversParentTypes = { - Boolean: Scalars['Boolean']; - Int: Scalars['Int']; + Boolean: Scalars['Boolean']['output']; + Int: Scalars['Int']['output']; Query: {}; - String: Scalars['String']; + String: Scalars['String']['output']; User: User; }; diff --git a/dev-test/test-schema/types.preResolveTypes.onlyOperationTypes.ts b/dev-test/test-schema/types.preResolveTypes.onlyOperationTypes.ts index e8f4b62fbb0..0491645185e 100644 --- a/dev-test/test-schema/types.preResolveTypes.onlyOperationTypes.ts +++ b/dev-test/test-schema/types.preResolveTypes.onlyOperationTypes.ts @@ -7,11 +7,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; export type TestQueryVariables = Exact<{ [key: string]: never }>; diff --git a/dev-test/test-schema/types.preResolveTypes.ts b/dev-test/test-schema/types.preResolveTypes.ts index 78e0a4e4705..ce938578b61 100644 --- a/dev-test/test-schema/types.preResolveTypes.ts +++ b/dev-test/test-schema/types.preResolveTypes.ts @@ -7,11 +7,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; export type Query = { @@ -21,22 +21,22 @@ export type Query = { * Generates a new answer for th * guessing game */ - answer: Array; - testArr1?: Maybe>>; - testArr2: Array>; - testArr3: Array; + answer: Array; + testArr1?: Maybe>>; + testArr2: Array>; + testArr3: Array; userById?: Maybe; }; export type QueryUserByIdArgs = { - id: Scalars['Int']; + id: Scalars['Int']['input']; }; export type User = { __typename?: 'User'; - email: Scalars['String']; - id: Scalars['Int']; - name: Scalars['String']; + email: Scalars['String']['output']; + id: Scalars['Int']['output']; + name: Scalars['String']['output']; }; export type TestQueryVariables = Exact<{ [key: string]: never }>; diff --git a/dev-test/test-schema/typings.avoidOptionals.ts b/dev-test/test-schema/typings.avoidOptionals.ts index 39eb13a5346..008269cb61d 100644 --- a/dev-test/test-schema/typings.avoidOptionals.ts +++ b/dev-test/test-schema/typings.avoidOptionals.ts @@ -7,11 +7,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; export type Query = { @@ -21,12 +21,12 @@ export type Query = { }; export type QueryUserByIdArgs = { - id: Scalars['Int']; + id: Scalars['Int']['input']; }; export type User = { __typename?: 'User'; - email: Scalars['String']; - id: Scalars['Int']; - name: Scalars['String']; + email: Scalars['String']['output']; + id: Scalars['Int']['output']; + name: Scalars['String']['output']; }; diff --git a/dev-test/test-schema/typings.enum.ts b/dev-test/test-schema/typings.enum.ts index c4f33e44bcb..676c3ed87a0 100644 --- a/dev-test/test-schema/typings.enum.ts +++ b/dev-test/test-schema/typings.enum.ts @@ -7,11 +7,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; export enum Foo { diff --git a/dev-test/test-schema/typings.immutableTypes.ts b/dev-test/test-schema/typings.immutableTypes.ts index 68de80f79df..ef1938a114d 100644 --- a/dev-test/test-schema/typings.immutableTypes.ts +++ b/dev-test/test-schema/typings.immutableTypes.ts @@ -7,11 +7,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; export type Query = { @@ -21,12 +21,12 @@ export type Query = { }; export type QueryUserByIdArgs = { - id: Scalars['Int']; + id: Scalars['Int']['input']; }; export type User = { __typename?: 'User'; - email: Scalars['String']; - id: Scalars['Int']; - name: Scalars['String']; + email: Scalars['String']['output']; + id: Scalars['Int']['output']; + name: Scalars['String']['output']; }; diff --git a/dev-test/test-schema/typings.ts b/dev-test/test-schema/typings.ts index 6f5eed9dc47..74c936a8484 100644 --- a/dev-test/test-schema/typings.ts +++ b/dev-test/test-schema/typings.ts @@ -9,11 +9,11 @@ export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | export type RequireFields = Omit & { [P in K]-?: NonNullable }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; export type Query = { @@ -23,14 +23,14 @@ export type Query = { }; export type QueryUserByIdArgs = { - id: Scalars['Int']; + id: Scalars['Int']['input']; }; export type User = { __typename?: 'User'; - email: Scalars['String']; - id: Scalars['Int']; - name: Scalars['String']; + email: Scalars['String']['output']; + id: Scalars['Int']['output']; + name: Scalars['String']['output']; }; export type ResolverTypeWrapper = Promise | T; @@ -105,19 +105,19 @@ export type DirectiveResolverFn; - Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; + Int: ResolverTypeWrapper; Query: ResolverTypeWrapper<{}>; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; User: ResolverTypeWrapper; }; /** Mapping between all available schema types and the resolvers parents */ export type ResolversParentTypes = { - Boolean: Scalars['Boolean']; - Int: Scalars['Int']; + Boolean: Scalars['Boolean']['output']; + Int: Scalars['Int']['output']; Query: {}; - String: Scalars['String']; + String: Scalars['String']['output']; User: User; }; diff --git a/dev-test/test-schema/typings.wrapped.ts b/dev-test/test-schema/typings.wrapped.ts index 67ef1c7b161..402545ac2da 100644 --- a/dev-test/test-schema/typings.wrapped.ts +++ b/dev-test/test-schema/typings.wrapped.ts @@ -8,11 +8,11 @@ declare namespace GraphQL { 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; export type Query = { @@ -22,13 +22,13 @@ declare namespace GraphQL { }; export type QueryUserByIdArgs = { - id: Scalars['Int']; + id: Scalars['Int']['input']; }; export type User = { __typename?: 'User'; - email: Scalars['String']; - id: Scalars['Int']; - name: Scalars['String']; + email: Scalars['String']['output']; + id: Scalars['Int']['output']; + name: Scalars['String']['output']; }; } diff --git a/examples/persisted-documents-string-mode/src/gql/graphql.ts b/examples/persisted-documents-string-mode/src/gql/graphql.ts index 89fb697c109..0730ee3334f 100644 --- a/examples/persisted-documents-string-mode/src/gql/graphql.ts +++ b/examples/persisted-documents-string-mode/src/gql/graphql.ts @@ -9,25 +9,25 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; export type Mutation = { __typename?: 'Mutation'; - echo: Scalars['String']; + echo: Scalars['String']['output']; }; export type MutationEchoArgs = { - message: Scalars['String']; + message: Scalars['String']['input']; }; export type Query = { __typename?: 'Query'; - hello: Scalars['String']; + hello: Scalars['String']['output']; }; export type HelloQueryQueryVariables = Exact<{ [key: string]: never }>; diff --git a/examples/persisted-documents/src/gql/graphql.ts b/examples/persisted-documents/src/gql/graphql.ts index 0f99afca549..d2e3ec627ce 100644 --- a/examples/persisted-documents/src/gql/graphql.ts +++ b/examples/persisted-documents/src/gql/graphql.ts @@ -9,25 +9,25 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; export type Mutation = { __typename?: 'Mutation'; - echo: Scalars['String']; + echo: Scalars['String']['output']; }; export type MutationEchoArgs = { - message: Scalars['String']; + message: Scalars['String']['input']; }; export type Query = { __typename?: 'Query'; - hello: Scalars['String']; + hello: Scalars['String']['output']; }; export type HelloQueryQueryVariables = Exact<{ [key: string]: never }>; diff --git a/examples/react/apollo-client-defer/src/gql/graphql.ts b/examples/react/apollo-client-defer/src/gql/graphql.ts index fd16b6a7dd4..99a00b13567 100644 --- a/examples/react/apollo-client-defer/src/gql/graphql.ts +++ b/examples/react/apollo-client-defer/src/gql/graphql.ts @@ -9,27 +9,27 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; export type Query = { __typename?: 'Query'; - alphabet: Array; + alphabet: Array; /** A field that resolves fast. */ - fastField: Scalars['String']; + fastField: Scalars['String']['output']; /** * A field that resolves slowly. * Maybe you want to @defer this field ;) */ - slowField: Scalars['String']; + slowField: Scalars['String']['output']; }; export type QuerySlowFieldArgs = { - waitFor?: Scalars['Int']; + waitFor?: Scalars['Int']['input']; }; export type SlowFieldFragmentFragment = { __typename?: 'Query'; slowField: string } & { diff --git a/examples/react/apollo-client-swc-plugin/src/gql/graphql.ts b/examples/react/apollo-client-swc-plugin/src/gql/graphql.ts index 100bcd7ccd7..7c619f06073 100644 --- a/examples/react/apollo-client-swc-plugin/src/gql/graphql.ts +++ b/examples/react/apollo-client-swc-plugin/src/gql/graphql.ts @@ -9,11 +9,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A single film. */ @@ -21,67 +21,67 @@ export type Film = Node & { __typename?: 'Film'; characterConnection?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The name of the director of this film. */ - director?: Maybe; + director?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** The episode number of this film. */ - episodeID?: Maybe; + episodeID?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; + openingCrawl?: Maybe; planetConnection?: Maybe; /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; + producers?: Maybe>>; /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; + releaseDate?: Maybe; speciesConnection?: Maybe; starshipConnection?: Maybe; /** The title of this film. */ - title?: Maybe; + title?: Maybe; vehicleConnection?: Maybe; }; /** A single film. */ export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -106,14 +106,14 @@ export type FilmCharactersConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmCharactersEdge = { __typename?: 'FilmCharactersEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -140,14 +140,14 @@ export type FilmPlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmPlanetsEdge = { __typename?: 'FilmPlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -174,14 +174,14 @@ export type FilmSpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmSpeciesEdge = { __typename?: 'FilmSpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -208,14 +208,14 @@ export type FilmStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmStarshipsEdge = { __typename?: 'FilmStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -233,7 +233,7 @@ export type FilmVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -249,7 +249,7 @@ export type FilmVehiclesConnection = { export type FilmVehiclesEdge = { __typename?: 'FilmVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -276,14 +276,14 @@ export type FilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmsEdge = { __typename?: 'FilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -291,20 +291,20 @@ export type FilmsEdge = { /** An object with an ID */ export type Node = { /** The id of the object. */ - id: Scalars['ID']; + id: Scalars['ID']['output']; }; /** Information about pagination in a connection. */ export type PageInfo = { __typename?: 'PageInfo'; /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; + endCursor?: Maybe; /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']; + hasNextPage: Scalars['Boolean']['output']; /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']; + hasPreviousPage: Scalars['Boolean']['output']; /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; + startCursor?: Maybe; }; /** A connection to a list of items. */ @@ -329,14 +329,14 @@ export type PeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PeopleEdge = { __typename?: 'PeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -349,39 +349,39 @@ export type Person = Node & { * Before the Battle of Yavin or After the Battle of Yavin. The Battle of Yavin is * a battle that occurs at the end of Star Wars episode IV: A New Hope. */ - birthYear?: Maybe; + birthYear?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * The eye color of this person. Will be "unknown" if not known or "n/a" if the * person does not have an eye. */ - eyeColor?: Maybe; + eyeColor?: Maybe; filmConnection?: Maybe; /** * The gender of this person. Either "Male", "Female" or "unknown", * "n/a" if the person does not have a gender. */ - gender?: Maybe; + gender?: Maybe; /** * The hair color of this person. Will be "unknown" if not known or "n/a" if the * person does not have hair. */ - hairColor?: Maybe; + hairColor?: Maybe; /** The height of the person in centimeters. */ - height?: Maybe; + height?: Maybe; /** A planet that this person was born on or inhabits. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The mass of the person in kilograms. */ - mass?: Maybe; + mass?: Maybe; /** The name of this person. */ - name?: Maybe; + name?: Maybe; /** The skin color of this person. */ - skinColor?: Maybe; + skinColor?: Maybe; /** The species that this person belongs to, or null if unknown. */ species?: Maybe; starshipConnection?: Maybe; @@ -390,26 +390,26 @@ export type Person = Node & { /** An individual person or character within the Star Wars universe. */ export type PersonFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -434,14 +434,14 @@ export type PersonFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonFilmsEdge = { __typename?: 'PersonFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -468,14 +468,14 @@ export type PersonStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonStarshipsEdge = { __typename?: 'PersonStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -493,7 +493,7 @@ export type PersonVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -509,7 +509,7 @@ export type PersonVehiclesConnection = { export type PersonVehiclesEdge = { __typename?: 'PersonVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -521,43 +521,43 @@ export type PersonVehiclesEdge = { export type Planet = Node & { __typename?: 'Planet'; /** The climates of this planet. */ - climates?: Maybe>>; + climates?: Maybe>>; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The diameter of this planet in kilometers. */ - diameter?: Maybe; + diameter?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** * A number denoting the gravity of this planet, where "1" is normal or 1 standard * G. "2" is twice or 2 standard Gs. "0.5" is half or 0.5 standard Gs. */ - gravity?: Maybe; + gravity?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The name of this planet. */ - name?: Maybe; + name?: Maybe; /** * The number of standard days it takes for this planet to complete a single orbit * of its local star. */ - orbitalPeriod?: Maybe; + orbitalPeriod?: Maybe; /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; + population?: Maybe; residentConnection?: Maybe; /** * The number of standard hours it takes for this planet to complete a single * rotation on its axis. */ - rotationPeriod?: Maybe; + rotationPeriod?: Maybe; /** * The percentage of the planet surface that is naturally occurring water or bodies * of water. */ - surfaceWater?: Maybe; + surfaceWater?: Maybe; /** The terrains of this planet. */ - terrains?: Maybe>>; + terrains?: Maybe>>; }; /** @@ -565,10 +565,10 @@ export type Planet = Node & { * 0 ABY. */ export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** @@ -576,10 +576,10 @@ export type PlanetFilmConnectionArgs = { * 0 ABY. */ export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -604,14 +604,14 @@ export type PlanetFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetFilmsEdge = { __typename?: 'PlanetFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -638,14 +638,14 @@ export type PlanetResidentsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetResidentsEdge = { __typename?: 'PlanetResidentsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -672,14 +672,14 @@ export type PlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetsEdge = { __typename?: 'PlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -703,137 +703,137 @@ export type Root = { }; export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; + filmID?: InputMaybe; + id?: InputMaybe; }; export type RootNodeArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; + id?: InputMaybe; + personID?: InputMaybe; }; export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; + id?: InputMaybe; + planetID?: InputMaybe; }; export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; + id?: InputMaybe; + speciesID?: InputMaybe; }; export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; + id?: InputMaybe; + starshipID?: InputMaybe; }; export type RootVehicleArgs = { - id?: InputMaybe; - vehicleID?: InputMaybe; + id?: InputMaybe; + vehicleID?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type Species = Node & { __typename?: 'Species'; /** The average height of this species in centimeters. */ - averageHeight?: Maybe; + averageHeight?: Maybe; /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; + averageLifespan?: Maybe; /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; + classification?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The designation of this species, such as "sentient". */ - designation?: Maybe; + designation?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * Common eye colors for this species, null if this species does not typically * have eyes. */ - eyeColors?: Maybe>>; + eyeColors?: Maybe>>; filmConnection?: Maybe; /** * Common hair colors for this species, null if this species does not typically * have hair. */ - hairColors?: Maybe>>; + hairColors?: Maybe>>; /** A planet that this species originates from. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The language commonly spoken by this species. */ - language?: Maybe; + language?: Maybe; /** The name of this species. */ - name?: Maybe; + name?: Maybe; personConnection?: Maybe; /** * Common skin colors for this species, null if this species does not typically * have skin. */ - skinColors?: Maybe>>; + skinColors?: Maybe>>; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesPersonConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -858,14 +858,14 @@ export type SpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesEdge = { __typename?: 'SpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -892,14 +892,14 @@ export type SpeciesFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesFilmsEdge = { __typename?: 'SpeciesFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -926,14 +926,14 @@ export type SpeciesPeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesPeopleEdge = { __typename?: 'SpeciesPeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -948,67 +948,67 @@ export type Starship = Node & { * the difference in speed of starships. We can assume it is similar to AU, the * distance between our Sun (Sol) and Earth. */ - MGLT?: Maybe; + MGLT?: Maybe; /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this starship can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; + hyperdriveRating?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this starship in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** * The maximum speed of this starship in atmosphere. null if this starship is * incapable of atmosphering flight. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 * Orbital Battle Station". */ - model?: Maybe; + model?: Maybe; /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** * The class of this starship, such as "Starfighter" or "Deep Space Mobile * Battlestation" */ - starshipClass?: Maybe; + starshipClass?: Maybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipPilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1033,14 +1033,14 @@ export type StarshipFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipFilmsEdge = { __typename?: 'StarshipFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1067,14 +1067,14 @@ export type StarshipPilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipPilotsEdge = { __typename?: 'StarshipPilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1101,14 +1101,14 @@ export type StarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipsEdge = { __typename?: 'StarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1117,60 +1117,60 @@ export type StarshipsEdge = { export type Vehicle = Node & { __typename?: 'Vehicle'; /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this vehicle can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this vehicle in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this vehicle. Such as "All-Terrain Attack * Transport". */ - model?: Maybe; + model?: Maybe; /** * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder * bike". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; + vehicleClass?: Maybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehicleFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehiclePilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1195,14 +1195,14 @@ export type VehicleFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehicleFilmsEdge = { __typename?: 'VehicleFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1229,14 +1229,14 @@ export type VehiclePilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehiclePilotsEdge = { __typename?: 'VehiclePilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1254,7 +1254,7 @@ export type VehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -1270,13 +1270,13 @@ export type VehiclesConnection = { export type VehiclesEdge = { __typename?: 'VehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; export type AllFilmsWithVariablesQueryQueryVariables = Exact<{ - first: Scalars['Int']; + first: Scalars['Int']['input']; }>; export type AllFilmsWithVariablesQueryQuery = { diff --git a/examples/react/apollo-client/src/gql/graphql.ts b/examples/react/apollo-client/src/gql/graphql.ts index 100bcd7ccd7..7c619f06073 100644 --- a/examples/react/apollo-client/src/gql/graphql.ts +++ b/examples/react/apollo-client/src/gql/graphql.ts @@ -9,11 +9,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A single film. */ @@ -21,67 +21,67 @@ export type Film = Node & { __typename?: 'Film'; characterConnection?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The name of the director of this film. */ - director?: Maybe; + director?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** The episode number of this film. */ - episodeID?: Maybe; + episodeID?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; + openingCrawl?: Maybe; planetConnection?: Maybe; /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; + producers?: Maybe>>; /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; + releaseDate?: Maybe; speciesConnection?: Maybe; starshipConnection?: Maybe; /** The title of this film. */ - title?: Maybe; + title?: Maybe; vehicleConnection?: Maybe; }; /** A single film. */ export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -106,14 +106,14 @@ export type FilmCharactersConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmCharactersEdge = { __typename?: 'FilmCharactersEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -140,14 +140,14 @@ export type FilmPlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmPlanetsEdge = { __typename?: 'FilmPlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -174,14 +174,14 @@ export type FilmSpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmSpeciesEdge = { __typename?: 'FilmSpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -208,14 +208,14 @@ export type FilmStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmStarshipsEdge = { __typename?: 'FilmStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -233,7 +233,7 @@ export type FilmVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -249,7 +249,7 @@ export type FilmVehiclesConnection = { export type FilmVehiclesEdge = { __typename?: 'FilmVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -276,14 +276,14 @@ export type FilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmsEdge = { __typename?: 'FilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -291,20 +291,20 @@ export type FilmsEdge = { /** An object with an ID */ export type Node = { /** The id of the object. */ - id: Scalars['ID']; + id: Scalars['ID']['output']; }; /** Information about pagination in a connection. */ export type PageInfo = { __typename?: 'PageInfo'; /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; + endCursor?: Maybe; /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']; + hasNextPage: Scalars['Boolean']['output']; /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']; + hasPreviousPage: Scalars['Boolean']['output']; /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; + startCursor?: Maybe; }; /** A connection to a list of items. */ @@ -329,14 +329,14 @@ export type PeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PeopleEdge = { __typename?: 'PeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -349,39 +349,39 @@ export type Person = Node & { * Before the Battle of Yavin or After the Battle of Yavin. The Battle of Yavin is * a battle that occurs at the end of Star Wars episode IV: A New Hope. */ - birthYear?: Maybe; + birthYear?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * The eye color of this person. Will be "unknown" if not known or "n/a" if the * person does not have an eye. */ - eyeColor?: Maybe; + eyeColor?: Maybe; filmConnection?: Maybe; /** * The gender of this person. Either "Male", "Female" or "unknown", * "n/a" if the person does not have a gender. */ - gender?: Maybe; + gender?: Maybe; /** * The hair color of this person. Will be "unknown" if not known or "n/a" if the * person does not have hair. */ - hairColor?: Maybe; + hairColor?: Maybe; /** The height of the person in centimeters. */ - height?: Maybe; + height?: Maybe; /** A planet that this person was born on or inhabits. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The mass of the person in kilograms. */ - mass?: Maybe; + mass?: Maybe; /** The name of this person. */ - name?: Maybe; + name?: Maybe; /** The skin color of this person. */ - skinColor?: Maybe; + skinColor?: Maybe; /** The species that this person belongs to, or null if unknown. */ species?: Maybe; starshipConnection?: Maybe; @@ -390,26 +390,26 @@ export type Person = Node & { /** An individual person or character within the Star Wars universe. */ export type PersonFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -434,14 +434,14 @@ export type PersonFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonFilmsEdge = { __typename?: 'PersonFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -468,14 +468,14 @@ export type PersonStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonStarshipsEdge = { __typename?: 'PersonStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -493,7 +493,7 @@ export type PersonVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -509,7 +509,7 @@ export type PersonVehiclesConnection = { export type PersonVehiclesEdge = { __typename?: 'PersonVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -521,43 +521,43 @@ export type PersonVehiclesEdge = { export type Planet = Node & { __typename?: 'Planet'; /** The climates of this planet. */ - climates?: Maybe>>; + climates?: Maybe>>; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The diameter of this planet in kilometers. */ - diameter?: Maybe; + diameter?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** * A number denoting the gravity of this planet, where "1" is normal or 1 standard * G. "2" is twice or 2 standard Gs. "0.5" is half or 0.5 standard Gs. */ - gravity?: Maybe; + gravity?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The name of this planet. */ - name?: Maybe; + name?: Maybe; /** * The number of standard days it takes for this planet to complete a single orbit * of its local star. */ - orbitalPeriod?: Maybe; + orbitalPeriod?: Maybe; /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; + population?: Maybe; residentConnection?: Maybe; /** * The number of standard hours it takes for this planet to complete a single * rotation on its axis. */ - rotationPeriod?: Maybe; + rotationPeriod?: Maybe; /** * The percentage of the planet surface that is naturally occurring water or bodies * of water. */ - surfaceWater?: Maybe; + surfaceWater?: Maybe; /** The terrains of this planet. */ - terrains?: Maybe>>; + terrains?: Maybe>>; }; /** @@ -565,10 +565,10 @@ export type Planet = Node & { * 0 ABY. */ export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** @@ -576,10 +576,10 @@ export type PlanetFilmConnectionArgs = { * 0 ABY. */ export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -604,14 +604,14 @@ export type PlanetFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetFilmsEdge = { __typename?: 'PlanetFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -638,14 +638,14 @@ export type PlanetResidentsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetResidentsEdge = { __typename?: 'PlanetResidentsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -672,14 +672,14 @@ export type PlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetsEdge = { __typename?: 'PlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -703,137 +703,137 @@ export type Root = { }; export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; + filmID?: InputMaybe; + id?: InputMaybe; }; export type RootNodeArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; + id?: InputMaybe; + personID?: InputMaybe; }; export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; + id?: InputMaybe; + planetID?: InputMaybe; }; export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; + id?: InputMaybe; + speciesID?: InputMaybe; }; export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; + id?: InputMaybe; + starshipID?: InputMaybe; }; export type RootVehicleArgs = { - id?: InputMaybe; - vehicleID?: InputMaybe; + id?: InputMaybe; + vehicleID?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type Species = Node & { __typename?: 'Species'; /** The average height of this species in centimeters. */ - averageHeight?: Maybe; + averageHeight?: Maybe; /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; + averageLifespan?: Maybe; /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; + classification?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The designation of this species, such as "sentient". */ - designation?: Maybe; + designation?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * Common eye colors for this species, null if this species does not typically * have eyes. */ - eyeColors?: Maybe>>; + eyeColors?: Maybe>>; filmConnection?: Maybe; /** * Common hair colors for this species, null if this species does not typically * have hair. */ - hairColors?: Maybe>>; + hairColors?: Maybe>>; /** A planet that this species originates from. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The language commonly spoken by this species. */ - language?: Maybe; + language?: Maybe; /** The name of this species. */ - name?: Maybe; + name?: Maybe; personConnection?: Maybe; /** * Common skin colors for this species, null if this species does not typically * have skin. */ - skinColors?: Maybe>>; + skinColors?: Maybe>>; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesPersonConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -858,14 +858,14 @@ export type SpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesEdge = { __typename?: 'SpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -892,14 +892,14 @@ export type SpeciesFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesFilmsEdge = { __typename?: 'SpeciesFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -926,14 +926,14 @@ export type SpeciesPeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesPeopleEdge = { __typename?: 'SpeciesPeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -948,67 +948,67 @@ export type Starship = Node & { * the difference in speed of starships. We can assume it is similar to AU, the * distance between our Sun (Sol) and Earth. */ - MGLT?: Maybe; + MGLT?: Maybe; /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this starship can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; + hyperdriveRating?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this starship in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** * The maximum speed of this starship in atmosphere. null if this starship is * incapable of atmosphering flight. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 * Orbital Battle Station". */ - model?: Maybe; + model?: Maybe; /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** * The class of this starship, such as "Starfighter" or "Deep Space Mobile * Battlestation" */ - starshipClass?: Maybe; + starshipClass?: Maybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipPilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1033,14 +1033,14 @@ export type StarshipFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipFilmsEdge = { __typename?: 'StarshipFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1067,14 +1067,14 @@ export type StarshipPilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipPilotsEdge = { __typename?: 'StarshipPilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1101,14 +1101,14 @@ export type StarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipsEdge = { __typename?: 'StarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1117,60 +1117,60 @@ export type StarshipsEdge = { export type Vehicle = Node & { __typename?: 'Vehicle'; /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this vehicle can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this vehicle in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this vehicle. Such as "All-Terrain Attack * Transport". */ - model?: Maybe; + model?: Maybe; /** * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder * bike". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; + vehicleClass?: Maybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehicleFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehiclePilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1195,14 +1195,14 @@ export type VehicleFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehicleFilmsEdge = { __typename?: 'VehicleFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1229,14 +1229,14 @@ export type VehiclePilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehiclePilotsEdge = { __typename?: 'VehiclePilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1254,7 +1254,7 @@ export type VehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -1270,13 +1270,13 @@ export type VehiclesConnection = { export type VehiclesEdge = { __typename?: 'VehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; export type AllFilmsWithVariablesQueryQueryVariables = Exact<{ - first: Scalars['Int']; + first: Scalars['Int']['input']; }>; export type AllFilmsWithVariablesQueryQuery = { diff --git a/examples/react/http-executor/src/gql/graphql.ts b/examples/react/http-executor/src/gql/graphql.ts index 100bcd7ccd7..7c619f06073 100644 --- a/examples/react/http-executor/src/gql/graphql.ts +++ b/examples/react/http-executor/src/gql/graphql.ts @@ -9,11 +9,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A single film. */ @@ -21,67 +21,67 @@ export type Film = Node & { __typename?: 'Film'; characterConnection?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The name of the director of this film. */ - director?: Maybe; + director?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** The episode number of this film. */ - episodeID?: Maybe; + episodeID?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; + openingCrawl?: Maybe; planetConnection?: Maybe; /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; + producers?: Maybe>>; /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; + releaseDate?: Maybe; speciesConnection?: Maybe; starshipConnection?: Maybe; /** The title of this film. */ - title?: Maybe; + title?: Maybe; vehicleConnection?: Maybe; }; /** A single film. */ export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -106,14 +106,14 @@ export type FilmCharactersConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmCharactersEdge = { __typename?: 'FilmCharactersEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -140,14 +140,14 @@ export type FilmPlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmPlanetsEdge = { __typename?: 'FilmPlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -174,14 +174,14 @@ export type FilmSpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmSpeciesEdge = { __typename?: 'FilmSpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -208,14 +208,14 @@ export type FilmStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmStarshipsEdge = { __typename?: 'FilmStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -233,7 +233,7 @@ export type FilmVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -249,7 +249,7 @@ export type FilmVehiclesConnection = { export type FilmVehiclesEdge = { __typename?: 'FilmVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -276,14 +276,14 @@ export type FilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmsEdge = { __typename?: 'FilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -291,20 +291,20 @@ export type FilmsEdge = { /** An object with an ID */ export type Node = { /** The id of the object. */ - id: Scalars['ID']; + id: Scalars['ID']['output']; }; /** Information about pagination in a connection. */ export type PageInfo = { __typename?: 'PageInfo'; /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; + endCursor?: Maybe; /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']; + hasNextPage: Scalars['Boolean']['output']; /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']; + hasPreviousPage: Scalars['Boolean']['output']; /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; + startCursor?: Maybe; }; /** A connection to a list of items. */ @@ -329,14 +329,14 @@ export type PeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PeopleEdge = { __typename?: 'PeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -349,39 +349,39 @@ export type Person = Node & { * Before the Battle of Yavin or After the Battle of Yavin. The Battle of Yavin is * a battle that occurs at the end of Star Wars episode IV: A New Hope. */ - birthYear?: Maybe; + birthYear?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * The eye color of this person. Will be "unknown" if not known or "n/a" if the * person does not have an eye. */ - eyeColor?: Maybe; + eyeColor?: Maybe; filmConnection?: Maybe; /** * The gender of this person. Either "Male", "Female" or "unknown", * "n/a" if the person does not have a gender. */ - gender?: Maybe; + gender?: Maybe; /** * The hair color of this person. Will be "unknown" if not known or "n/a" if the * person does not have hair. */ - hairColor?: Maybe; + hairColor?: Maybe; /** The height of the person in centimeters. */ - height?: Maybe; + height?: Maybe; /** A planet that this person was born on or inhabits. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The mass of the person in kilograms. */ - mass?: Maybe; + mass?: Maybe; /** The name of this person. */ - name?: Maybe; + name?: Maybe; /** The skin color of this person. */ - skinColor?: Maybe; + skinColor?: Maybe; /** The species that this person belongs to, or null if unknown. */ species?: Maybe; starshipConnection?: Maybe; @@ -390,26 +390,26 @@ export type Person = Node & { /** An individual person or character within the Star Wars universe. */ export type PersonFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -434,14 +434,14 @@ export type PersonFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonFilmsEdge = { __typename?: 'PersonFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -468,14 +468,14 @@ export type PersonStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonStarshipsEdge = { __typename?: 'PersonStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -493,7 +493,7 @@ export type PersonVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -509,7 +509,7 @@ export type PersonVehiclesConnection = { export type PersonVehiclesEdge = { __typename?: 'PersonVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -521,43 +521,43 @@ export type PersonVehiclesEdge = { export type Planet = Node & { __typename?: 'Planet'; /** The climates of this planet. */ - climates?: Maybe>>; + climates?: Maybe>>; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The diameter of this planet in kilometers. */ - diameter?: Maybe; + diameter?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** * A number denoting the gravity of this planet, where "1" is normal or 1 standard * G. "2" is twice or 2 standard Gs. "0.5" is half or 0.5 standard Gs. */ - gravity?: Maybe; + gravity?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The name of this planet. */ - name?: Maybe; + name?: Maybe; /** * The number of standard days it takes for this planet to complete a single orbit * of its local star. */ - orbitalPeriod?: Maybe; + orbitalPeriod?: Maybe; /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; + population?: Maybe; residentConnection?: Maybe; /** * The number of standard hours it takes for this planet to complete a single * rotation on its axis. */ - rotationPeriod?: Maybe; + rotationPeriod?: Maybe; /** * The percentage of the planet surface that is naturally occurring water or bodies * of water. */ - surfaceWater?: Maybe; + surfaceWater?: Maybe; /** The terrains of this planet. */ - terrains?: Maybe>>; + terrains?: Maybe>>; }; /** @@ -565,10 +565,10 @@ export type Planet = Node & { * 0 ABY. */ export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** @@ -576,10 +576,10 @@ export type PlanetFilmConnectionArgs = { * 0 ABY. */ export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -604,14 +604,14 @@ export type PlanetFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetFilmsEdge = { __typename?: 'PlanetFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -638,14 +638,14 @@ export type PlanetResidentsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetResidentsEdge = { __typename?: 'PlanetResidentsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -672,14 +672,14 @@ export type PlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetsEdge = { __typename?: 'PlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -703,137 +703,137 @@ export type Root = { }; export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; + filmID?: InputMaybe; + id?: InputMaybe; }; export type RootNodeArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; + id?: InputMaybe; + personID?: InputMaybe; }; export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; + id?: InputMaybe; + planetID?: InputMaybe; }; export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; + id?: InputMaybe; + speciesID?: InputMaybe; }; export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; + id?: InputMaybe; + starshipID?: InputMaybe; }; export type RootVehicleArgs = { - id?: InputMaybe; - vehicleID?: InputMaybe; + id?: InputMaybe; + vehicleID?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type Species = Node & { __typename?: 'Species'; /** The average height of this species in centimeters. */ - averageHeight?: Maybe; + averageHeight?: Maybe; /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; + averageLifespan?: Maybe; /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; + classification?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The designation of this species, such as "sentient". */ - designation?: Maybe; + designation?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * Common eye colors for this species, null if this species does not typically * have eyes. */ - eyeColors?: Maybe>>; + eyeColors?: Maybe>>; filmConnection?: Maybe; /** * Common hair colors for this species, null if this species does not typically * have hair. */ - hairColors?: Maybe>>; + hairColors?: Maybe>>; /** A planet that this species originates from. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The language commonly spoken by this species. */ - language?: Maybe; + language?: Maybe; /** The name of this species. */ - name?: Maybe; + name?: Maybe; personConnection?: Maybe; /** * Common skin colors for this species, null if this species does not typically * have skin. */ - skinColors?: Maybe>>; + skinColors?: Maybe>>; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesPersonConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -858,14 +858,14 @@ export type SpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesEdge = { __typename?: 'SpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -892,14 +892,14 @@ export type SpeciesFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesFilmsEdge = { __typename?: 'SpeciesFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -926,14 +926,14 @@ export type SpeciesPeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesPeopleEdge = { __typename?: 'SpeciesPeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -948,67 +948,67 @@ export type Starship = Node & { * the difference in speed of starships. We can assume it is similar to AU, the * distance between our Sun (Sol) and Earth. */ - MGLT?: Maybe; + MGLT?: Maybe; /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this starship can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; + hyperdriveRating?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this starship in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** * The maximum speed of this starship in atmosphere. null if this starship is * incapable of atmosphering flight. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 * Orbital Battle Station". */ - model?: Maybe; + model?: Maybe; /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** * The class of this starship, such as "Starfighter" or "Deep Space Mobile * Battlestation" */ - starshipClass?: Maybe; + starshipClass?: Maybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipPilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1033,14 +1033,14 @@ export type StarshipFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipFilmsEdge = { __typename?: 'StarshipFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1067,14 +1067,14 @@ export type StarshipPilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipPilotsEdge = { __typename?: 'StarshipPilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1101,14 +1101,14 @@ export type StarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipsEdge = { __typename?: 'StarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1117,60 +1117,60 @@ export type StarshipsEdge = { export type Vehicle = Node & { __typename?: 'Vehicle'; /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this vehicle can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this vehicle in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this vehicle. Such as "All-Terrain Attack * Transport". */ - model?: Maybe; + model?: Maybe; /** * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder * bike". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; + vehicleClass?: Maybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehicleFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehiclePilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1195,14 +1195,14 @@ export type VehicleFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehicleFilmsEdge = { __typename?: 'VehicleFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1229,14 +1229,14 @@ export type VehiclePilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehiclePilotsEdge = { __typename?: 'VehiclePilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1254,7 +1254,7 @@ export type VehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -1270,13 +1270,13 @@ export type VehiclesConnection = { export type VehiclesEdge = { __typename?: 'VehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; export type AllFilmsWithVariablesQueryQueryVariables = Exact<{ - first: Scalars['Int']; + first: Scalars['Int']['input']; }>; export type AllFilmsWithVariablesQueryQuery = { diff --git a/examples/react/nextjs-swr/gql/graphql.ts b/examples/react/nextjs-swr/gql/graphql.ts index 5b8106ff6f1..fbd1809a391 100644 --- a/examples/react/nextjs-swr/gql/graphql.ts +++ b/examples/react/nextjs-swr/gql/graphql.ts @@ -9,11 +9,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A single film. */ @@ -21,67 +21,67 @@ export type Film = Node & { __typename?: 'Film'; characterConnection?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The name of the director of this film. */ - director?: Maybe; + director?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** The episode number of this film. */ - episodeID?: Maybe; + episodeID?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; + openingCrawl?: Maybe; planetConnection?: Maybe; /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; + producers?: Maybe>>; /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; + releaseDate?: Maybe; speciesConnection?: Maybe; starshipConnection?: Maybe; /** The title of this film. */ - title?: Maybe; + title?: Maybe; vehicleConnection?: Maybe; }; /** A single film. */ export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -106,14 +106,14 @@ export type FilmCharactersConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmCharactersEdge = { __typename?: 'FilmCharactersEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -140,14 +140,14 @@ export type FilmPlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmPlanetsEdge = { __typename?: 'FilmPlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -174,14 +174,14 @@ export type FilmSpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmSpeciesEdge = { __typename?: 'FilmSpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -208,14 +208,14 @@ export type FilmStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmStarshipsEdge = { __typename?: 'FilmStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -233,7 +233,7 @@ export type FilmVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -249,7 +249,7 @@ export type FilmVehiclesConnection = { export type FilmVehiclesEdge = { __typename?: 'FilmVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -276,14 +276,14 @@ export type FilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmsEdge = { __typename?: 'FilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -291,20 +291,20 @@ export type FilmsEdge = { /** An object with an ID */ export type Node = { /** The id of the object. */ - id: Scalars['ID']; + id: Scalars['ID']['output']; }; /** Information about pagination in a connection. */ export type PageInfo = { __typename?: 'PageInfo'; /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; + endCursor?: Maybe; /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']; + hasNextPage: Scalars['Boolean']['output']; /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']; + hasPreviousPage: Scalars['Boolean']['output']; /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; + startCursor?: Maybe; }; /** A connection to a list of items. */ @@ -329,14 +329,14 @@ export type PeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PeopleEdge = { __typename?: 'PeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -349,39 +349,39 @@ export type Person = Node & { * Before the Battle of Yavin or After the Battle of Yavin. The Battle of Yavin is * a battle that occurs at the end of Star Wars episode IV: A New Hope. */ - birthYear?: Maybe; + birthYear?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * The eye color of this person. Will be "unknown" if not known or "n/a" if the * person does not have an eye. */ - eyeColor?: Maybe; + eyeColor?: Maybe; filmConnection?: Maybe; /** * The gender of this person. Either "Male", "Female" or "unknown", * "n/a" if the person does not have a gender. */ - gender?: Maybe; + gender?: Maybe; /** * The hair color of this person. Will be "unknown" if not known or "n/a" if the * person does not have hair. */ - hairColor?: Maybe; + hairColor?: Maybe; /** The height of the person in centimeters. */ - height?: Maybe; + height?: Maybe; /** A planet that this person was born on or inhabits. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The mass of the person in kilograms. */ - mass?: Maybe; + mass?: Maybe; /** The name of this person. */ - name?: Maybe; + name?: Maybe; /** The skin color of this person. */ - skinColor?: Maybe; + skinColor?: Maybe; /** The species that this person belongs to, or null if unknown. */ species?: Maybe; starshipConnection?: Maybe; @@ -390,26 +390,26 @@ export type Person = Node & { /** An individual person or character within the Star Wars universe. */ export type PersonFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -434,14 +434,14 @@ export type PersonFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonFilmsEdge = { __typename?: 'PersonFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -468,14 +468,14 @@ export type PersonStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonStarshipsEdge = { __typename?: 'PersonStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -493,7 +493,7 @@ export type PersonVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -509,7 +509,7 @@ export type PersonVehiclesConnection = { export type PersonVehiclesEdge = { __typename?: 'PersonVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -521,43 +521,43 @@ export type PersonVehiclesEdge = { export type Planet = Node & { __typename?: 'Planet'; /** The climates of this planet. */ - climates?: Maybe>>; + climates?: Maybe>>; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The diameter of this planet in kilometers. */ - diameter?: Maybe; + diameter?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** * A number denoting the gravity of this planet, where "1" is normal or 1 standard * G. "2" is twice or 2 standard Gs. "0.5" is half or 0.5 standard Gs. */ - gravity?: Maybe; + gravity?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The name of this planet. */ - name?: Maybe; + name?: Maybe; /** * The number of standard days it takes for this planet to complete a single orbit * of its local star. */ - orbitalPeriod?: Maybe; + orbitalPeriod?: Maybe; /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; + population?: Maybe; residentConnection?: Maybe; /** * The number of standard hours it takes for this planet to complete a single * rotation on its axis. */ - rotationPeriod?: Maybe; + rotationPeriod?: Maybe; /** * The percentage of the planet surface that is naturally occurring water or bodies * of water. */ - surfaceWater?: Maybe; + surfaceWater?: Maybe; /** The terrains of this planet. */ - terrains?: Maybe>>; + terrains?: Maybe>>; }; /** @@ -565,10 +565,10 @@ export type Planet = Node & { * 0 ABY. */ export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** @@ -576,10 +576,10 @@ export type PlanetFilmConnectionArgs = { * 0 ABY. */ export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -604,14 +604,14 @@ export type PlanetFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetFilmsEdge = { __typename?: 'PlanetFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -638,14 +638,14 @@ export type PlanetResidentsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetResidentsEdge = { __typename?: 'PlanetResidentsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -672,14 +672,14 @@ export type PlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetsEdge = { __typename?: 'PlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -703,137 +703,137 @@ export type Root = { }; export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; + filmID?: InputMaybe; + id?: InputMaybe; }; export type RootNodeArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; + id?: InputMaybe; + personID?: InputMaybe; }; export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; + id?: InputMaybe; + planetID?: InputMaybe; }; export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; + id?: InputMaybe; + speciesID?: InputMaybe; }; export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; + id?: InputMaybe; + starshipID?: InputMaybe; }; export type RootVehicleArgs = { - id?: InputMaybe; - vehicleID?: InputMaybe; + id?: InputMaybe; + vehicleID?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type Species = Node & { __typename?: 'Species'; /** The average height of this species in centimeters. */ - averageHeight?: Maybe; + averageHeight?: Maybe; /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; + averageLifespan?: Maybe; /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; + classification?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The designation of this species, such as "sentient". */ - designation?: Maybe; + designation?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * Common eye colors for this species, null if this species does not typically * have eyes. */ - eyeColors?: Maybe>>; + eyeColors?: Maybe>>; filmConnection?: Maybe; /** * Common hair colors for this species, null if this species does not typically * have hair. */ - hairColors?: Maybe>>; + hairColors?: Maybe>>; /** A planet that this species originates from. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The language commonly spoken by this species. */ - language?: Maybe; + language?: Maybe; /** The name of this species. */ - name?: Maybe; + name?: Maybe; personConnection?: Maybe; /** * Common skin colors for this species, null if this species does not typically * have skin. */ - skinColors?: Maybe>>; + skinColors?: Maybe>>; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesPersonConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -858,14 +858,14 @@ export type SpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesEdge = { __typename?: 'SpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -892,14 +892,14 @@ export type SpeciesFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesFilmsEdge = { __typename?: 'SpeciesFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -926,14 +926,14 @@ export type SpeciesPeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesPeopleEdge = { __typename?: 'SpeciesPeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -948,67 +948,67 @@ export type Starship = Node & { * the difference in speed of starships. We can assume it is similar to AU, the * distance between our Sun (Sol) and Earth. */ - MGLT?: Maybe; + MGLT?: Maybe; /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this starship can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; + hyperdriveRating?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this starship in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** * The maximum speed of this starship in atmosphere. null if this starship is * incapable of atmosphering flight. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 * Orbital Battle Station". */ - model?: Maybe; + model?: Maybe; /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** * The class of this starship, such as "Starfighter" or "Deep Space Mobile * Battlestation" */ - starshipClass?: Maybe; + starshipClass?: Maybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipPilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1033,14 +1033,14 @@ export type StarshipFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipFilmsEdge = { __typename?: 'StarshipFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1067,14 +1067,14 @@ export type StarshipPilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipPilotsEdge = { __typename?: 'StarshipPilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1101,14 +1101,14 @@ export type StarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipsEdge = { __typename?: 'StarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1117,60 +1117,60 @@ export type StarshipsEdge = { export type Vehicle = Node & { __typename?: 'Vehicle'; /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this vehicle can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this vehicle in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this vehicle. Such as "All-Terrain Attack * Transport". */ - model?: Maybe; + model?: Maybe; /** * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder * bike". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; + vehicleClass?: Maybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehicleFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehiclePilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1195,14 +1195,14 @@ export type VehicleFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehicleFilmsEdge = { __typename?: 'VehicleFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1229,14 +1229,14 @@ export type VehiclePilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehiclePilotsEdge = { __typename?: 'VehiclePilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1254,7 +1254,7 @@ export type VehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -1270,7 +1270,7 @@ export type VehiclesConnection = { export type VehiclesEdge = { __typename?: 'VehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1284,7 +1284,7 @@ export type FilmItemFragment = { } & { ' $fragmentName'?: 'FilmItemFragment' }; export type AllFilmsWithVariablesQueryQueryVariables = Exact<{ - first: Scalars['Int']; + first: Scalars['Int']['input']; }>; export type AllFilmsWithVariablesQueryQuery = { diff --git a/examples/react/tanstack-react-query/src/gql/graphql.ts b/examples/react/tanstack-react-query/src/gql/graphql.ts index b5e81ccaa97..468724b5057 100644 --- a/examples/react/tanstack-react-query/src/gql/graphql.ts +++ b/examples/react/tanstack-react-query/src/gql/graphql.ts @@ -9,11 +9,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A single film. */ @@ -21,67 +21,67 @@ export type Film = Node & { __typename?: 'Film'; characterConnection?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The name of the director of this film. */ - director?: Maybe; + director?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** The episode number of this film. */ - episodeID?: Maybe; + episodeID?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; + openingCrawl?: Maybe; planetConnection?: Maybe; /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; + producers?: Maybe>>; /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; + releaseDate?: Maybe; speciesConnection?: Maybe; starshipConnection?: Maybe; /** The title of this film. */ - title?: Maybe; + title?: Maybe; vehicleConnection?: Maybe; }; /** A single film. */ export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -106,14 +106,14 @@ export type FilmCharactersConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmCharactersEdge = { __typename?: 'FilmCharactersEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -140,14 +140,14 @@ export type FilmPlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmPlanetsEdge = { __typename?: 'FilmPlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -174,14 +174,14 @@ export type FilmSpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmSpeciesEdge = { __typename?: 'FilmSpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -208,14 +208,14 @@ export type FilmStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmStarshipsEdge = { __typename?: 'FilmStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -233,7 +233,7 @@ export type FilmVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -249,7 +249,7 @@ export type FilmVehiclesConnection = { export type FilmVehiclesEdge = { __typename?: 'FilmVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -276,14 +276,14 @@ export type FilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmsEdge = { __typename?: 'FilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -291,20 +291,20 @@ export type FilmsEdge = { /** An object with an ID */ export type Node = { /** The id of the object. */ - id: Scalars['ID']; + id: Scalars['ID']['output']; }; /** Information about pagination in a connection. */ export type PageInfo = { __typename?: 'PageInfo'; /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; + endCursor?: Maybe; /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']; + hasNextPage: Scalars['Boolean']['output']; /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']; + hasPreviousPage: Scalars['Boolean']['output']; /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; + startCursor?: Maybe; }; /** A connection to a list of items. */ @@ -329,14 +329,14 @@ export type PeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PeopleEdge = { __typename?: 'PeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -349,39 +349,39 @@ export type Person = Node & { * Before the Battle of Yavin or After the Battle of Yavin. The Battle of Yavin is * a battle that occurs at the end of Star Wars episode IV: A New Hope. */ - birthYear?: Maybe; + birthYear?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * The eye color of this person. Will be "unknown" if not known or "n/a" if the * person does not have an eye. */ - eyeColor?: Maybe; + eyeColor?: Maybe; filmConnection?: Maybe; /** * The gender of this person. Either "Male", "Female" or "unknown", * "n/a" if the person does not have a gender. */ - gender?: Maybe; + gender?: Maybe; /** * The hair color of this person. Will be "unknown" if not known or "n/a" if the * person does not have hair. */ - hairColor?: Maybe; + hairColor?: Maybe; /** The height of the person in centimeters. */ - height?: Maybe; + height?: Maybe; /** A planet that this person was born on or inhabits. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The mass of the person in kilograms. */ - mass?: Maybe; + mass?: Maybe; /** The name of this person. */ - name?: Maybe; + name?: Maybe; /** The skin color of this person. */ - skinColor?: Maybe; + skinColor?: Maybe; /** The species that this person belongs to, or null if unknown. */ species?: Maybe; starshipConnection?: Maybe; @@ -390,26 +390,26 @@ export type Person = Node & { /** An individual person or character within the Star Wars universe. */ export type PersonFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -434,14 +434,14 @@ export type PersonFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonFilmsEdge = { __typename?: 'PersonFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -468,14 +468,14 @@ export type PersonStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonStarshipsEdge = { __typename?: 'PersonStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -493,7 +493,7 @@ export type PersonVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -509,7 +509,7 @@ export type PersonVehiclesConnection = { export type PersonVehiclesEdge = { __typename?: 'PersonVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -521,43 +521,43 @@ export type PersonVehiclesEdge = { export type Planet = Node & { __typename?: 'Planet'; /** The climates of this planet. */ - climates?: Maybe>>; + climates?: Maybe>>; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The diameter of this planet in kilometers. */ - diameter?: Maybe; + diameter?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** * A number denoting the gravity of this planet, where "1" is normal or 1 standard * G. "2" is twice or 2 standard Gs. "0.5" is half or 0.5 standard Gs. */ - gravity?: Maybe; + gravity?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The name of this planet. */ - name?: Maybe; + name?: Maybe; /** * The number of standard days it takes for this planet to complete a single orbit * of its local star. */ - orbitalPeriod?: Maybe; + orbitalPeriod?: Maybe; /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; + population?: Maybe; residentConnection?: Maybe; /** * The number of standard hours it takes for this planet to complete a single * rotation on its axis. */ - rotationPeriod?: Maybe; + rotationPeriod?: Maybe; /** * The percentage of the planet surface that is naturally occurring water or bodies * of water. */ - surfaceWater?: Maybe; + surfaceWater?: Maybe; /** The terrains of this planet. */ - terrains?: Maybe>>; + terrains?: Maybe>>; }; /** @@ -565,10 +565,10 @@ export type Planet = Node & { * 0 ABY. */ export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** @@ -576,10 +576,10 @@ export type PlanetFilmConnectionArgs = { * 0 ABY. */ export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -604,14 +604,14 @@ export type PlanetFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetFilmsEdge = { __typename?: 'PlanetFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -638,14 +638,14 @@ export type PlanetResidentsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetResidentsEdge = { __typename?: 'PlanetResidentsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -672,14 +672,14 @@ export type PlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetsEdge = { __typename?: 'PlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -703,137 +703,137 @@ export type Root = { }; export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; + filmID?: InputMaybe; + id?: InputMaybe; }; export type RootNodeArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; + id?: InputMaybe; + personID?: InputMaybe; }; export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; + id?: InputMaybe; + planetID?: InputMaybe; }; export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; + id?: InputMaybe; + speciesID?: InputMaybe; }; export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; + id?: InputMaybe; + starshipID?: InputMaybe; }; export type RootVehicleArgs = { - id?: InputMaybe; - vehicleID?: InputMaybe; + id?: InputMaybe; + vehicleID?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type Species = Node & { __typename?: 'Species'; /** The average height of this species in centimeters. */ - averageHeight?: Maybe; + averageHeight?: Maybe; /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; + averageLifespan?: Maybe; /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; + classification?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The designation of this species, such as "sentient". */ - designation?: Maybe; + designation?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * Common eye colors for this species, null if this species does not typically * have eyes. */ - eyeColors?: Maybe>>; + eyeColors?: Maybe>>; filmConnection?: Maybe; /** * Common hair colors for this species, null if this species does not typically * have hair. */ - hairColors?: Maybe>>; + hairColors?: Maybe>>; /** A planet that this species originates from. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The language commonly spoken by this species. */ - language?: Maybe; + language?: Maybe; /** The name of this species. */ - name?: Maybe; + name?: Maybe; personConnection?: Maybe; /** * Common skin colors for this species, null if this species does not typically * have skin. */ - skinColors?: Maybe>>; + skinColors?: Maybe>>; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesPersonConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -858,14 +858,14 @@ export type SpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesEdge = { __typename?: 'SpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -892,14 +892,14 @@ export type SpeciesFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesFilmsEdge = { __typename?: 'SpeciesFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -926,14 +926,14 @@ export type SpeciesPeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesPeopleEdge = { __typename?: 'SpeciesPeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -948,67 +948,67 @@ export type Starship = Node & { * the difference in speed of starships. We can assume it is similar to AU, the * distance between our Sun (Sol) and Earth. */ - MGLT?: Maybe; + MGLT?: Maybe; /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this starship can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; + hyperdriveRating?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this starship in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** * The maximum speed of this starship in atmosphere. null if this starship is * incapable of atmosphering flight. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 * Orbital Battle Station". */ - model?: Maybe; + model?: Maybe; /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** * The class of this starship, such as "Starfighter" or "Deep Space Mobile * Battlestation" */ - starshipClass?: Maybe; + starshipClass?: Maybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipPilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1033,14 +1033,14 @@ export type StarshipFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipFilmsEdge = { __typename?: 'StarshipFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1067,14 +1067,14 @@ export type StarshipPilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipPilotsEdge = { __typename?: 'StarshipPilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1101,14 +1101,14 @@ export type StarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipsEdge = { __typename?: 'StarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1117,60 +1117,60 @@ export type StarshipsEdge = { export type Vehicle = Node & { __typename?: 'Vehicle'; /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this vehicle can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this vehicle in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this vehicle. Such as "All-Terrain Attack * Transport". */ - model?: Maybe; + model?: Maybe; /** * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder * bike". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; + vehicleClass?: Maybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehicleFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehiclePilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1195,14 +1195,14 @@ export type VehicleFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehicleFilmsEdge = { __typename?: 'VehicleFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1229,14 +1229,14 @@ export type VehiclePilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehiclePilotsEdge = { __typename?: 'VehiclePilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1254,7 +1254,7 @@ export type VehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -1270,13 +1270,13 @@ export type VehiclesConnection = { export type VehiclesEdge = { __typename?: 'VehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; export type AllFilmsWithVariablesQueryQueryVariables = Exact<{ - first: Scalars['Int']; + first: Scalars['Int']['input']; }>; export type AllFilmsWithVariablesQueryQuery = { diff --git a/examples/react/urql/src/gql/graphql.ts b/examples/react/urql/src/gql/graphql.ts index ee56c52ce1b..5accc591bf9 100644 --- a/examples/react/urql/src/gql/graphql.ts +++ b/examples/react/urql/src/gql/graphql.ts @@ -9,11 +9,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A single film. */ @@ -21,67 +21,67 @@ export type Film = Node & { __typename?: 'Film'; characterConnection?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The name of the director of this film. */ - director?: Maybe; + director?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** The episode number of this film. */ - episodeID?: Maybe; + episodeID?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; + openingCrawl?: Maybe; planetConnection?: Maybe; /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; + producers?: Maybe>>; /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; + releaseDate?: Maybe; speciesConnection?: Maybe; starshipConnection?: Maybe; /** The title of this film. */ - title?: Maybe; + title?: Maybe; vehicleConnection?: Maybe; }; /** A single film. */ export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -106,14 +106,14 @@ export type FilmCharactersConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmCharactersEdge = { __typename?: 'FilmCharactersEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -140,14 +140,14 @@ export type FilmPlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmPlanetsEdge = { __typename?: 'FilmPlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -174,14 +174,14 @@ export type FilmSpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmSpeciesEdge = { __typename?: 'FilmSpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -208,14 +208,14 @@ export type FilmStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmStarshipsEdge = { __typename?: 'FilmStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -233,7 +233,7 @@ export type FilmVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -249,7 +249,7 @@ export type FilmVehiclesConnection = { export type FilmVehiclesEdge = { __typename?: 'FilmVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -276,14 +276,14 @@ export type FilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmsEdge = { __typename?: 'FilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -291,20 +291,20 @@ export type FilmsEdge = { /** An object with an ID */ export type Node = { /** The id of the object. */ - id: Scalars['ID']; + id: Scalars['ID']['output']; }; /** Information about pagination in a connection. */ export type PageInfo = { __typename?: 'PageInfo'; /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; + endCursor?: Maybe; /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']; + hasNextPage: Scalars['Boolean']['output']; /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']; + hasPreviousPage: Scalars['Boolean']['output']; /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; + startCursor?: Maybe; }; /** A connection to a list of items. */ @@ -329,14 +329,14 @@ export type PeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PeopleEdge = { __typename?: 'PeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -349,39 +349,39 @@ export type Person = Node & { * Before the Battle of Yavin or After the Battle of Yavin. The Battle of Yavin is * a battle that occurs at the end of Star Wars episode IV: A New Hope. */ - birthYear?: Maybe; + birthYear?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * The eye color of this person. Will be "unknown" if not known or "n/a" if the * person does not have an eye. */ - eyeColor?: Maybe; + eyeColor?: Maybe; filmConnection?: Maybe; /** * The gender of this person. Either "Male", "Female" or "unknown", * "n/a" if the person does not have a gender. */ - gender?: Maybe; + gender?: Maybe; /** * The hair color of this person. Will be "unknown" if not known or "n/a" if the * person does not have hair. */ - hairColor?: Maybe; + hairColor?: Maybe; /** The height of the person in centimeters. */ - height?: Maybe; + height?: Maybe; /** A planet that this person was born on or inhabits. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The mass of the person in kilograms. */ - mass?: Maybe; + mass?: Maybe; /** The name of this person. */ - name?: Maybe; + name?: Maybe; /** The skin color of this person. */ - skinColor?: Maybe; + skinColor?: Maybe; /** The species that this person belongs to, or null if unknown. */ species?: Maybe; starshipConnection?: Maybe; @@ -390,26 +390,26 @@ export type Person = Node & { /** An individual person or character within the Star Wars universe. */ export type PersonFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -434,14 +434,14 @@ export type PersonFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonFilmsEdge = { __typename?: 'PersonFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -468,14 +468,14 @@ export type PersonStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonStarshipsEdge = { __typename?: 'PersonStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -493,7 +493,7 @@ export type PersonVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -509,7 +509,7 @@ export type PersonVehiclesConnection = { export type PersonVehiclesEdge = { __typename?: 'PersonVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -521,43 +521,43 @@ export type PersonVehiclesEdge = { export type Planet = Node & { __typename?: 'Planet'; /** The climates of this planet. */ - climates?: Maybe>>; + climates?: Maybe>>; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The diameter of this planet in kilometers. */ - diameter?: Maybe; + diameter?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** * A number denoting the gravity of this planet, where "1" is normal or 1 standard * G. "2" is twice or 2 standard Gs. "0.5" is half or 0.5 standard Gs. */ - gravity?: Maybe; + gravity?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The name of this planet. */ - name?: Maybe; + name?: Maybe; /** * The number of standard days it takes for this planet to complete a single orbit * of its local star. */ - orbitalPeriod?: Maybe; + orbitalPeriod?: Maybe; /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; + population?: Maybe; residentConnection?: Maybe; /** * The number of standard hours it takes for this planet to complete a single * rotation on its axis. */ - rotationPeriod?: Maybe; + rotationPeriod?: Maybe; /** * The percentage of the planet surface that is naturally occurring water or bodies * of water. */ - surfaceWater?: Maybe; + surfaceWater?: Maybe; /** The terrains of this planet. */ - terrains?: Maybe>>; + terrains?: Maybe>>; }; /** @@ -565,10 +565,10 @@ export type Planet = Node & { * 0 ABY. */ export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** @@ -576,10 +576,10 @@ export type PlanetFilmConnectionArgs = { * 0 ABY. */ export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -604,14 +604,14 @@ export type PlanetFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetFilmsEdge = { __typename?: 'PlanetFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -638,14 +638,14 @@ export type PlanetResidentsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetResidentsEdge = { __typename?: 'PlanetResidentsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -672,14 +672,14 @@ export type PlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetsEdge = { __typename?: 'PlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -703,137 +703,137 @@ export type Root = { }; export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; + filmID?: InputMaybe; + id?: InputMaybe; }; export type RootNodeArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; + id?: InputMaybe; + personID?: InputMaybe; }; export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; + id?: InputMaybe; + planetID?: InputMaybe; }; export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; + id?: InputMaybe; + speciesID?: InputMaybe; }; export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; + id?: InputMaybe; + starshipID?: InputMaybe; }; export type RootVehicleArgs = { - id?: InputMaybe; - vehicleID?: InputMaybe; + id?: InputMaybe; + vehicleID?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type Species = Node & { __typename?: 'Species'; /** The average height of this species in centimeters. */ - averageHeight?: Maybe; + averageHeight?: Maybe; /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; + averageLifespan?: Maybe; /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; + classification?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The designation of this species, such as "sentient". */ - designation?: Maybe; + designation?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * Common eye colors for this species, null if this species does not typically * have eyes. */ - eyeColors?: Maybe>>; + eyeColors?: Maybe>>; filmConnection?: Maybe; /** * Common hair colors for this species, null if this species does not typically * have hair. */ - hairColors?: Maybe>>; + hairColors?: Maybe>>; /** A planet that this species originates from. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The language commonly spoken by this species. */ - language?: Maybe; + language?: Maybe; /** The name of this species. */ - name?: Maybe; + name?: Maybe; personConnection?: Maybe; /** * Common skin colors for this species, null if this species does not typically * have skin. */ - skinColors?: Maybe>>; + skinColors?: Maybe>>; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesPersonConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -858,14 +858,14 @@ export type SpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesEdge = { __typename?: 'SpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -892,14 +892,14 @@ export type SpeciesFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesFilmsEdge = { __typename?: 'SpeciesFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -926,14 +926,14 @@ export type SpeciesPeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesPeopleEdge = { __typename?: 'SpeciesPeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -948,67 +948,67 @@ export type Starship = Node & { * the difference in speed of starships. We can assume it is similar to AU, the * distance between our Sun (Sol) and Earth. */ - MGLT?: Maybe; + MGLT?: Maybe; /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this starship can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; + hyperdriveRating?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this starship in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** * The maximum speed of this starship in atmosphere. null if this starship is * incapable of atmosphering flight. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 * Orbital Battle Station". */ - model?: Maybe; + model?: Maybe; /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** * The class of this starship, such as "Starfighter" or "Deep Space Mobile * Battlestation" */ - starshipClass?: Maybe; + starshipClass?: Maybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipPilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1033,14 +1033,14 @@ export type StarshipFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipFilmsEdge = { __typename?: 'StarshipFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1067,14 +1067,14 @@ export type StarshipPilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipPilotsEdge = { __typename?: 'StarshipPilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1101,14 +1101,14 @@ export type StarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipsEdge = { __typename?: 'StarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1117,60 +1117,60 @@ export type StarshipsEdge = { export type Vehicle = Node & { __typename?: 'Vehicle'; /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this vehicle can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this vehicle in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this vehicle. Such as "All-Terrain Attack * Transport". */ - model?: Maybe; + model?: Maybe; /** * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder * bike". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; + vehicleClass?: Maybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehicleFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehiclePilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1195,14 +1195,14 @@ export type VehicleFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehicleFilmsEdge = { __typename?: 'VehicleFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1229,14 +1229,14 @@ export type VehiclePilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehiclePilotsEdge = { __typename?: 'VehiclePilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1254,7 +1254,7 @@ export type VehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -1270,13 +1270,13 @@ export type VehiclesConnection = { export type VehiclesEdge = { __typename?: 'VehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; export type AllFilmsWithVariablesQuery199QueryVariables = Exact<{ - first: Scalars['Int']; + first: Scalars['Int']['input']; }>; export type AllFilmsWithVariablesQuery199Query = { diff --git a/examples/typescript-esm/src/gql/graphql.ts b/examples/typescript-esm/src/gql/graphql.ts index 24283c0e2d9..146255fc41b 100644 --- a/examples/typescript-esm/src/gql/graphql.ts +++ b/examples/typescript-esm/src/gql/graphql.ts @@ -9,11 +9,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A single film. */ @@ -21,67 +21,67 @@ export type Film = Node & { __typename?: 'Film'; characterConnection?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The name of the director of this film. */ - director?: Maybe; + director?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** The episode number of this film. */ - episodeID?: Maybe; + episodeID?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; + openingCrawl?: Maybe; planetConnection?: Maybe; /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; + producers?: Maybe>>; /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; + releaseDate?: Maybe; speciesConnection?: Maybe; starshipConnection?: Maybe; /** The title of this film. */ - title?: Maybe; + title?: Maybe; vehicleConnection?: Maybe; }; /** A single film. */ export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -106,14 +106,14 @@ export type FilmCharactersConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmCharactersEdge = { __typename?: 'FilmCharactersEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -140,14 +140,14 @@ export type FilmPlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmPlanetsEdge = { __typename?: 'FilmPlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -174,14 +174,14 @@ export type FilmSpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmSpeciesEdge = { __typename?: 'FilmSpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -208,14 +208,14 @@ export type FilmStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmStarshipsEdge = { __typename?: 'FilmStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -233,7 +233,7 @@ export type FilmVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -249,7 +249,7 @@ export type FilmVehiclesConnection = { export type FilmVehiclesEdge = { __typename?: 'FilmVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -276,14 +276,14 @@ export type FilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmsEdge = { __typename?: 'FilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -291,20 +291,20 @@ export type FilmsEdge = { /** An object with an ID */ export type Node = { /** The id of the object. */ - id: Scalars['ID']; + id: Scalars['ID']['output']; }; /** Information about pagination in a connection. */ export type PageInfo = { __typename?: 'PageInfo'; /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; + endCursor?: Maybe; /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']; + hasNextPage: Scalars['Boolean']['output']; /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']; + hasPreviousPage: Scalars['Boolean']['output']; /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; + startCursor?: Maybe; }; /** A connection to a list of items. */ @@ -329,14 +329,14 @@ export type PeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PeopleEdge = { __typename?: 'PeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -349,39 +349,39 @@ export type Person = Node & { * Before the Battle of Yavin or After the Battle of Yavin. The Battle of Yavin is * a battle that occurs at the end of Star Wars episode IV: A New Hope. */ - birthYear?: Maybe; + birthYear?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * The eye color of this person. Will be "unknown" if not known or "n/a" if the * person does not have an eye. */ - eyeColor?: Maybe; + eyeColor?: Maybe; filmConnection?: Maybe; /** * The gender of this person. Either "Male", "Female" or "unknown", * "n/a" if the person does not have a gender. */ - gender?: Maybe; + gender?: Maybe; /** * The hair color of this person. Will be "unknown" if not known or "n/a" if the * person does not have hair. */ - hairColor?: Maybe; + hairColor?: Maybe; /** The height of the person in centimeters. */ - height?: Maybe; + height?: Maybe; /** A planet that this person was born on or inhabits. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The mass of the person in kilograms. */ - mass?: Maybe; + mass?: Maybe; /** The name of this person. */ - name?: Maybe; + name?: Maybe; /** The skin color of this person. */ - skinColor?: Maybe; + skinColor?: Maybe; /** The species that this person belongs to, or null if unknown. */ species?: Maybe; starshipConnection?: Maybe; @@ -390,26 +390,26 @@ export type Person = Node & { /** An individual person or character within the Star Wars universe. */ export type PersonFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -434,14 +434,14 @@ export type PersonFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonFilmsEdge = { __typename?: 'PersonFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -468,14 +468,14 @@ export type PersonStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonStarshipsEdge = { __typename?: 'PersonStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -493,7 +493,7 @@ export type PersonVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -509,7 +509,7 @@ export type PersonVehiclesConnection = { export type PersonVehiclesEdge = { __typename?: 'PersonVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -521,43 +521,43 @@ export type PersonVehiclesEdge = { export type Planet = Node & { __typename?: 'Planet'; /** The climates of this planet. */ - climates?: Maybe>>; + climates?: Maybe>>; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The diameter of this planet in kilometers. */ - diameter?: Maybe; + diameter?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** * A number denoting the gravity of this planet, where "1" is normal or 1 standard * G. "2" is twice or 2 standard Gs. "0.5" is half or 0.5 standard Gs. */ - gravity?: Maybe; + gravity?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The name of this planet. */ - name?: Maybe; + name?: Maybe; /** * The number of standard days it takes for this planet to complete a single orbit * of its local star. */ - orbitalPeriod?: Maybe; + orbitalPeriod?: Maybe; /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; + population?: Maybe; residentConnection?: Maybe; /** * The number of standard hours it takes for this planet to complete a single * rotation on its axis. */ - rotationPeriod?: Maybe; + rotationPeriod?: Maybe; /** * The percentage of the planet surface that is naturally occurring water or bodies * of water. */ - surfaceWater?: Maybe; + surfaceWater?: Maybe; /** The terrains of this planet. */ - terrains?: Maybe>>; + terrains?: Maybe>>; }; /** @@ -565,10 +565,10 @@ export type Planet = Node & { * 0 ABY. */ export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** @@ -576,10 +576,10 @@ export type PlanetFilmConnectionArgs = { * 0 ABY. */ export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -604,14 +604,14 @@ export type PlanetFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetFilmsEdge = { __typename?: 'PlanetFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -638,14 +638,14 @@ export type PlanetResidentsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetResidentsEdge = { __typename?: 'PlanetResidentsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -672,14 +672,14 @@ export type PlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetsEdge = { __typename?: 'PlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -703,137 +703,137 @@ export type Root = { }; export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; + filmID?: InputMaybe; + id?: InputMaybe; }; export type RootNodeArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; + id?: InputMaybe; + personID?: InputMaybe; }; export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; + id?: InputMaybe; + planetID?: InputMaybe; }; export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; + id?: InputMaybe; + speciesID?: InputMaybe; }; export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; + id?: InputMaybe; + starshipID?: InputMaybe; }; export type RootVehicleArgs = { - id?: InputMaybe; - vehicleID?: InputMaybe; + id?: InputMaybe; + vehicleID?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type Species = Node & { __typename?: 'Species'; /** The average height of this species in centimeters. */ - averageHeight?: Maybe; + averageHeight?: Maybe; /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; + averageLifespan?: Maybe; /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; + classification?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The designation of this species, such as "sentient". */ - designation?: Maybe; + designation?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * Common eye colors for this species, null if this species does not typically * have eyes. */ - eyeColors?: Maybe>>; + eyeColors?: Maybe>>; filmConnection?: Maybe; /** * Common hair colors for this species, null if this species does not typically * have hair. */ - hairColors?: Maybe>>; + hairColors?: Maybe>>; /** A planet that this species originates from. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The language commonly spoken by this species. */ - language?: Maybe; + language?: Maybe; /** The name of this species. */ - name?: Maybe; + name?: Maybe; personConnection?: Maybe; /** * Common skin colors for this species, null if this species does not typically * have skin. */ - skinColors?: Maybe>>; + skinColors?: Maybe>>; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesPersonConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -858,14 +858,14 @@ export type SpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesEdge = { __typename?: 'SpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -892,14 +892,14 @@ export type SpeciesFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesFilmsEdge = { __typename?: 'SpeciesFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -926,14 +926,14 @@ export type SpeciesPeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesPeopleEdge = { __typename?: 'SpeciesPeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -948,67 +948,67 @@ export type Starship = Node & { * the difference in speed of starships. We can assume it is similar to AU, the * distance between our Sun (Sol) and Earth. */ - MGLT?: Maybe; + MGLT?: Maybe; /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this starship can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; + hyperdriveRating?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this starship in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** * The maximum speed of this starship in atmosphere. null if this starship is * incapable of atmosphering flight. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 * Orbital Battle Station". */ - model?: Maybe; + model?: Maybe; /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** * The class of this starship, such as "Starfighter" or "Deep Space Mobile * Battlestation" */ - starshipClass?: Maybe; + starshipClass?: Maybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipPilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1033,14 +1033,14 @@ export type StarshipFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipFilmsEdge = { __typename?: 'StarshipFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1067,14 +1067,14 @@ export type StarshipPilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipPilotsEdge = { __typename?: 'StarshipPilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1101,14 +1101,14 @@ export type StarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipsEdge = { __typename?: 'StarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1117,60 +1117,60 @@ export type StarshipsEdge = { export type Vehicle = Node & { __typename?: 'Vehicle'; /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this vehicle can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this vehicle in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this vehicle. Such as "All-Terrain Attack * Transport". */ - model?: Maybe; + model?: Maybe; /** * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder * bike". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; + vehicleClass?: Maybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehicleFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehiclePilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1195,14 +1195,14 @@ export type VehicleFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehicleFilmsEdge = { __typename?: 'VehicleFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1229,14 +1229,14 @@ export type VehiclePilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehiclePilotsEdge = { __typename?: 'VehiclePilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1254,7 +1254,7 @@ export type VehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -1270,7 +1270,7 @@ export type VehiclesConnection = { export type VehiclesEdge = { __typename?: 'VehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1293,7 +1293,7 @@ export type AllPeopleQueryQuery = { }; export type AllPeopleWithVariablesQueryQueryVariables = Exact<{ - first: Scalars['Int']; + first: Scalars['Int']['input']; }>; export type AllPeopleWithVariablesQueryQuery = { diff --git a/examples/typescript-graphql-request/src/gql/graphql.ts b/examples/typescript-graphql-request/src/gql/graphql.ts index a849c32238d..5901e1fee79 100644 --- a/examples/typescript-graphql-request/src/gql/graphql.ts +++ b/examples/typescript-graphql-request/src/gql/graphql.ts @@ -9,11 +9,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A single film. */ @@ -21,67 +21,67 @@ export type Film = Node & { __typename?: 'Film'; characterConnection?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The name of the director of this film. */ - director?: Maybe; + director?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** The episode number of this film. */ - episodeID?: Maybe; + episodeID?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; + openingCrawl?: Maybe; planetConnection?: Maybe; /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; + producers?: Maybe>>; /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; + releaseDate?: Maybe; speciesConnection?: Maybe; starshipConnection?: Maybe; /** The title of this film. */ - title?: Maybe; + title?: Maybe; vehicleConnection?: Maybe; }; /** A single film. */ export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -106,14 +106,14 @@ export type FilmCharactersConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmCharactersEdge = { __typename?: 'FilmCharactersEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -140,14 +140,14 @@ export type FilmPlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmPlanetsEdge = { __typename?: 'FilmPlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -174,14 +174,14 @@ export type FilmSpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmSpeciesEdge = { __typename?: 'FilmSpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -208,14 +208,14 @@ export type FilmStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmStarshipsEdge = { __typename?: 'FilmStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -233,7 +233,7 @@ export type FilmVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -249,7 +249,7 @@ export type FilmVehiclesConnection = { export type FilmVehiclesEdge = { __typename?: 'FilmVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -276,14 +276,14 @@ export type FilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmsEdge = { __typename?: 'FilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -291,20 +291,20 @@ export type FilmsEdge = { /** An object with an ID */ export type Node = { /** The id of the object. */ - id: Scalars['ID']; + id: Scalars['ID']['output']; }; /** Information about pagination in a connection. */ export type PageInfo = { __typename?: 'PageInfo'; /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; + endCursor?: Maybe; /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']; + hasNextPage: Scalars['Boolean']['output']; /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']; + hasPreviousPage: Scalars['Boolean']['output']; /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; + startCursor?: Maybe; }; /** A connection to a list of items. */ @@ -329,14 +329,14 @@ export type PeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PeopleEdge = { __typename?: 'PeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -349,39 +349,39 @@ export type Person = Node & { * Before the Battle of Yavin or After the Battle of Yavin. The Battle of Yavin is * a battle that occurs at the end of Star Wars episode IV: A New Hope. */ - birthYear?: Maybe; + birthYear?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * The eye color of this person. Will be "unknown" if not known or "n/a" if the * person does not have an eye. */ - eyeColor?: Maybe; + eyeColor?: Maybe; filmConnection?: Maybe; /** * The gender of this person. Either "Male", "Female" or "unknown", * "n/a" if the person does not have a gender. */ - gender?: Maybe; + gender?: Maybe; /** * The hair color of this person. Will be "unknown" if not known or "n/a" if the * person does not have hair. */ - hairColor?: Maybe; + hairColor?: Maybe; /** The height of the person in centimeters. */ - height?: Maybe; + height?: Maybe; /** A planet that this person was born on or inhabits. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The mass of the person in kilograms. */ - mass?: Maybe; + mass?: Maybe; /** The name of this person. */ - name?: Maybe; + name?: Maybe; /** The skin color of this person. */ - skinColor?: Maybe; + skinColor?: Maybe; /** The species that this person belongs to, or null if unknown. */ species?: Maybe; starshipConnection?: Maybe; @@ -390,26 +390,26 @@ export type Person = Node & { /** An individual person or character within the Star Wars universe. */ export type PersonFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -434,14 +434,14 @@ export type PersonFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonFilmsEdge = { __typename?: 'PersonFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -468,14 +468,14 @@ export type PersonStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonStarshipsEdge = { __typename?: 'PersonStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -493,7 +493,7 @@ export type PersonVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -509,7 +509,7 @@ export type PersonVehiclesConnection = { export type PersonVehiclesEdge = { __typename?: 'PersonVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -521,43 +521,43 @@ export type PersonVehiclesEdge = { export type Planet = Node & { __typename?: 'Planet'; /** The climates of this planet. */ - climates?: Maybe>>; + climates?: Maybe>>; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The diameter of this planet in kilometers. */ - diameter?: Maybe; + diameter?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** * A number denoting the gravity of this planet, where "1" is normal or 1 standard * G. "2" is twice or 2 standard Gs. "0.5" is half or 0.5 standard Gs. */ - gravity?: Maybe; + gravity?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The name of this planet. */ - name?: Maybe; + name?: Maybe; /** * The number of standard days it takes for this planet to complete a single orbit * of its local star. */ - orbitalPeriod?: Maybe; + orbitalPeriod?: Maybe; /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; + population?: Maybe; residentConnection?: Maybe; /** * The number of standard hours it takes for this planet to complete a single * rotation on its axis. */ - rotationPeriod?: Maybe; + rotationPeriod?: Maybe; /** * The percentage of the planet surface that is naturally occurring water or bodies * of water. */ - surfaceWater?: Maybe; + surfaceWater?: Maybe; /** The terrains of this planet. */ - terrains?: Maybe>>; + terrains?: Maybe>>; }; /** @@ -565,10 +565,10 @@ export type Planet = Node & { * 0 ABY. */ export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** @@ -576,10 +576,10 @@ export type PlanetFilmConnectionArgs = { * 0 ABY. */ export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -604,14 +604,14 @@ export type PlanetFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetFilmsEdge = { __typename?: 'PlanetFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -638,14 +638,14 @@ export type PlanetResidentsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetResidentsEdge = { __typename?: 'PlanetResidentsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -672,14 +672,14 @@ export type PlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetsEdge = { __typename?: 'PlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -703,137 +703,137 @@ export type Root = { }; export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; + filmID?: InputMaybe; + id?: InputMaybe; }; export type RootNodeArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; + id?: InputMaybe; + personID?: InputMaybe; }; export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; + id?: InputMaybe; + planetID?: InputMaybe; }; export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; + id?: InputMaybe; + speciesID?: InputMaybe; }; export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; + id?: InputMaybe; + starshipID?: InputMaybe; }; export type RootVehicleArgs = { - id?: InputMaybe; - vehicleID?: InputMaybe; + id?: InputMaybe; + vehicleID?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type Species = Node & { __typename?: 'Species'; /** The average height of this species in centimeters. */ - averageHeight?: Maybe; + averageHeight?: Maybe; /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; + averageLifespan?: Maybe; /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; + classification?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The designation of this species, such as "sentient". */ - designation?: Maybe; + designation?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * Common eye colors for this species, null if this species does not typically * have eyes. */ - eyeColors?: Maybe>>; + eyeColors?: Maybe>>; filmConnection?: Maybe; /** * Common hair colors for this species, null if this species does not typically * have hair. */ - hairColors?: Maybe>>; + hairColors?: Maybe>>; /** A planet that this species originates from. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The language commonly spoken by this species. */ - language?: Maybe; + language?: Maybe; /** The name of this species. */ - name?: Maybe; + name?: Maybe; personConnection?: Maybe; /** * Common skin colors for this species, null if this species does not typically * have skin. */ - skinColors?: Maybe>>; + skinColors?: Maybe>>; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesPersonConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -858,14 +858,14 @@ export type SpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesEdge = { __typename?: 'SpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -892,14 +892,14 @@ export type SpeciesFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesFilmsEdge = { __typename?: 'SpeciesFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -926,14 +926,14 @@ export type SpeciesPeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesPeopleEdge = { __typename?: 'SpeciesPeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -948,67 +948,67 @@ export type Starship = Node & { * the difference in speed of starships. We can assume it is similar to AU, the * distance between our Sun (Sol) and Earth. */ - MGLT?: Maybe; + MGLT?: Maybe; /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this starship can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; + hyperdriveRating?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this starship in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** * The maximum speed of this starship in atmosphere. null if this starship is * incapable of atmosphering flight. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 * Orbital Battle Station". */ - model?: Maybe; + model?: Maybe; /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** * The class of this starship, such as "Starfighter" or "Deep Space Mobile * Battlestation" */ - starshipClass?: Maybe; + starshipClass?: Maybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipPilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1033,14 +1033,14 @@ export type StarshipFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipFilmsEdge = { __typename?: 'StarshipFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1067,14 +1067,14 @@ export type StarshipPilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipPilotsEdge = { __typename?: 'StarshipPilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1101,14 +1101,14 @@ export type StarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipsEdge = { __typename?: 'StarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1117,60 +1117,60 @@ export type StarshipsEdge = { export type Vehicle = Node & { __typename?: 'Vehicle'; /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this vehicle can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this vehicle in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this vehicle. Such as "All-Terrain Attack * Transport". */ - model?: Maybe; + model?: Maybe; /** * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder * bike". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; + vehicleClass?: Maybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehicleFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehiclePilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1195,14 +1195,14 @@ export type VehicleFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehicleFilmsEdge = { __typename?: 'VehicleFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1229,14 +1229,14 @@ export type VehiclePilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehiclePilotsEdge = { __typename?: 'VehiclePilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1254,7 +1254,7 @@ export type VehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -1270,7 +1270,7 @@ export type VehiclesConnection = { export type VehiclesEdge = { __typename?: 'VehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1293,7 +1293,7 @@ export type AllPeopleQueryQuery = { }; export type AllPeopleWithVariablesQueryQueryVariables = Exact<{ - first: Scalars['Int']; + first: Scalars['Int']['input']; }>; export type AllPeopleWithVariablesQueryQuery = { diff --git a/examples/typescript-resolvers/src/type-defs.d.ts b/examples/typescript-resolvers/src/type-defs.d.ts index 3efc5d2730b..bd309a8b918 100644 --- a/examples/typescript-resolvers/src/type-defs.d.ts +++ b/examples/typescript-resolvers/src/type-defs.d.ts @@ -9,17 +9,17 @@ export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | export type RequireFields = Omit & { [P in K]-?: NonNullable }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; export type Mutation = { __typename?: 'Mutation'; - calculateSum: Scalars['Float']; - echoString: Scalars['String']; + calculateSum: Scalars['Float']['output']; + echoString: Scalars['String']['output']; }; export type MutationCalculateSumArgs = { @@ -27,17 +27,17 @@ export type MutationCalculateSumArgs = { }; export type MutationEchoStringArgs = { - str: Scalars['String']; + str: Scalars['String']['input']; }; export type Query = { __typename?: 'Query'; - hello: Scalars['String']; + hello: Scalars['String']['output']; }; export type SumInput = { - a: Scalars['Float']; - b: Scalars['Float']; + a: Scalars['Float']['input']; + b: Scalars['Float']['input']; }; export type ResolverTypeWrapper = Promise | T; @@ -112,21 +112,21 @@ export type DirectiveResolverFn; - Float: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; + Float: ResolverTypeWrapper; Mutation: ResolverTypeWrapper<{}>; Query: ResolverTypeWrapper<{}>; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; SumInput: SumInput; }; /** Mapping between all available schema types and the resolvers parents */ export type ResolversParentTypes = { - Boolean: Scalars['Boolean']; - Float: Scalars['Float']; + Boolean: Scalars['Boolean']['output']; + Float: Scalars['Float']['output']; Mutation: {}; Query: {}; - String: Scalars['String']; + String: Scalars['String']['output']; SumInput: SumInput; }; diff --git a/examples/vite/vite-react-cts/src/gql/graphql.ts b/examples/vite/vite-react-cts/src/gql/graphql.ts index 5b8106ff6f1..fbd1809a391 100644 --- a/examples/vite/vite-react-cts/src/gql/graphql.ts +++ b/examples/vite/vite-react-cts/src/gql/graphql.ts @@ -9,11 +9,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A single film. */ @@ -21,67 +21,67 @@ export type Film = Node & { __typename?: 'Film'; characterConnection?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The name of the director of this film. */ - director?: Maybe; + director?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** The episode number of this film. */ - episodeID?: Maybe; + episodeID?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; + openingCrawl?: Maybe; planetConnection?: Maybe; /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; + producers?: Maybe>>; /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; + releaseDate?: Maybe; speciesConnection?: Maybe; starshipConnection?: Maybe; /** The title of this film. */ - title?: Maybe; + title?: Maybe; vehicleConnection?: Maybe; }; /** A single film. */ export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -106,14 +106,14 @@ export type FilmCharactersConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmCharactersEdge = { __typename?: 'FilmCharactersEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -140,14 +140,14 @@ export type FilmPlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmPlanetsEdge = { __typename?: 'FilmPlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -174,14 +174,14 @@ export type FilmSpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmSpeciesEdge = { __typename?: 'FilmSpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -208,14 +208,14 @@ export type FilmStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmStarshipsEdge = { __typename?: 'FilmStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -233,7 +233,7 @@ export type FilmVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -249,7 +249,7 @@ export type FilmVehiclesConnection = { export type FilmVehiclesEdge = { __typename?: 'FilmVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -276,14 +276,14 @@ export type FilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmsEdge = { __typename?: 'FilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -291,20 +291,20 @@ export type FilmsEdge = { /** An object with an ID */ export type Node = { /** The id of the object. */ - id: Scalars['ID']; + id: Scalars['ID']['output']; }; /** Information about pagination in a connection. */ export type PageInfo = { __typename?: 'PageInfo'; /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; + endCursor?: Maybe; /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']; + hasNextPage: Scalars['Boolean']['output']; /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']; + hasPreviousPage: Scalars['Boolean']['output']; /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; + startCursor?: Maybe; }; /** A connection to a list of items. */ @@ -329,14 +329,14 @@ export type PeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PeopleEdge = { __typename?: 'PeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -349,39 +349,39 @@ export type Person = Node & { * Before the Battle of Yavin or After the Battle of Yavin. The Battle of Yavin is * a battle that occurs at the end of Star Wars episode IV: A New Hope. */ - birthYear?: Maybe; + birthYear?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * The eye color of this person. Will be "unknown" if not known or "n/a" if the * person does not have an eye. */ - eyeColor?: Maybe; + eyeColor?: Maybe; filmConnection?: Maybe; /** * The gender of this person. Either "Male", "Female" or "unknown", * "n/a" if the person does not have a gender. */ - gender?: Maybe; + gender?: Maybe; /** * The hair color of this person. Will be "unknown" if not known or "n/a" if the * person does not have hair. */ - hairColor?: Maybe; + hairColor?: Maybe; /** The height of the person in centimeters. */ - height?: Maybe; + height?: Maybe; /** A planet that this person was born on or inhabits. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The mass of the person in kilograms. */ - mass?: Maybe; + mass?: Maybe; /** The name of this person. */ - name?: Maybe; + name?: Maybe; /** The skin color of this person. */ - skinColor?: Maybe; + skinColor?: Maybe; /** The species that this person belongs to, or null if unknown. */ species?: Maybe; starshipConnection?: Maybe; @@ -390,26 +390,26 @@ export type Person = Node & { /** An individual person or character within the Star Wars universe. */ export type PersonFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -434,14 +434,14 @@ export type PersonFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonFilmsEdge = { __typename?: 'PersonFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -468,14 +468,14 @@ export type PersonStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonStarshipsEdge = { __typename?: 'PersonStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -493,7 +493,7 @@ export type PersonVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -509,7 +509,7 @@ export type PersonVehiclesConnection = { export type PersonVehiclesEdge = { __typename?: 'PersonVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -521,43 +521,43 @@ export type PersonVehiclesEdge = { export type Planet = Node & { __typename?: 'Planet'; /** The climates of this planet. */ - climates?: Maybe>>; + climates?: Maybe>>; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The diameter of this planet in kilometers. */ - diameter?: Maybe; + diameter?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** * A number denoting the gravity of this planet, where "1" is normal or 1 standard * G. "2" is twice or 2 standard Gs. "0.5" is half or 0.5 standard Gs. */ - gravity?: Maybe; + gravity?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The name of this planet. */ - name?: Maybe; + name?: Maybe; /** * The number of standard days it takes for this planet to complete a single orbit * of its local star. */ - orbitalPeriod?: Maybe; + orbitalPeriod?: Maybe; /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; + population?: Maybe; residentConnection?: Maybe; /** * The number of standard hours it takes for this planet to complete a single * rotation on its axis. */ - rotationPeriod?: Maybe; + rotationPeriod?: Maybe; /** * The percentage of the planet surface that is naturally occurring water or bodies * of water. */ - surfaceWater?: Maybe; + surfaceWater?: Maybe; /** The terrains of this planet. */ - terrains?: Maybe>>; + terrains?: Maybe>>; }; /** @@ -565,10 +565,10 @@ export type Planet = Node & { * 0 ABY. */ export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** @@ -576,10 +576,10 @@ export type PlanetFilmConnectionArgs = { * 0 ABY. */ export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -604,14 +604,14 @@ export type PlanetFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetFilmsEdge = { __typename?: 'PlanetFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -638,14 +638,14 @@ export type PlanetResidentsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetResidentsEdge = { __typename?: 'PlanetResidentsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -672,14 +672,14 @@ export type PlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetsEdge = { __typename?: 'PlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -703,137 +703,137 @@ export type Root = { }; export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; + filmID?: InputMaybe; + id?: InputMaybe; }; export type RootNodeArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; + id?: InputMaybe; + personID?: InputMaybe; }; export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; + id?: InputMaybe; + planetID?: InputMaybe; }; export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; + id?: InputMaybe; + speciesID?: InputMaybe; }; export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; + id?: InputMaybe; + starshipID?: InputMaybe; }; export type RootVehicleArgs = { - id?: InputMaybe; - vehicleID?: InputMaybe; + id?: InputMaybe; + vehicleID?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type Species = Node & { __typename?: 'Species'; /** The average height of this species in centimeters. */ - averageHeight?: Maybe; + averageHeight?: Maybe; /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; + averageLifespan?: Maybe; /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; + classification?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The designation of this species, such as "sentient". */ - designation?: Maybe; + designation?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * Common eye colors for this species, null if this species does not typically * have eyes. */ - eyeColors?: Maybe>>; + eyeColors?: Maybe>>; filmConnection?: Maybe; /** * Common hair colors for this species, null if this species does not typically * have hair. */ - hairColors?: Maybe>>; + hairColors?: Maybe>>; /** A planet that this species originates from. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The language commonly spoken by this species. */ - language?: Maybe; + language?: Maybe; /** The name of this species. */ - name?: Maybe; + name?: Maybe; personConnection?: Maybe; /** * Common skin colors for this species, null if this species does not typically * have skin. */ - skinColors?: Maybe>>; + skinColors?: Maybe>>; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesPersonConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -858,14 +858,14 @@ export type SpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesEdge = { __typename?: 'SpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -892,14 +892,14 @@ export type SpeciesFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesFilmsEdge = { __typename?: 'SpeciesFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -926,14 +926,14 @@ export type SpeciesPeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesPeopleEdge = { __typename?: 'SpeciesPeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -948,67 +948,67 @@ export type Starship = Node & { * the difference in speed of starships. We can assume it is similar to AU, the * distance between our Sun (Sol) and Earth. */ - MGLT?: Maybe; + MGLT?: Maybe; /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this starship can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; + hyperdriveRating?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this starship in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** * The maximum speed of this starship in atmosphere. null if this starship is * incapable of atmosphering flight. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 * Orbital Battle Station". */ - model?: Maybe; + model?: Maybe; /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** * The class of this starship, such as "Starfighter" or "Deep Space Mobile * Battlestation" */ - starshipClass?: Maybe; + starshipClass?: Maybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipPilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1033,14 +1033,14 @@ export type StarshipFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipFilmsEdge = { __typename?: 'StarshipFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1067,14 +1067,14 @@ export type StarshipPilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipPilotsEdge = { __typename?: 'StarshipPilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1101,14 +1101,14 @@ export type StarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipsEdge = { __typename?: 'StarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1117,60 +1117,60 @@ export type StarshipsEdge = { export type Vehicle = Node & { __typename?: 'Vehicle'; /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this vehicle can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this vehicle in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this vehicle. Such as "All-Terrain Attack * Transport". */ - model?: Maybe; + model?: Maybe; /** * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder * bike". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; + vehicleClass?: Maybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehicleFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehiclePilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1195,14 +1195,14 @@ export type VehicleFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehicleFilmsEdge = { __typename?: 'VehicleFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1229,14 +1229,14 @@ export type VehiclePilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehiclePilotsEdge = { __typename?: 'VehiclePilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1254,7 +1254,7 @@ export type VehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -1270,7 +1270,7 @@ export type VehiclesConnection = { export type VehiclesEdge = { __typename?: 'VehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1284,7 +1284,7 @@ export type FilmItemFragment = { } & { ' $fragmentName'?: 'FilmItemFragment' }; export type AllFilmsWithVariablesQueryQueryVariables = Exact<{ - first: Scalars['Int']; + first: Scalars['Int']['input']; }>; export type AllFilmsWithVariablesQueryQuery = { diff --git a/examples/vite/vite-react-mts/src/gql/graphql.ts b/examples/vite/vite-react-mts/src/gql/graphql.ts index 5b8106ff6f1..fbd1809a391 100644 --- a/examples/vite/vite-react-mts/src/gql/graphql.ts +++ b/examples/vite/vite-react-mts/src/gql/graphql.ts @@ -9,11 +9,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A single film. */ @@ -21,67 +21,67 @@ export type Film = Node & { __typename?: 'Film'; characterConnection?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The name of the director of this film. */ - director?: Maybe; + director?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** The episode number of this film. */ - episodeID?: Maybe; + episodeID?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; + openingCrawl?: Maybe; planetConnection?: Maybe; /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; + producers?: Maybe>>; /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; + releaseDate?: Maybe; speciesConnection?: Maybe; starshipConnection?: Maybe; /** The title of this film. */ - title?: Maybe; + title?: Maybe; vehicleConnection?: Maybe; }; /** A single film. */ export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -106,14 +106,14 @@ export type FilmCharactersConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmCharactersEdge = { __typename?: 'FilmCharactersEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -140,14 +140,14 @@ export type FilmPlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmPlanetsEdge = { __typename?: 'FilmPlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -174,14 +174,14 @@ export type FilmSpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmSpeciesEdge = { __typename?: 'FilmSpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -208,14 +208,14 @@ export type FilmStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmStarshipsEdge = { __typename?: 'FilmStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -233,7 +233,7 @@ export type FilmVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -249,7 +249,7 @@ export type FilmVehiclesConnection = { export type FilmVehiclesEdge = { __typename?: 'FilmVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -276,14 +276,14 @@ export type FilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmsEdge = { __typename?: 'FilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -291,20 +291,20 @@ export type FilmsEdge = { /** An object with an ID */ export type Node = { /** The id of the object. */ - id: Scalars['ID']; + id: Scalars['ID']['output']; }; /** Information about pagination in a connection. */ export type PageInfo = { __typename?: 'PageInfo'; /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; + endCursor?: Maybe; /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']; + hasNextPage: Scalars['Boolean']['output']; /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']; + hasPreviousPage: Scalars['Boolean']['output']; /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; + startCursor?: Maybe; }; /** A connection to a list of items. */ @@ -329,14 +329,14 @@ export type PeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PeopleEdge = { __typename?: 'PeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -349,39 +349,39 @@ export type Person = Node & { * Before the Battle of Yavin or After the Battle of Yavin. The Battle of Yavin is * a battle that occurs at the end of Star Wars episode IV: A New Hope. */ - birthYear?: Maybe; + birthYear?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * The eye color of this person. Will be "unknown" if not known or "n/a" if the * person does not have an eye. */ - eyeColor?: Maybe; + eyeColor?: Maybe; filmConnection?: Maybe; /** * The gender of this person. Either "Male", "Female" or "unknown", * "n/a" if the person does not have a gender. */ - gender?: Maybe; + gender?: Maybe; /** * The hair color of this person. Will be "unknown" if not known or "n/a" if the * person does not have hair. */ - hairColor?: Maybe; + hairColor?: Maybe; /** The height of the person in centimeters. */ - height?: Maybe; + height?: Maybe; /** A planet that this person was born on or inhabits. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The mass of the person in kilograms. */ - mass?: Maybe; + mass?: Maybe; /** The name of this person. */ - name?: Maybe; + name?: Maybe; /** The skin color of this person. */ - skinColor?: Maybe; + skinColor?: Maybe; /** The species that this person belongs to, or null if unknown. */ species?: Maybe; starshipConnection?: Maybe; @@ -390,26 +390,26 @@ export type Person = Node & { /** An individual person or character within the Star Wars universe. */ export type PersonFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -434,14 +434,14 @@ export type PersonFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonFilmsEdge = { __typename?: 'PersonFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -468,14 +468,14 @@ export type PersonStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonStarshipsEdge = { __typename?: 'PersonStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -493,7 +493,7 @@ export type PersonVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -509,7 +509,7 @@ export type PersonVehiclesConnection = { export type PersonVehiclesEdge = { __typename?: 'PersonVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -521,43 +521,43 @@ export type PersonVehiclesEdge = { export type Planet = Node & { __typename?: 'Planet'; /** The climates of this planet. */ - climates?: Maybe>>; + climates?: Maybe>>; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The diameter of this planet in kilometers. */ - diameter?: Maybe; + diameter?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** * A number denoting the gravity of this planet, where "1" is normal or 1 standard * G. "2" is twice or 2 standard Gs. "0.5" is half or 0.5 standard Gs. */ - gravity?: Maybe; + gravity?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The name of this planet. */ - name?: Maybe; + name?: Maybe; /** * The number of standard days it takes for this planet to complete a single orbit * of its local star. */ - orbitalPeriod?: Maybe; + orbitalPeriod?: Maybe; /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; + population?: Maybe; residentConnection?: Maybe; /** * The number of standard hours it takes for this planet to complete a single * rotation on its axis. */ - rotationPeriod?: Maybe; + rotationPeriod?: Maybe; /** * The percentage of the planet surface that is naturally occurring water or bodies * of water. */ - surfaceWater?: Maybe; + surfaceWater?: Maybe; /** The terrains of this planet. */ - terrains?: Maybe>>; + terrains?: Maybe>>; }; /** @@ -565,10 +565,10 @@ export type Planet = Node & { * 0 ABY. */ export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** @@ -576,10 +576,10 @@ export type PlanetFilmConnectionArgs = { * 0 ABY. */ export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -604,14 +604,14 @@ export type PlanetFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetFilmsEdge = { __typename?: 'PlanetFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -638,14 +638,14 @@ export type PlanetResidentsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetResidentsEdge = { __typename?: 'PlanetResidentsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -672,14 +672,14 @@ export type PlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetsEdge = { __typename?: 'PlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -703,137 +703,137 @@ export type Root = { }; export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; + filmID?: InputMaybe; + id?: InputMaybe; }; export type RootNodeArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; + id?: InputMaybe; + personID?: InputMaybe; }; export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; + id?: InputMaybe; + planetID?: InputMaybe; }; export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; + id?: InputMaybe; + speciesID?: InputMaybe; }; export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; + id?: InputMaybe; + starshipID?: InputMaybe; }; export type RootVehicleArgs = { - id?: InputMaybe; - vehicleID?: InputMaybe; + id?: InputMaybe; + vehicleID?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type Species = Node & { __typename?: 'Species'; /** The average height of this species in centimeters. */ - averageHeight?: Maybe; + averageHeight?: Maybe; /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; + averageLifespan?: Maybe; /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; + classification?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The designation of this species, such as "sentient". */ - designation?: Maybe; + designation?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * Common eye colors for this species, null if this species does not typically * have eyes. */ - eyeColors?: Maybe>>; + eyeColors?: Maybe>>; filmConnection?: Maybe; /** * Common hair colors for this species, null if this species does not typically * have hair. */ - hairColors?: Maybe>>; + hairColors?: Maybe>>; /** A planet that this species originates from. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The language commonly spoken by this species. */ - language?: Maybe; + language?: Maybe; /** The name of this species. */ - name?: Maybe; + name?: Maybe; personConnection?: Maybe; /** * Common skin colors for this species, null if this species does not typically * have skin. */ - skinColors?: Maybe>>; + skinColors?: Maybe>>; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesPersonConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -858,14 +858,14 @@ export type SpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesEdge = { __typename?: 'SpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -892,14 +892,14 @@ export type SpeciesFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesFilmsEdge = { __typename?: 'SpeciesFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -926,14 +926,14 @@ export type SpeciesPeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesPeopleEdge = { __typename?: 'SpeciesPeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -948,67 +948,67 @@ export type Starship = Node & { * the difference in speed of starships. We can assume it is similar to AU, the * distance between our Sun (Sol) and Earth. */ - MGLT?: Maybe; + MGLT?: Maybe; /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this starship can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; + hyperdriveRating?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this starship in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** * The maximum speed of this starship in atmosphere. null if this starship is * incapable of atmosphering flight. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 * Orbital Battle Station". */ - model?: Maybe; + model?: Maybe; /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** * The class of this starship, such as "Starfighter" or "Deep Space Mobile * Battlestation" */ - starshipClass?: Maybe; + starshipClass?: Maybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipPilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1033,14 +1033,14 @@ export type StarshipFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipFilmsEdge = { __typename?: 'StarshipFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1067,14 +1067,14 @@ export type StarshipPilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipPilotsEdge = { __typename?: 'StarshipPilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1101,14 +1101,14 @@ export type StarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipsEdge = { __typename?: 'StarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1117,60 +1117,60 @@ export type StarshipsEdge = { export type Vehicle = Node & { __typename?: 'Vehicle'; /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this vehicle can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this vehicle in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this vehicle. Such as "All-Terrain Attack * Transport". */ - model?: Maybe; + model?: Maybe; /** * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder * bike". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; + vehicleClass?: Maybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehicleFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehiclePilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1195,14 +1195,14 @@ export type VehicleFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehicleFilmsEdge = { __typename?: 'VehicleFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1229,14 +1229,14 @@ export type VehiclePilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehiclePilotsEdge = { __typename?: 'VehiclePilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1254,7 +1254,7 @@ export type VehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -1270,7 +1270,7 @@ export type VehiclesConnection = { export type VehiclesEdge = { __typename?: 'VehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1284,7 +1284,7 @@ export type FilmItemFragment = { } & { ' $fragmentName'?: 'FilmItemFragment' }; export type AllFilmsWithVariablesQueryQueryVariables = Exact<{ - first: Scalars['Int']; + first: Scalars['Int']['input']; }>; export type AllFilmsWithVariablesQueryQuery = { diff --git a/examples/vite/vite-react-ts/src/gql/graphql.ts b/examples/vite/vite-react-ts/src/gql/graphql.ts index 5b8106ff6f1..fbd1809a391 100644 --- a/examples/vite/vite-react-ts/src/gql/graphql.ts +++ b/examples/vite/vite-react-ts/src/gql/graphql.ts @@ -9,11 +9,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A single film. */ @@ -21,67 +21,67 @@ export type Film = Node & { __typename?: 'Film'; characterConnection?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The name of the director of this film. */ - director?: Maybe; + director?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** The episode number of this film. */ - episodeID?: Maybe; + episodeID?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; + openingCrawl?: Maybe; planetConnection?: Maybe; /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; + producers?: Maybe>>; /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; + releaseDate?: Maybe; speciesConnection?: Maybe; starshipConnection?: Maybe; /** The title of this film. */ - title?: Maybe; + title?: Maybe; vehicleConnection?: Maybe; }; /** A single film. */ export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -106,14 +106,14 @@ export type FilmCharactersConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmCharactersEdge = { __typename?: 'FilmCharactersEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -140,14 +140,14 @@ export type FilmPlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmPlanetsEdge = { __typename?: 'FilmPlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -174,14 +174,14 @@ export type FilmSpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmSpeciesEdge = { __typename?: 'FilmSpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -208,14 +208,14 @@ export type FilmStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmStarshipsEdge = { __typename?: 'FilmStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -233,7 +233,7 @@ export type FilmVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -249,7 +249,7 @@ export type FilmVehiclesConnection = { export type FilmVehiclesEdge = { __typename?: 'FilmVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -276,14 +276,14 @@ export type FilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmsEdge = { __typename?: 'FilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -291,20 +291,20 @@ export type FilmsEdge = { /** An object with an ID */ export type Node = { /** The id of the object. */ - id: Scalars['ID']; + id: Scalars['ID']['output']; }; /** Information about pagination in a connection. */ export type PageInfo = { __typename?: 'PageInfo'; /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; + endCursor?: Maybe; /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']; + hasNextPage: Scalars['Boolean']['output']; /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']; + hasPreviousPage: Scalars['Boolean']['output']; /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; + startCursor?: Maybe; }; /** A connection to a list of items. */ @@ -329,14 +329,14 @@ export type PeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PeopleEdge = { __typename?: 'PeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -349,39 +349,39 @@ export type Person = Node & { * Before the Battle of Yavin or After the Battle of Yavin. The Battle of Yavin is * a battle that occurs at the end of Star Wars episode IV: A New Hope. */ - birthYear?: Maybe; + birthYear?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * The eye color of this person. Will be "unknown" if not known or "n/a" if the * person does not have an eye. */ - eyeColor?: Maybe; + eyeColor?: Maybe; filmConnection?: Maybe; /** * The gender of this person. Either "Male", "Female" or "unknown", * "n/a" if the person does not have a gender. */ - gender?: Maybe; + gender?: Maybe; /** * The hair color of this person. Will be "unknown" if not known or "n/a" if the * person does not have hair. */ - hairColor?: Maybe; + hairColor?: Maybe; /** The height of the person in centimeters. */ - height?: Maybe; + height?: Maybe; /** A planet that this person was born on or inhabits. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The mass of the person in kilograms. */ - mass?: Maybe; + mass?: Maybe; /** The name of this person. */ - name?: Maybe; + name?: Maybe; /** The skin color of this person. */ - skinColor?: Maybe; + skinColor?: Maybe; /** The species that this person belongs to, or null if unknown. */ species?: Maybe; starshipConnection?: Maybe; @@ -390,26 +390,26 @@ export type Person = Node & { /** An individual person or character within the Star Wars universe. */ export type PersonFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -434,14 +434,14 @@ export type PersonFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonFilmsEdge = { __typename?: 'PersonFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -468,14 +468,14 @@ export type PersonStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonStarshipsEdge = { __typename?: 'PersonStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -493,7 +493,7 @@ export type PersonVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -509,7 +509,7 @@ export type PersonVehiclesConnection = { export type PersonVehiclesEdge = { __typename?: 'PersonVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -521,43 +521,43 @@ export type PersonVehiclesEdge = { export type Planet = Node & { __typename?: 'Planet'; /** The climates of this planet. */ - climates?: Maybe>>; + climates?: Maybe>>; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The diameter of this planet in kilometers. */ - diameter?: Maybe; + diameter?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** * A number denoting the gravity of this planet, where "1" is normal or 1 standard * G. "2" is twice or 2 standard Gs. "0.5" is half or 0.5 standard Gs. */ - gravity?: Maybe; + gravity?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The name of this planet. */ - name?: Maybe; + name?: Maybe; /** * The number of standard days it takes for this planet to complete a single orbit * of its local star. */ - orbitalPeriod?: Maybe; + orbitalPeriod?: Maybe; /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; + population?: Maybe; residentConnection?: Maybe; /** * The number of standard hours it takes for this planet to complete a single * rotation on its axis. */ - rotationPeriod?: Maybe; + rotationPeriod?: Maybe; /** * The percentage of the planet surface that is naturally occurring water or bodies * of water. */ - surfaceWater?: Maybe; + surfaceWater?: Maybe; /** The terrains of this planet. */ - terrains?: Maybe>>; + terrains?: Maybe>>; }; /** @@ -565,10 +565,10 @@ export type Planet = Node & { * 0 ABY. */ export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** @@ -576,10 +576,10 @@ export type PlanetFilmConnectionArgs = { * 0 ABY. */ export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -604,14 +604,14 @@ export type PlanetFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetFilmsEdge = { __typename?: 'PlanetFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -638,14 +638,14 @@ export type PlanetResidentsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetResidentsEdge = { __typename?: 'PlanetResidentsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -672,14 +672,14 @@ export type PlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetsEdge = { __typename?: 'PlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -703,137 +703,137 @@ export type Root = { }; export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; + filmID?: InputMaybe; + id?: InputMaybe; }; export type RootNodeArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; + id?: InputMaybe; + personID?: InputMaybe; }; export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; + id?: InputMaybe; + planetID?: InputMaybe; }; export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; + id?: InputMaybe; + speciesID?: InputMaybe; }; export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; + id?: InputMaybe; + starshipID?: InputMaybe; }; export type RootVehicleArgs = { - id?: InputMaybe; - vehicleID?: InputMaybe; + id?: InputMaybe; + vehicleID?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type Species = Node & { __typename?: 'Species'; /** The average height of this species in centimeters. */ - averageHeight?: Maybe; + averageHeight?: Maybe; /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; + averageLifespan?: Maybe; /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; + classification?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The designation of this species, such as "sentient". */ - designation?: Maybe; + designation?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * Common eye colors for this species, null if this species does not typically * have eyes. */ - eyeColors?: Maybe>>; + eyeColors?: Maybe>>; filmConnection?: Maybe; /** * Common hair colors for this species, null if this species does not typically * have hair. */ - hairColors?: Maybe>>; + hairColors?: Maybe>>; /** A planet that this species originates from. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The language commonly spoken by this species. */ - language?: Maybe; + language?: Maybe; /** The name of this species. */ - name?: Maybe; + name?: Maybe; personConnection?: Maybe; /** * Common skin colors for this species, null if this species does not typically * have skin. */ - skinColors?: Maybe>>; + skinColors?: Maybe>>; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesPersonConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -858,14 +858,14 @@ export type SpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesEdge = { __typename?: 'SpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -892,14 +892,14 @@ export type SpeciesFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesFilmsEdge = { __typename?: 'SpeciesFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -926,14 +926,14 @@ export type SpeciesPeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesPeopleEdge = { __typename?: 'SpeciesPeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -948,67 +948,67 @@ export type Starship = Node & { * the difference in speed of starships. We can assume it is similar to AU, the * distance between our Sun (Sol) and Earth. */ - MGLT?: Maybe; + MGLT?: Maybe; /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this starship can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; + hyperdriveRating?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this starship in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** * The maximum speed of this starship in atmosphere. null if this starship is * incapable of atmosphering flight. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 * Orbital Battle Station". */ - model?: Maybe; + model?: Maybe; /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** * The class of this starship, such as "Starfighter" or "Deep Space Mobile * Battlestation" */ - starshipClass?: Maybe; + starshipClass?: Maybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipPilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1033,14 +1033,14 @@ export type StarshipFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipFilmsEdge = { __typename?: 'StarshipFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1067,14 +1067,14 @@ export type StarshipPilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipPilotsEdge = { __typename?: 'StarshipPilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1101,14 +1101,14 @@ export type StarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipsEdge = { __typename?: 'StarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1117,60 +1117,60 @@ export type StarshipsEdge = { export type Vehicle = Node & { __typename?: 'Vehicle'; /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this vehicle can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this vehicle in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this vehicle. Such as "All-Terrain Attack * Transport". */ - model?: Maybe; + model?: Maybe; /** * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder * bike". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; + vehicleClass?: Maybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehicleFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehiclePilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1195,14 +1195,14 @@ export type VehicleFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehicleFilmsEdge = { __typename?: 'VehicleFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1229,14 +1229,14 @@ export type VehiclePilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehiclePilotsEdge = { __typename?: 'VehiclePilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1254,7 +1254,7 @@ export type VehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -1270,7 +1270,7 @@ export type VehiclesConnection = { export type VehiclesEdge = { __typename?: 'VehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1284,7 +1284,7 @@ export type FilmItemFragment = { } & { ' $fragmentName'?: 'FilmItemFragment' }; export type AllFilmsWithVariablesQueryQueryVariables = Exact<{ - first: Scalars['Int']; + first: Scalars['Int']['input']; }>; export type AllFilmsWithVariablesQueryQuery = { diff --git a/examples/vue/apollo-composable/src/gql/graphql.ts b/examples/vue/apollo-composable/src/gql/graphql.ts index a70aaf50ae7..b4dfb1e7039 100644 --- a/examples/vue/apollo-composable/src/gql/graphql.ts +++ b/examples/vue/apollo-composable/src/gql/graphql.ts @@ -9,11 +9,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A single film. */ @@ -21,67 +21,67 @@ export type Film = Node & { __typename?: 'Film'; characterConnection?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The name of the director of this film. */ - director?: Maybe; + director?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** The episode number of this film. */ - episodeID?: Maybe; + episodeID?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; + openingCrawl?: Maybe; planetConnection?: Maybe; /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; + producers?: Maybe>>; /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; + releaseDate?: Maybe; speciesConnection?: Maybe; starshipConnection?: Maybe; /** The title of this film. */ - title?: Maybe; + title?: Maybe; vehicleConnection?: Maybe; }; /** A single film. */ export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -106,14 +106,14 @@ export type FilmCharactersConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmCharactersEdge = { __typename?: 'FilmCharactersEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -140,14 +140,14 @@ export type FilmPlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmPlanetsEdge = { __typename?: 'FilmPlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -174,14 +174,14 @@ export type FilmSpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmSpeciesEdge = { __typename?: 'FilmSpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -208,14 +208,14 @@ export type FilmStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmStarshipsEdge = { __typename?: 'FilmStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -233,7 +233,7 @@ export type FilmVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -249,7 +249,7 @@ export type FilmVehiclesConnection = { export type FilmVehiclesEdge = { __typename?: 'FilmVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -276,14 +276,14 @@ export type FilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmsEdge = { __typename?: 'FilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -291,20 +291,20 @@ export type FilmsEdge = { /** An object with an ID */ export type Node = { /** The id of the object. */ - id: Scalars['ID']; + id: Scalars['ID']['output']; }; /** Information about pagination in a connection. */ export type PageInfo = { __typename?: 'PageInfo'; /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; + endCursor?: Maybe; /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']; + hasNextPage: Scalars['Boolean']['output']; /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']; + hasPreviousPage: Scalars['Boolean']['output']; /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; + startCursor?: Maybe; }; /** A connection to a list of items. */ @@ -329,14 +329,14 @@ export type PeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PeopleEdge = { __typename?: 'PeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -349,39 +349,39 @@ export type Person = Node & { * Before the Battle of Yavin or After the Battle of Yavin. The Battle of Yavin is * a battle that occurs at the end of Star Wars episode IV: A New Hope. */ - birthYear?: Maybe; + birthYear?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * The eye color of this person. Will be "unknown" if not known or "n/a" if the * person does not have an eye. */ - eyeColor?: Maybe; + eyeColor?: Maybe; filmConnection?: Maybe; /** * The gender of this person. Either "Male", "Female" or "unknown", * "n/a" if the person does not have a gender. */ - gender?: Maybe; + gender?: Maybe; /** * The hair color of this person. Will be "unknown" if not known or "n/a" if the * person does not have hair. */ - hairColor?: Maybe; + hairColor?: Maybe; /** The height of the person in centimeters. */ - height?: Maybe; + height?: Maybe; /** A planet that this person was born on or inhabits. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The mass of the person in kilograms. */ - mass?: Maybe; + mass?: Maybe; /** The name of this person. */ - name?: Maybe; + name?: Maybe; /** The skin color of this person. */ - skinColor?: Maybe; + skinColor?: Maybe; /** The species that this person belongs to, or null if unknown. */ species?: Maybe; starshipConnection?: Maybe; @@ -390,26 +390,26 @@ export type Person = Node & { /** An individual person or character within the Star Wars universe. */ export type PersonFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -434,14 +434,14 @@ export type PersonFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonFilmsEdge = { __typename?: 'PersonFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -468,14 +468,14 @@ export type PersonStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonStarshipsEdge = { __typename?: 'PersonStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -493,7 +493,7 @@ export type PersonVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -509,7 +509,7 @@ export type PersonVehiclesConnection = { export type PersonVehiclesEdge = { __typename?: 'PersonVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -521,43 +521,43 @@ export type PersonVehiclesEdge = { export type Planet = Node & { __typename?: 'Planet'; /** The climates of this planet. */ - climates?: Maybe>>; + climates?: Maybe>>; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The diameter of this planet in kilometers. */ - diameter?: Maybe; + diameter?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** * A number denoting the gravity of this planet, where "1" is normal or 1 standard * G. "2" is twice or 2 standard Gs. "0.5" is half or 0.5 standard Gs. */ - gravity?: Maybe; + gravity?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The name of this planet. */ - name?: Maybe; + name?: Maybe; /** * The number of standard days it takes for this planet to complete a single orbit * of its local star. */ - orbitalPeriod?: Maybe; + orbitalPeriod?: Maybe; /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; + population?: Maybe; residentConnection?: Maybe; /** * The number of standard hours it takes for this planet to complete a single * rotation on its axis. */ - rotationPeriod?: Maybe; + rotationPeriod?: Maybe; /** * The percentage of the planet surface that is naturally occurring water or bodies * of water. */ - surfaceWater?: Maybe; + surfaceWater?: Maybe; /** The terrains of this planet. */ - terrains?: Maybe>>; + terrains?: Maybe>>; }; /** @@ -565,10 +565,10 @@ export type Planet = Node & { * 0 ABY. */ export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** @@ -576,10 +576,10 @@ export type PlanetFilmConnectionArgs = { * 0 ABY. */ export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -604,14 +604,14 @@ export type PlanetFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetFilmsEdge = { __typename?: 'PlanetFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -638,14 +638,14 @@ export type PlanetResidentsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetResidentsEdge = { __typename?: 'PlanetResidentsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -672,14 +672,14 @@ export type PlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetsEdge = { __typename?: 'PlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -703,137 +703,137 @@ export type Root = { }; export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; + filmID?: InputMaybe; + id?: InputMaybe; }; export type RootNodeArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; + id?: InputMaybe; + personID?: InputMaybe; }; export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; + id?: InputMaybe; + planetID?: InputMaybe; }; export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; + id?: InputMaybe; + speciesID?: InputMaybe; }; export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; + id?: InputMaybe; + starshipID?: InputMaybe; }; export type RootVehicleArgs = { - id?: InputMaybe; - vehicleID?: InputMaybe; + id?: InputMaybe; + vehicleID?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type Species = Node & { __typename?: 'Species'; /** The average height of this species in centimeters. */ - averageHeight?: Maybe; + averageHeight?: Maybe; /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; + averageLifespan?: Maybe; /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; + classification?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The designation of this species, such as "sentient". */ - designation?: Maybe; + designation?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * Common eye colors for this species, null if this species does not typically * have eyes. */ - eyeColors?: Maybe>>; + eyeColors?: Maybe>>; filmConnection?: Maybe; /** * Common hair colors for this species, null if this species does not typically * have hair. */ - hairColors?: Maybe>>; + hairColors?: Maybe>>; /** A planet that this species originates from. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The language commonly spoken by this species. */ - language?: Maybe; + language?: Maybe; /** The name of this species. */ - name?: Maybe; + name?: Maybe; personConnection?: Maybe; /** * Common skin colors for this species, null if this species does not typically * have skin. */ - skinColors?: Maybe>>; + skinColors?: Maybe>>; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesPersonConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -858,14 +858,14 @@ export type SpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesEdge = { __typename?: 'SpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -892,14 +892,14 @@ export type SpeciesFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesFilmsEdge = { __typename?: 'SpeciesFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -926,14 +926,14 @@ export type SpeciesPeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesPeopleEdge = { __typename?: 'SpeciesPeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -948,67 +948,67 @@ export type Starship = Node & { * the difference in speed of starships. We can assume it is similar to AU, the * distance between our Sun (Sol) and Earth. */ - MGLT?: Maybe; + MGLT?: Maybe; /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this starship can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; + hyperdriveRating?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this starship in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** * The maximum speed of this starship in atmosphere. null if this starship is * incapable of atmosphering flight. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 * Orbital Battle Station". */ - model?: Maybe; + model?: Maybe; /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** * The class of this starship, such as "Starfighter" or "Deep Space Mobile * Battlestation" */ - starshipClass?: Maybe; + starshipClass?: Maybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipPilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1033,14 +1033,14 @@ export type StarshipFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipFilmsEdge = { __typename?: 'StarshipFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1067,14 +1067,14 @@ export type StarshipPilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipPilotsEdge = { __typename?: 'StarshipPilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1101,14 +1101,14 @@ export type StarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipsEdge = { __typename?: 'StarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1117,60 +1117,60 @@ export type StarshipsEdge = { export type Vehicle = Node & { __typename?: 'Vehicle'; /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this vehicle can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this vehicle in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this vehicle. Such as "All-Terrain Attack * Transport". */ - model?: Maybe; + model?: Maybe; /** * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder * bike". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; + vehicleClass?: Maybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehicleFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehiclePilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1195,14 +1195,14 @@ export type VehicleFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehicleFilmsEdge = { __typename?: 'VehicleFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1229,14 +1229,14 @@ export type VehiclePilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehiclePilotsEdge = { __typename?: 'VehiclePilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1254,7 +1254,7 @@ export type VehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -1270,13 +1270,13 @@ export type VehiclesConnection = { export type VehiclesEdge = { __typename?: 'VehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; export type AllFilmsWithVariablesQueryQueryVariables = Exact<{ - first: Scalars['Int']; + first: Scalars['Int']['input']; }>; export type AllFilmsWithVariablesQueryQuery = { diff --git a/examples/vue/urql/src/gql/graphql.ts b/examples/vue/urql/src/gql/graphql.ts index a70aaf50ae7..b4dfb1e7039 100644 --- a/examples/vue/urql/src/gql/graphql.ts +++ b/examples/vue/urql/src/gql/graphql.ts @@ -9,11 +9,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A single film. */ @@ -21,67 +21,67 @@ export type Film = Node & { __typename?: 'Film'; characterConnection?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The name of the director of this film. */ - director?: Maybe; + director?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** The episode number of this film. */ - episodeID?: Maybe; + episodeID?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; + openingCrawl?: Maybe; planetConnection?: Maybe; /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; + producers?: Maybe>>; /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; + releaseDate?: Maybe; speciesConnection?: Maybe; starshipConnection?: Maybe; /** The title of this film. */ - title?: Maybe; + title?: Maybe; vehicleConnection?: Maybe; }; /** A single film. */ export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -106,14 +106,14 @@ export type FilmCharactersConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmCharactersEdge = { __typename?: 'FilmCharactersEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -140,14 +140,14 @@ export type FilmPlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmPlanetsEdge = { __typename?: 'FilmPlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -174,14 +174,14 @@ export type FilmSpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmSpeciesEdge = { __typename?: 'FilmSpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -208,14 +208,14 @@ export type FilmStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmStarshipsEdge = { __typename?: 'FilmStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -233,7 +233,7 @@ export type FilmVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -249,7 +249,7 @@ export type FilmVehiclesConnection = { export type FilmVehiclesEdge = { __typename?: 'FilmVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -276,14 +276,14 @@ export type FilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmsEdge = { __typename?: 'FilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -291,20 +291,20 @@ export type FilmsEdge = { /** An object with an ID */ export type Node = { /** The id of the object. */ - id: Scalars['ID']; + id: Scalars['ID']['output']; }; /** Information about pagination in a connection. */ export type PageInfo = { __typename?: 'PageInfo'; /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; + endCursor?: Maybe; /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']; + hasNextPage: Scalars['Boolean']['output']; /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']; + hasPreviousPage: Scalars['Boolean']['output']; /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; + startCursor?: Maybe; }; /** A connection to a list of items. */ @@ -329,14 +329,14 @@ export type PeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PeopleEdge = { __typename?: 'PeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -349,39 +349,39 @@ export type Person = Node & { * Before the Battle of Yavin or After the Battle of Yavin. The Battle of Yavin is * a battle that occurs at the end of Star Wars episode IV: A New Hope. */ - birthYear?: Maybe; + birthYear?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * The eye color of this person. Will be "unknown" if not known or "n/a" if the * person does not have an eye. */ - eyeColor?: Maybe; + eyeColor?: Maybe; filmConnection?: Maybe; /** * The gender of this person. Either "Male", "Female" or "unknown", * "n/a" if the person does not have a gender. */ - gender?: Maybe; + gender?: Maybe; /** * The hair color of this person. Will be "unknown" if not known or "n/a" if the * person does not have hair. */ - hairColor?: Maybe; + hairColor?: Maybe; /** The height of the person in centimeters. */ - height?: Maybe; + height?: Maybe; /** A planet that this person was born on or inhabits. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The mass of the person in kilograms. */ - mass?: Maybe; + mass?: Maybe; /** The name of this person. */ - name?: Maybe; + name?: Maybe; /** The skin color of this person. */ - skinColor?: Maybe; + skinColor?: Maybe; /** The species that this person belongs to, or null if unknown. */ species?: Maybe; starshipConnection?: Maybe; @@ -390,26 +390,26 @@ export type Person = Node & { /** An individual person or character within the Star Wars universe. */ export type PersonFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -434,14 +434,14 @@ export type PersonFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonFilmsEdge = { __typename?: 'PersonFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -468,14 +468,14 @@ export type PersonStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonStarshipsEdge = { __typename?: 'PersonStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -493,7 +493,7 @@ export type PersonVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -509,7 +509,7 @@ export type PersonVehiclesConnection = { export type PersonVehiclesEdge = { __typename?: 'PersonVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -521,43 +521,43 @@ export type PersonVehiclesEdge = { export type Planet = Node & { __typename?: 'Planet'; /** The climates of this planet. */ - climates?: Maybe>>; + climates?: Maybe>>; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The diameter of this planet in kilometers. */ - diameter?: Maybe; + diameter?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** * A number denoting the gravity of this planet, where "1" is normal or 1 standard * G. "2" is twice or 2 standard Gs. "0.5" is half or 0.5 standard Gs. */ - gravity?: Maybe; + gravity?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The name of this planet. */ - name?: Maybe; + name?: Maybe; /** * The number of standard days it takes for this planet to complete a single orbit * of its local star. */ - orbitalPeriod?: Maybe; + orbitalPeriod?: Maybe; /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; + population?: Maybe; residentConnection?: Maybe; /** * The number of standard hours it takes for this planet to complete a single * rotation on its axis. */ - rotationPeriod?: Maybe; + rotationPeriod?: Maybe; /** * The percentage of the planet surface that is naturally occurring water or bodies * of water. */ - surfaceWater?: Maybe; + surfaceWater?: Maybe; /** The terrains of this planet. */ - terrains?: Maybe>>; + terrains?: Maybe>>; }; /** @@ -565,10 +565,10 @@ export type Planet = Node & { * 0 ABY. */ export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** @@ -576,10 +576,10 @@ export type PlanetFilmConnectionArgs = { * 0 ABY. */ export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -604,14 +604,14 @@ export type PlanetFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetFilmsEdge = { __typename?: 'PlanetFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -638,14 +638,14 @@ export type PlanetResidentsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetResidentsEdge = { __typename?: 'PlanetResidentsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -672,14 +672,14 @@ export type PlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetsEdge = { __typename?: 'PlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -703,137 +703,137 @@ export type Root = { }; export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; + filmID?: InputMaybe; + id?: InputMaybe; }; export type RootNodeArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; + id?: InputMaybe; + personID?: InputMaybe; }; export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; + id?: InputMaybe; + planetID?: InputMaybe; }; export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; + id?: InputMaybe; + speciesID?: InputMaybe; }; export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; + id?: InputMaybe; + starshipID?: InputMaybe; }; export type RootVehicleArgs = { - id?: InputMaybe; - vehicleID?: InputMaybe; + id?: InputMaybe; + vehicleID?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type Species = Node & { __typename?: 'Species'; /** The average height of this species in centimeters. */ - averageHeight?: Maybe; + averageHeight?: Maybe; /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; + averageLifespan?: Maybe; /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; + classification?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The designation of this species, such as "sentient". */ - designation?: Maybe; + designation?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * Common eye colors for this species, null if this species does not typically * have eyes. */ - eyeColors?: Maybe>>; + eyeColors?: Maybe>>; filmConnection?: Maybe; /** * Common hair colors for this species, null if this species does not typically * have hair. */ - hairColors?: Maybe>>; + hairColors?: Maybe>>; /** A planet that this species originates from. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The language commonly spoken by this species. */ - language?: Maybe; + language?: Maybe; /** The name of this species. */ - name?: Maybe; + name?: Maybe; personConnection?: Maybe; /** * Common skin colors for this species, null if this species does not typically * have skin. */ - skinColors?: Maybe>>; + skinColors?: Maybe>>; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesPersonConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -858,14 +858,14 @@ export type SpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesEdge = { __typename?: 'SpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -892,14 +892,14 @@ export type SpeciesFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesFilmsEdge = { __typename?: 'SpeciesFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -926,14 +926,14 @@ export type SpeciesPeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesPeopleEdge = { __typename?: 'SpeciesPeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -948,67 +948,67 @@ export type Starship = Node & { * the difference in speed of starships. We can assume it is similar to AU, the * distance between our Sun (Sol) and Earth. */ - MGLT?: Maybe; + MGLT?: Maybe; /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this starship can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; + hyperdriveRating?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this starship in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** * The maximum speed of this starship in atmosphere. null if this starship is * incapable of atmosphering flight. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 * Orbital Battle Station". */ - model?: Maybe; + model?: Maybe; /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** * The class of this starship, such as "Starfighter" or "Deep Space Mobile * Battlestation" */ - starshipClass?: Maybe; + starshipClass?: Maybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipPilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1033,14 +1033,14 @@ export type StarshipFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipFilmsEdge = { __typename?: 'StarshipFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1067,14 +1067,14 @@ export type StarshipPilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipPilotsEdge = { __typename?: 'StarshipPilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1101,14 +1101,14 @@ export type StarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipsEdge = { __typename?: 'StarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1117,60 +1117,60 @@ export type StarshipsEdge = { export type Vehicle = Node & { __typename?: 'Vehicle'; /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this vehicle can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this vehicle in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this vehicle. Such as "All-Terrain Attack * Transport". */ - model?: Maybe; + model?: Maybe; /** * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder * bike". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; + vehicleClass?: Maybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehicleFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehiclePilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1195,14 +1195,14 @@ export type VehicleFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehicleFilmsEdge = { __typename?: 'VehicleFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1229,14 +1229,14 @@ export type VehiclePilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehiclePilotsEdge = { __typename?: 'VehiclePilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1254,7 +1254,7 @@ export type VehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -1270,13 +1270,13 @@ export type VehiclesConnection = { export type VehiclesEdge = { __typename?: 'VehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; export type AllFilmsWithVariablesQueryQueryVariables = Exact<{ - first: Scalars['Int']; + first: Scalars['Int']['input']; }>; export type AllFilmsWithVariablesQueryQuery = { diff --git a/examples/vue/villus/src/gql/graphql.ts b/examples/vue/villus/src/gql/graphql.ts index a70aaf50ae7..b4dfb1e7039 100644 --- a/examples/vue/villus/src/gql/graphql.ts +++ b/examples/vue/villus/src/gql/graphql.ts @@ -9,11 +9,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; /** A single film. */ @@ -21,67 +21,67 @@ export type Film = Node & { __typename?: 'Film'; characterConnection?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The name of the director of this film. */ - director?: Maybe; + director?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** The episode number of this film. */ - episodeID?: Maybe; + episodeID?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; + openingCrawl?: Maybe; planetConnection?: Maybe; /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; + producers?: Maybe>>; /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; + releaseDate?: Maybe; speciesConnection?: Maybe; starshipConnection?: Maybe; /** The title of this film. */ - title?: Maybe; + title?: Maybe; vehicleConnection?: Maybe; }; /** A single film. */ export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single film. */ export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -106,14 +106,14 @@ export type FilmCharactersConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmCharactersEdge = { __typename?: 'FilmCharactersEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -140,14 +140,14 @@ export type FilmPlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmPlanetsEdge = { __typename?: 'FilmPlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -174,14 +174,14 @@ export type FilmSpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmSpeciesEdge = { __typename?: 'FilmSpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -208,14 +208,14 @@ export type FilmStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmStarshipsEdge = { __typename?: 'FilmStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -233,7 +233,7 @@ export type FilmVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -249,7 +249,7 @@ export type FilmVehiclesConnection = { export type FilmVehiclesEdge = { __typename?: 'FilmVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -276,14 +276,14 @@ export type FilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type FilmsEdge = { __typename?: 'FilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -291,20 +291,20 @@ export type FilmsEdge = { /** An object with an ID */ export type Node = { /** The id of the object. */ - id: Scalars['ID']; + id: Scalars['ID']['output']; }; /** Information about pagination in a connection. */ export type PageInfo = { __typename?: 'PageInfo'; /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; + endCursor?: Maybe; /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']; + hasNextPage: Scalars['Boolean']['output']; /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']; + hasPreviousPage: Scalars['Boolean']['output']; /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; + startCursor?: Maybe; }; /** A connection to a list of items. */ @@ -329,14 +329,14 @@ export type PeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PeopleEdge = { __typename?: 'PeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -349,39 +349,39 @@ export type Person = Node & { * Before the Battle of Yavin or After the Battle of Yavin. The Battle of Yavin is * a battle that occurs at the end of Star Wars episode IV: A New Hope. */ - birthYear?: Maybe; + birthYear?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * The eye color of this person. Will be "unknown" if not known or "n/a" if the * person does not have an eye. */ - eyeColor?: Maybe; + eyeColor?: Maybe; filmConnection?: Maybe; /** * The gender of this person. Either "Male", "Female" or "unknown", * "n/a" if the person does not have a gender. */ - gender?: Maybe; + gender?: Maybe; /** * The hair color of this person. Will be "unknown" if not known or "n/a" if the * person does not have hair. */ - hairColor?: Maybe; + hairColor?: Maybe; /** The height of the person in centimeters. */ - height?: Maybe; + height?: Maybe; /** A planet that this person was born on or inhabits. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The mass of the person in kilograms. */ - mass?: Maybe; + mass?: Maybe; /** The name of this person. */ - name?: Maybe; + name?: Maybe; /** The skin color of this person. */ - skinColor?: Maybe; + skinColor?: Maybe; /** The species that this person belongs to, or null if unknown. */ species?: Maybe; starshipConnection?: Maybe; @@ -390,26 +390,26 @@ export type Person = Node & { /** An individual person or character within the Star Wars universe. */ export type PersonFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** An individual person or character within the Star Wars universe. */ export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -434,14 +434,14 @@ export type PersonFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonFilmsEdge = { __typename?: 'PersonFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -468,14 +468,14 @@ export type PersonStarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PersonStarshipsEdge = { __typename?: 'PersonStarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -493,7 +493,7 @@ export type PersonVehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -509,7 +509,7 @@ export type PersonVehiclesConnection = { export type PersonVehiclesEdge = { __typename?: 'PersonVehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -521,43 +521,43 @@ export type PersonVehiclesEdge = { export type Planet = Node & { __typename?: 'Planet'; /** The climates of this planet. */ - climates?: Maybe>>; + climates?: Maybe>>; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The diameter of this planet in kilometers. */ - diameter?: Maybe; + diameter?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** * A number denoting the gravity of this planet, where "1" is normal or 1 standard * G. "2" is twice or 2 standard Gs. "0.5" is half or 0.5 standard Gs. */ - gravity?: Maybe; + gravity?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The name of this planet. */ - name?: Maybe; + name?: Maybe; /** * The number of standard days it takes for this planet to complete a single orbit * of its local star. */ - orbitalPeriod?: Maybe; + orbitalPeriod?: Maybe; /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; + population?: Maybe; residentConnection?: Maybe; /** * The number of standard hours it takes for this planet to complete a single * rotation on its axis. */ - rotationPeriod?: Maybe; + rotationPeriod?: Maybe; /** * The percentage of the planet surface that is naturally occurring water or bodies * of water. */ - surfaceWater?: Maybe; + surfaceWater?: Maybe; /** The terrains of this planet. */ - terrains?: Maybe>>; + terrains?: Maybe>>; }; /** @@ -565,10 +565,10 @@ export type Planet = Node & { * 0 ABY. */ export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** @@ -576,10 +576,10 @@ export type PlanetFilmConnectionArgs = { * 0 ABY. */ export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -604,14 +604,14 @@ export type PlanetFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetFilmsEdge = { __typename?: 'PlanetFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -638,14 +638,14 @@ export type PlanetResidentsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetResidentsEdge = { __typename?: 'PlanetResidentsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -672,14 +672,14 @@ export type PlanetsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type PlanetsEdge = { __typename?: 'PlanetsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -703,137 +703,137 @@ export type Root = { }; export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; + filmID?: InputMaybe; + id?: InputMaybe; }; export type RootNodeArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; + id?: InputMaybe; + personID?: InputMaybe; }; export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; + id?: InputMaybe; + planetID?: InputMaybe; }; export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; + id?: InputMaybe; + speciesID?: InputMaybe; }; export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; + id?: InputMaybe; + starshipID?: InputMaybe; }; export type RootVehicleArgs = { - id?: InputMaybe; - vehicleID?: InputMaybe; + id?: InputMaybe; + vehicleID?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type Species = Node & { __typename?: 'Species'; /** The average height of this species in centimeters. */ - averageHeight?: Maybe; + averageHeight?: Maybe; /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; + averageLifespan?: Maybe; /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; + classification?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The designation of this species, such as "sentient". */ - designation?: Maybe; + designation?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; /** * Common eye colors for this species, null if this species does not typically * have eyes. */ - eyeColors?: Maybe>>; + eyeColors?: Maybe>>; filmConnection?: Maybe; /** * Common hair colors for this species, null if this species does not typically * have hair. */ - hairColors?: Maybe>>; + hairColors?: Maybe>>; /** A planet that this species originates from. */ homeworld?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The language commonly spoken by this species. */ - language?: Maybe; + language?: Maybe; /** The name of this species. */ - name?: Maybe; + name?: Maybe; personConnection?: Maybe; /** * Common skin colors for this species, null if this species does not typically * have skin. */ - skinColors?: Maybe>>; + skinColors?: Maybe>>; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A type of person or character within the Star Wars Universe. */ export type SpeciesPersonConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -858,14 +858,14 @@ export type SpeciesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesEdge = { __typename?: 'SpeciesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -892,14 +892,14 @@ export type SpeciesFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesFilmsEdge = { __typename?: 'SpeciesFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -926,14 +926,14 @@ export type SpeciesPeopleConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type SpeciesPeopleEdge = { __typename?: 'SpeciesPeopleEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -948,67 +948,67 @@ export type Starship = Node & { * the difference in speed of starships. We can assume it is similar to AU, the * distance between our Sun (Sol) and Earth. */ - MGLT?: Maybe; + MGLT?: Maybe; /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this starship can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; + hyperdriveRating?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this starship in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** * The maximum speed of this starship in atmosphere. null if this starship is * incapable of atmosphering flight. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 * Orbital Battle Station". */ - model?: Maybe; + model?: Maybe; /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** * The class of this starship, such as "Starfighter" or "Deep Space Mobile * Battlestation" */ - starshipClass?: Maybe; + starshipClass?: Maybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that has hyperdrive capability. */ export type StarshipPilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1033,14 +1033,14 @@ export type StarshipFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipFilmsEdge = { __typename?: 'StarshipFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1067,14 +1067,14 @@ export type StarshipPilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipPilotsEdge = { __typename?: 'StarshipPilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1101,14 +1101,14 @@ export type StarshipsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type StarshipsEdge = { __typename?: 'StarshipsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1117,60 +1117,60 @@ export type StarshipsEdge = { export type Vehicle = Node & { __typename?: 'Vehicle'; /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; + cargoCapacity?: Maybe; /** * The maximum length of time that this vehicle can provide consumables for its * entire crew without having to resupply. */ - consumables?: Maybe; + consumables?: Maybe; /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; + costInCredits?: Maybe; /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; + created?: Maybe; /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; + crew?: Maybe; /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; + edited?: Maybe; filmConnection?: Maybe; /** The ID of an object */ - id: Scalars['ID']; + id: Scalars['ID']['output']; /** The length of this vehicle in meters. */ - length?: Maybe; + length?: Maybe; /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; + manufacturers?: Maybe>>; /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; + maxAtmospheringSpeed?: Maybe; /** * The model or official name of this vehicle. Such as "All-Terrain Attack * Transport". */ - model?: Maybe; + model?: Maybe; /** * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder * bike". */ - name?: Maybe; + name?: Maybe; /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; + passengers?: Maybe; pilotConnection?: Maybe; /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; + vehicleClass?: Maybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehicleFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A single transport craft that does not have hyperdrive capability */ export type VehiclePilotConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** A connection to a list of items. */ @@ -1195,14 +1195,14 @@ export type VehicleFilmsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehicleFilmsEdge = { __typename?: 'VehicleFilmsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1229,14 +1229,14 @@ export type VehiclePilotsConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; }; /** An edge in a connection. */ export type VehiclePilotsEdge = { __typename?: 'VehiclePilotsEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; @@ -1254,7 +1254,7 @@ export type VehiclesConnection = { * argument to "first", then fetch the total count so it could display "5 of 83", * for example. */ - totalCount?: Maybe; + totalCount?: Maybe; /** * A list of all of the objects returned in the connection. This is a convenience * field provided for quickly exploring the API; rather than querying for @@ -1270,13 +1270,13 @@ export type VehiclesConnection = { export type VehiclesEdge = { __typename?: 'VehiclesEdge'; /** A cursor for use in pagination */ - cursor: Scalars['String']; + cursor: Scalars['String']['output']; /** The item at the end of the edge */ node?: Maybe; }; export type AllFilmsWithVariablesQueryQueryVariables = Exact<{ - first: Scalars['Int']; + first: Scalars['Int']['input']; }>; export type AllFilmsWithVariablesQueryQuery = { diff --git a/examples/yoga-tests/src/gql/graphql.ts b/examples/yoga-tests/src/gql/graphql.ts index cea15891bec..ac3374a6dfc 100644 --- a/examples/yoga-tests/src/gql/graphql.ts +++ b/examples/yoga-tests/src/gql/graphql.ts @@ -9,25 +9,25 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; }; export type Mutation = { __typename?: 'Mutation'; - echo: Scalars['String']; + echo: Scalars['String']['output']; }; export type MutationEchoArgs = { - message: Scalars['String']; + message: Scalars['String']['input']; }; export type Query = { __typename?: 'Query'; - hello: Scalars['String']; + hello: Scalars['String']['output']; }; export type HelloQueryQueryVariables = Exact<{ [key: string]: never }>; @@ -35,7 +35,7 @@ export type HelloQueryQueryVariables = Exact<{ [key: string]: never }>; export type HelloQueryQuery = { __typename?: 'Query'; hello: string }; export type EchoMutationMutationVariables = Exact<{ - message: Scalars['String']; + message: Scalars['String']['input']; }>; export type EchoMutationMutation = { __typename?: 'Mutation'; echo: string }; diff --git a/packages/graphql-codegen-cli/tests/codegen.spec.ts b/packages/graphql-codegen-cli/tests/codegen.spec.ts index e15a70bbf45..99d7e662192 100644 --- a/packages/graphql-codegen-cli/tests/codegen.spec.ts +++ b/packages/graphql-codegen-cli/tests/codegen.spec.ts @@ -218,7 +218,7 @@ describe('Codegen Executor', () => { expect(output.length).toBe(1); expect(output[0].filename).toBe('out.ts'); - expect(output[0].content).toContain(`hello?: Maybe`); + expect(output[0].content).toContain(`hello?: Maybe`); }); }); @@ -719,12 +719,12 @@ describe('Codegen Executor', () => { expect(output.length).toBe(1); expect(output[0].content).toBeSimilarStringTo(`export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; - UniqueID: any; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } + UniqueID: { input: any; output: any; } };`); }); }); diff --git a/packages/plugins/other/visitor-plugin-common/src/base-resolvers-visitor.ts b/packages/plugins/other/visitor-plugin-common/src/base-resolvers-visitor.ts index f28b1576061..30d2cce9332 100644 --- a/packages/plugins/other/visitor-plugin-common/src/base-resolvers-visitor.ts +++ b/packages/plugins/other/visitor-plugin-common/src/base-resolvers-visitor.ts @@ -1281,7 +1281,9 @@ export class BaseResolversVisitor< } protected _getScalar(name: string): string { - return `${this.config.namespacedImportName ? this.config.namespacedImportName + '.' : ''}Scalars['${name}']`; + return `${ + this.config.namespacedImportName ? this.config.namespacedImportName + '.' : '' + }Scalars['${name}']['output']`; } NamedType(node: NamedTypeNode): string { diff --git a/packages/plugins/other/visitor-plugin-common/src/base-types-visitor.ts b/packages/plugins/other/visitor-plugin-common/src/base-types-visitor.ts index 8e77e89fd2b..6e4d4f6f0ab 100644 --- a/packages/plugins/other/visitor-plugin-common/src/base-types-visitor.ts +++ b/packages/plugins/other/visitor-plugin-common/src/base-types-visitor.ts @@ -529,17 +529,21 @@ export class BaseTypesVisitor< } public getScalarsImports(): string[] { - return Object.keys(this.config.scalars) - .map(enumName => { - const mappedValue = this.config.scalars[enumName]; + return Object.keys(this.config.scalars).reduce((res, enumName) => { + const mappedValue = this.config.scalars[enumName]; - if (mappedValue.isExternal) { - return this._buildTypeImport(mappedValue.import, mappedValue.source, mappedValue.default); - } + if (mappedValue.input.isExternal) { + res.push(this._buildTypeImport(mappedValue.input.import, mappedValue.input.source, mappedValue.input.default)); + } - return null; - }) - .filter(a => a); + if (mappedValue.output.isExternal) { + res.push( + this._buildTypeImport(mappedValue.output.import, mappedValue.output.source, mappedValue.output.default) + ); + } + + return res; + }, []); } public getDirectiveArgumentAndInputFieldMappingsImports(): string[] { @@ -559,12 +563,20 @@ export class BaseTypesVisitor< public get scalarsDefinition(): string { if (this.config.onlyEnums) return ''; const allScalars = Object.keys(this.config.scalars).map(scalarName => { - const scalarValue = this.config.scalars[scalarName].type; + const inputScalarValue = this.config.scalars[scalarName].input.type; + const outputScalarValue = this.config.scalars[scalarName].output.type; const scalarType = this._schema.getType(scalarName); const comment = scalarType?.astNode && scalarType.description ? transformComment(scalarType.description, 1) : ''; const { scalar } = this._parsedConfig.declarationKind; - return comment + indent(`${scalarName}: ${scalarValue}${this.getPunctuation(scalar)}`); + return ( + comment + + indent( + `${scalarName}: { input: ${inputScalarValue}${this.getPunctuation( + scalar + )} output: ${outputScalarValue}${this.getPunctuation(scalar)} }` + ) + ); }); return new DeclarationBlock(this._declarationBlockConfig) @@ -677,7 +689,7 @@ export class BaseTypesVisitor< if (this.config.onlyOperationTypes || this.config.onlyEnums) return ''; const originalNode = parent[key] as UnionTypeDefinitionNode; const possibleTypes = originalNode.types - .map(t => (this.scalars[t.name.value] ? this._getScalar(t.name.value) : this.convertName(t))) + .map(t => (this.scalars[t.name.value] ? this._getScalar(t.name.value, 'output') : this.convertName(t))) .join(' | '); return new DeclarationBlock(this._declarationBlockConfig) @@ -945,8 +957,8 @@ export class BaseTypesVisitor< .join('\n\n'); } - protected _getScalar(name: string): string { - return `Scalars['${name}']`; + protected _getScalar(name: string, type: 'input' | 'output'): string { + return `Scalars['${name}']['${type}']`; } protected _getDirectiveArgumentNadInputFieldMapping(name: string): string { @@ -968,11 +980,11 @@ export class BaseTypesVisitor< return type || null; } - protected _getTypeForNode(node: NamedTypeNode): string { + protected _getTypeForNode(node: NamedTypeNode, isVisitingInputType: boolean): string { const typeAsString = node.name as any as string; if (this.scalars[typeAsString]) { - return this._getScalar(typeAsString); + return this._getScalar(typeAsString, isVisitingInputType ? 'input' : 'output'); } if (this.config.enumValues[typeAsString]) { return this.config.enumValues[typeAsString].typeIdentifier; @@ -990,7 +1002,7 @@ export class BaseTypesVisitor< NamedType(node: NamedTypeNode, key, parent, path, ancestors): string { const currentVisitContext = this.getVisitorKindContextFromAncestors(ancestors); const isVisitingInputType = currentVisitContext.includes(Kind.INPUT_OBJECT_TYPE_DEFINITION); - const typeToUse = this._getTypeForNode(node); + const typeToUse = this._getTypeForNode(node, isVisitingInputType); if (!isVisitingInputType && this.config.fieldWrapperValue && this.config.wrapFieldDefinitions) { return `FieldWrapper<${typeToUse}>`; diff --git a/packages/plugins/other/visitor-plugin-common/src/base-visitor.ts b/packages/plugins/other/visitor-plugin-common/src/base-visitor.ts index 74adc6a72d8..eb40805ddb7 100644 --- a/packages/plugins/other/visitor-plugin-common/src/base-visitor.ts +++ b/packages/plugins/other/visitor-plugin-common/src/base-visitor.ts @@ -102,6 +102,10 @@ export interface RawConfig { * // plugins... * config: { * scalars: { + * ID: { + * input: 'string', + * output: 'string | number' + * } * DateTime: 'Date', * JSON: '{ [key: string]: any }', * } @@ -394,7 +398,10 @@ export class BaseVisitor; enumPrefix: boolean | null; - scalars: ScalarsMap; + scalars: NormalizedScalarsMap; formatNamedField( name: string, type?: GraphQLOutputType | GraphQLNamedType | null, diff --git a/packages/plugins/other/visitor-plugin-common/src/selection-set-processor/pre-resolve-types.ts b/packages/plugins/other/visitor-plugin-common/src/selection-set-processor/pre-resolve-types.ts index d13f3bd49bb..02b37744622 100644 --- a/packages/plugins/other/visitor-plugin-common/src/selection-set-processor/pre-resolve-types.ts +++ b/packages/plugins/other/visitor-plugin-common/src/selection-set-processor/pre-resolve-types.ts @@ -56,7 +56,7 @@ export class PreResolveTypesProcessor extends BaseSelectionSetProcessor { const { name } = scalarType; if (typeof scalarsMapping === 'string') { - const value = parseMapper(scalarsMapping + '#' + name, name); - result[name] = value; + const inputMapper = parseMapper(scalarsMapping + '#' + name, name); + + if (inputMapper.isExternal) { + inputMapper.type += "['input']"; + } + + const outputMapper = parseMapper(scalarsMapping + '#' + name, name); + if (outputMapper.isExternal) { + outputMapper.type += "['output']"; + } + + result[name] = { + input: inputMapper, + output: outputMapper, + }; } else if (scalarsMapping && typeof scalarsMapping[name] === 'string') { - const value = parseMapper(scalarsMapping[name], name); - result[name] = value; - } else if (scalarsMapping?.[name]) { + const normalizedScalar = normalizeScalarType(scalarsMapping[name]); + + const inputMapper = parseMapper(normalizedScalar.input, name); + if (inputMapper.isExternal) { + inputMapper.type += "['input']"; + } + + const outputMapper = parseMapper(normalizedScalar.output, name); + if (outputMapper.isExternal) { + outputMapper.type += "['output']"; + } + result[name] = { - isExternal: false, - type: JSON.stringify(scalarsMapping[name]), + input: inputMapper, + output: outputMapper, }; + } else if (scalarsMapping?.[name]) { + const mappedScalar = scalarsMapping[name]; + if (typeof mappedScalar === 'object' && mappedScalar.input && mappedScalar.output) { + result[name] = { + input: { + isExternal: false, + type: mappedScalar.input, + }, + output: { + isExternal: false, + type: mappedScalar.output, + }, + }; + } else { + result[name] = { + input: { + isExternal: false, + type: JSON.stringify(mappedScalar), + }, + output: { + isExternal: false, + type: JSON.stringify(mappedScalar), + }, + }; + } } else if (scalarType.extensions?.codegenScalarType) { result[name] = { - isExternal: false, - type: scalarType.extensions.codegenScalarType as string, + input: { + isExternal: false, + type: scalarType.extensions.codegenScalarType as string, + }, + output: { + isExternal: false, + type: scalarType.extensions.codegenScalarType as string, + }, }; } else if (!defaultScalarsMapping[name]) { if (defaultScalarType === null) { throw new Error(`Unknown scalar type ${name}. Please override it using the "scalars" configuration field!`); } result[name] = { - isExternal: false, - type: defaultScalarType, + input: { + isExternal: false, + type: defaultScalarType, + }, + output: { + isExternal: false, + type: defaultScalarType, + }, }; } }); @@ -328,12 +404,22 @@ export function buildScalars( } for (const name of Object.keys(scalarsMapping)) { if (typeof scalarsMapping[name] === 'string') { - const value = parseMapper(scalarsMapping[name], name); - result[name] = value; + const normalizedScalar = normalizeScalarType(scalarsMapping[name]); + result[name] = { + input: parseMapper(normalizedScalar.input, name), + output: parseMapper(normalizedScalar.output, name), + }; } else { + const normalizedScalar = normalizeScalarType(scalarsMapping[name]); result[name] = { - isExternal: false, - type: JSON.stringify(scalarsMapping[name]), + input: { + isExternal: false, + type: JSON.stringify(normalizedScalar.input), + }, + output: { + isExternal: false, + type: JSON.stringify(normalizedScalar.output), + }, }; } } diff --git a/packages/plugins/other/visitor-plugin-common/src/variables-to-object.ts b/packages/plugins/other/visitor-plugin-common/src/variables-to-object.ts index f5723cb3252..78f8331bef4 100644 --- a/packages/plugins/other/visitor-plugin-common/src/variables-to-object.ts +++ b/packages/plugins/other/visitor-plugin-common/src/variables-to-object.ts @@ -60,7 +60,7 @@ export class OperationVariablesToObject { protected getScalar(name: string): string { const prefix = this._namespacedImportName ? `${this._namespacedImportName}.` : ''; - return `${prefix}Scalars['${name}']`; + return `${prefix}Scalars['${name}']['input']`; } protected getDirectiveMapping(name: string): string { diff --git a/packages/plugins/other/visitor-plugin-common/tests/create-resolvers-fields.spec.ts b/packages/plugins/other/visitor-plugin-common/tests/create-resolvers-fields.spec.ts index a3269fc6162..1020af77ce1 100644 --- a/packages/plugins/other/visitor-plugin-common/tests/create-resolvers-fields.spec.ts +++ b/packages/plugins/other/visitor-plugin-common/tests/create-resolvers-fields.spec.ts @@ -23,8 +23,8 @@ describe('BaseResolversVisitor.createResolversFields', () => { * export type ResolversParentTypes = { * Query: {} * A: Omit & { b?: Maybe } - * Boolean: Scalars['Boolean'] - * String: Scalars['String'] + * Boolean: Scalars['Boolean']['output'] + * String: Scalars['String']['output'] * }; */ const visitor = new BaseResolversVisitor( @@ -42,8 +42,8 @@ describe('BaseResolversVisitor.createResolversFields', () => { export type ResolversParentTypes = { Query: {} A: A - Boolean: Scalars['Boolean'] - String: Scalars['String'] + Boolean: Scalars['Boolean']['output'] + String: Scalars['String']['output'] }; ` ); @@ -56,8 +56,8 @@ export type ResolversParentTypes = { * export type ResolversParentTypes = { * Query: {} * A: Omit & { b?: Maybe } - * Boolean: Scalars['Boolean'] - * String: Scalars['String'] + * Boolean: Scalars['Boolean']['output'] + * String: Scalars['String']['output'] * }; */ const visitor = new BaseResolversVisitor( @@ -77,8 +77,8 @@ export type ResolversParentTypes = { export type IResolversParentTypes = { Query: {} A: IA - Boolean: Scalars['Boolean'] - String: Scalars['String'] + Boolean: Scalars['Boolean']['output'] + String: Scalars['String']['output'] }; ` ); diff --git a/packages/plugins/typescript/operations/tests/__snapshots__/ts-documents.spec.ts.snap b/packages/plugins/typescript/operations/tests/__snapshots__/ts-documents.spec.ts.snap index 024e0bd3138..8345468ea6c 100644 --- a/packages/plugins/typescript/operations/tests/__snapshots__/ts-documents.spec.ts.snap +++ b/packages/plugins/typescript/operations/tests/__snapshots__/ts-documents.spec.ts.snap @@ -5,15 +5,15 @@ exports[`TypeScript Operations Plugin Config should include fragment variable de export type TextNotificationFragmentFragmentVariables = Exact<{ - skip: Scalars['Boolean']; + skip: Scalars['Boolean']['input']; }>; " `; exports[`TypeScript Operations Plugin Issues #2699 - Issues with multiple interfaces and unions 1`] = ` "export type GetEntityBrandDataQueryVariables = Exact<{ - gid: Scalars['ID']; - brand: Scalars['ID']; + gid: Scalars['ID']['input']; + brand: Scalars['ID']['input']; }>; @@ -73,40 +73,40 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type Venue = { - id: Scalars['String']; - name: Scalars['String']; + id: Scalars['String']['output']; + name: Scalars['String']['output']; }; export type GpsPosition = { __typename?: 'GPSPosition'; - lat: Scalars['Float']; - lng: Scalars['Float']; + lat: Scalars['Float']['output']; + lng: Scalars['Float']['output']; }; export type VenueWithPosition = { - id: Scalars['String']; + id: Scalars['String']['output']; gpsPosition: GpsPosition; }; export type Hotel = VenueWithPosition & Venue & { __typename?: 'Hotel'; - id: Scalars['String']; + id: Scalars['String']['output']; gpsPosition: GpsPosition; - name: Scalars['String']; + name: Scalars['String']['output']; }; export type Transport = Venue & { __typename?: 'Transport'; - id: Scalars['String']; - name: Scalars['String']; + id: Scalars['String']['output']; + name: Scalars['String']['output']; }; export type Query = { @@ -364,11 +364,11 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type Query = { @@ -377,18 +377,18 @@ export type Query = { }; export type Concept = { - id?: Maybe; + id?: Maybe; }; export type Dimension = Concept & { __typename?: 'Dimension'; - id?: Maybe; + id?: Maybe; }; export type DimValue = { __typename?: 'DimValue'; dimension?: Maybe; - value: Scalars['String']; + value: Scalars['String']['output']; }; export type Searchable = Dimension | DimValue; @@ -482,43 +482,43 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type Error = { - message: Scalars['String']; + message: Scalars['String']['output']; }; export type Error1 = Error & { __typename?: 'Error1'; - message: Scalars['String']; + message: Scalars['String']['output']; }; export type Error2 = Error & { __typename?: 'Error2'; - message: Scalars['String']; + message: Scalars['String']['output']; }; export type Error3 = Error & { __typename?: 'Error3'; - message: Scalars['String']; + message: Scalars['String']['output']; info?: Maybe; }; export type AdditionalInfo = { __typename?: 'AdditionalInfo'; - message: Scalars['String']; - message2: Scalars['String']; + message: Scalars['String']['output']; + message2: Scalars['String']['output']; }; export type User = { __typename?: 'User'; - id: Scalars['ID']; - login: Scalars['String']; + id: Scalars['ID']['output']; + login: Scalars['String']['output']; }; export type UserResult = User | Error2 | Error3; @@ -577,45 +577,45 @@ export type MakeEmpty = 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type Error = { - message: Scalars['String']; + message: Scalars['String']['output']; }; export type Error1 = Error & { __typename?: 'Error1'; - message: Scalars['String']; + message: Scalars['String']['output']; }; export type Error2 = Error & { __typename?: 'Error2'; - message: Scalars['String']; + message: Scalars['String']['output']; }; export type Error3 = Error & { __typename?: 'Error3'; - message: Scalars['String']; + message: Scalars['String']['output']; info?: Maybe; }; export type AdditionalInfo = { __typename?: 'AdditionalInfo'; - message: Scalars['String']; - message2: Scalars['String']; + message: Scalars['String']['output']; + message2: Scalars['String']['output']; }; export type User = { __typename?: 'User'; - id: Scalars['ID']; - login: Scalars['String']; - test?: Maybe; - test2?: Maybe; + id: Scalars['ID']['output']; + login: Scalars['String']['output']; + test?: Maybe; + test2?: Maybe; }; export type UserResult = User | Error2 | Error3; diff --git a/packages/plugins/typescript/operations/tests/ts-documents.spec.ts b/packages/plugins/typescript/operations/tests/ts-documents.spec.ts index 60b37b0e625..96626d5f42d 100644 --- a/packages/plugins/typescript/operations/tests/ts-documents.spec.ts +++ b/packages/plugins/typescript/operations/tests/ts-documents.spec.ts @@ -2508,7 +2508,7 @@ describe('TypeScript Operations Plugin', () => { expect(content).toBeSimilarStringTo( `export type MeQueryVariables = Exact<{ - repoFullName: Scalars['String']; + repoFullName: Scalars['String']['input']; }>;` ); expect(content).toBeSimilarStringTo(` @@ -2823,14 +2823,14 @@ describe('TypeScript Operations Plugin', () => { expect(content).toBeSimilarStringTo( `export type TestQueryQueryVariables = Exact<{ - username?: InputMaybe; - email?: InputMaybe; - password: Scalars['String']; + username?: InputMaybe; + email?: InputMaybe; + password: Scalars['String']['input']; input?: InputMaybe; mandatoryInput: InputType; - testArray?: InputMaybe> | InputMaybe>; - requireString: Array> | InputMaybe; - innerRequired: Array | Scalars['String']; + testArray?: InputMaybe> | InputMaybe>; + requireString: Array> | InputMaybe; + innerRequired: Array | Scalars['String']['input']; }>;` ); await validate(content, config, schema); @@ -2849,7 +2849,7 @@ describe('TypeScript Operations Plugin', () => { expect(content).toBeSimilarStringTo( `export type TestQueryQueryVariables = Exact<{ - test?: InputMaybe; + test?: InputMaybe; }>;` ); await validate(content, config); @@ -3203,7 +3203,7 @@ describe('TypeScript Operations Plugin', () => { expect(content).toBeSimilarStringTo(` export type UsersQueryVariables = Exact<{ - reverse?: InputMaybe; + reverse?: InputMaybe; }>; `); }); @@ -4053,11 +4053,11 @@ describe('TypeScript Operations Plugin', () => { 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type Query = { @@ -4066,18 +4066,18 @@ describe('TypeScript Operations Plugin', () => { }; export type Concept = { - id?: Maybe; + id?: Maybe; }; export type Dimension = Concept & { __typename?: 'Dimension'; - id?: Maybe; + id?: Maybe; }; export type DimValue = { __typename?: 'DimValue'; dimension?: Maybe; - value: Scalars['String']; + value: Scalars['String']['output']; }; export type Searchable = Dimension | DimValue; @@ -4163,11 +4163,11 @@ describe('TypeScript Operations Plugin', () => { 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type Query = { @@ -4177,7 +4177,7 @@ describe('TypeScript Operations Plugin', () => { export type Dimension = { __typename?: 'Dimension'; - id?: Maybe; + id?: Maybe; }; export type SearchableFragmentFragment = { __typename?: 'Dimension', id?: string | null }; @@ -4251,11 +4251,11 @@ describe('TypeScript Operations Plugin', () => { 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type Query = { @@ -4265,7 +4265,7 @@ describe('TypeScript Operations Plugin', () => { export type Dimension = { __typename?: 'Dimension'; - id?: Maybe; + id?: Maybe; }; export type SearchPopularQueryVariables = Exact<{ [key: string]: never; }>; @@ -5465,9 +5465,9 @@ function test(q: GetEntityBrandDataQuery): void { expect(content).toBeSimilarStringTo(` export type UserQueryVariables = Exact<{ - testArray?: InputMaybe> | InputMaybe>; - requireString: Array> | InputMaybe; - innerRequired: Array | Scalars['String']; + testArray?: InputMaybe> | InputMaybe>; + requireString: Array> | InputMaybe; + innerRequired: Array | Scalars['String']['input']; }>;`); await validate(content, config); }); @@ -5497,9 +5497,9 @@ function test(q: GetEntityBrandDataQuery): void { expect(content).toBeSimilarStringTo(` export type UserQueryVariables = Exact<{ - testArray?: InputMaybe>>; - requireString: Array>; - innerRequired: Array; + testArray?: InputMaybe>>; + requireString: Array>; + innerRequired: Array; }>;`); await validate(content, config); }); @@ -6040,7 +6040,7 @@ function test(q: GetEntityBrandDataQuery): void { expect(content).toBeSimilarStringTo(` export type UserQueryVariables = Exact<{ - showAddress: Scalars['Boolean']; + showAddress: Scalars['Boolean']['input']; }>; export type UserQuery = { __typename?: 'Query', user: { __typename?: 'User', name: string, address?: string, nicknames?: Array | null, parents?: Array } };`); @@ -6093,8 +6093,8 @@ function test(q: GetEntityBrandDataQuery): void { expect(content).toBeSimilarStringTo(` export type UserQueryVariables = Exact<{ - showAddress: Scalars['Boolean']; - showName: Scalars['Boolean']; + showAddress: Scalars['Boolean']['input']; + showName: Scalars['Boolean']['input']; }>; export type UserQuery = { __typename?: 'Query', user: { __typename?: 'User', id: string, name?: string, address?: { __typename?: 'Address', city: string }, friends?: Array<{ __typename?: 'User', id: string }> } };`); }); @@ -6141,8 +6141,8 @@ function test(q: GetEntityBrandDataQuery): void { expect(content).toBeSimilarStringTo(` export type UserQueryVariables = Exact<{ - showAddress: Scalars['Boolean']; - showName: Scalars['Boolean']; + showAddress: Scalars['Boolean']['input']; + showName: Scalars['Boolean']['input']; }>; export type UserQuery = ( diff --git a/packages/plugins/typescript/resolvers/tests/__snapshots__/ts-resolvers.spec.ts.snap b/packages/plugins/typescript/resolvers/tests/__snapshots__/ts-resolvers.spec.ts.snap index 9b501d329ea..0f901a5986c 100644 --- a/packages/plugins/typescript/resolvers/tests/__snapshots__/ts-resolvers.spec.ts.snap +++ b/packages/plugins/typescript/resolvers/tests/__snapshots__/ts-resolvers.spec.ts.snap @@ -13,37 +13,37 @@ export type Omit = Pick>; export type RequireFields = Omit & { [P in K]-?: NonNullable }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; - MyScalar: any; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } + MyScalar: { input: any; output: any; } }; export type MyType = { __typename?: 'MyType'; - foo: Scalars['String']; + foo: Scalars['String']['output']; otherType?: Maybe; - withArgs?: Maybe; + withArgs?: Maybe; unionChild?: Maybe; }; export type MyTypeWithArgsArgs = { - arg?: InputMaybe; - arg2: Scalars['String']; + arg?: InputMaybe; + arg2: Scalars['String']['input']; }; export type Child = { __typename?: 'Child'; - bar: Scalars['String']; + bar: Scalars['String']['output']; parent?: Maybe; }; export type MyOtherType = { __typename?: 'MyOtherType'; - bar: Scalars['String']; + bar: Scalars['String']['output']; }; export type ChildUnion = Child | MyOtherType; @@ -59,16 +59,16 @@ export type Subscription = { }; export type Node = { - id: Scalars['ID']; + id: Scalars['ID']['output']; }; export type SomeNode = Node & { __typename?: 'SomeNode'; - id: Scalars['ID']; + id: Scalars['ID']['output']; }; export type AnotherNode = { - id: Scalars['ID']; + id: Scalars['ID']['output']; }; export type WithChild = { @@ -83,14 +83,14 @@ export type WithChildren = { export type AnotherNodeWithChild = AnotherNode & WithChild & { __typename?: 'AnotherNodeWithChild'; - id: Scalars['ID']; + id: Scalars['ID']['output']; unionChild?: Maybe; interfaceChild?: Maybe; }; export type AnotherNodeWithAll = AnotherNode & WithChild & WithChildren & { __typename?: 'AnotherNodeWithAll'; - id: Scalars['ID']; + id: Scalars['ID']['output']; unionChild?: Maybe; unionChildren: Array; interfaceChild?: Maybe; @@ -183,14 +183,14 @@ export type ResolversInterfaceTypes> = R /** Mapping between all available schema types and the resolvers types */ export type ResolversTypes = ResolversObject<{ MyType: ResolverTypeWrapper & { unionChild?: Maybe }>; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; Child: ResolverTypeWrapper; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; Query: ResolverTypeWrapper<{}>; Subscription: ResolverTypeWrapper<{}>; Node: ResolverTypeWrapper['Node']>; - ID: ResolverTypeWrapper; + ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; @@ -198,22 +198,22 @@ export type ResolversTypes = ResolversObject<{ AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>; AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; - MyScalar: ResolverTypeWrapper; - Int: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; + MyScalar: ResolverTypeWrapper; + Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; }>; /** Mapping between all available schema types and the resolvers parents */ export type ResolversParentTypes = ResolversObject<{ MyType: Omit & { unionChild?: Maybe }; - String: Scalars['String']; + String: Scalars['String']['output']; Child: Child; MyOtherType: MyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; Query: {}; Subscription: {}; Node: ResolversInterfaceTypes['Node']; - ID: Scalars['ID']; + ID: Scalars['ID']['output']; SomeNode: SomeNode; AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; @@ -221,15 +221,15 @@ export type ResolversParentTypes = ResolversObject<{ AnotherNodeWithChild: Omit & { unionChild?: Maybe }; AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; - MyScalar: Scalars['MyScalar']; - Int: Scalars['Int']; - Boolean: Scalars['Boolean']; + MyScalar: Scalars['MyScalar']['output']; + Int: Scalars['Int']['output']; + Boolean: Scalars['Boolean']['output']; }>; export type MyDirectiveDirectiveArgs = { - arg: Scalars['Int']; - arg2: Scalars['String']; - arg3: Scalars['Boolean']; + arg: Scalars['Int']['input']; + arg2: Scalars['String']['input']; + arg3: Scalars['Boolean']['input']; }; export type MyDirectiveDirectiveResolver = DirectiveResolverFn; @@ -442,14 +442,14 @@ export type ResolversInterfaceTypes> = R /** Mapping between all available schema types and the resolvers types */ export type ResolversTypes = ResolversObject<{ MyType: ResolverTypeWrapper & { unionChild?: Types.Maybe }>; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; Child: ResolverTypeWrapper; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; Query: ResolverTypeWrapper<{}>; Subscription: ResolverTypeWrapper<{}>; Node: ResolverTypeWrapper['Node']>; - ID: ResolverTypeWrapper; + ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; @@ -457,22 +457,22 @@ export type ResolversTypes = ResolversObject<{ AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Types.Maybe }>; AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Types.Maybe, unionChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; - MyScalar: ResolverTypeWrapper; - Int: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; + MyScalar: ResolverTypeWrapper; + Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; }>; /** Mapping between all available schema types and the resolvers parents */ export type ResolversParentTypes = ResolversObject<{ MyType: Omit & { unionChild?: Types.Maybe }; - String: Types.Scalars['String']; + String: Types.Scalars['String']['output']; Child: Types.Child; MyOtherType: Types.MyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; Query: {}; Subscription: {}; Node: ResolversInterfaceTypes['Node']; - ID: Types.Scalars['ID']; + ID: Types.Scalars['ID']['output']; SomeNode: Types.SomeNode; AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; @@ -480,15 +480,15 @@ export type ResolversParentTypes = ResolversObject<{ AnotherNodeWithChild: Omit & { unionChild?: Types.Maybe }; AnotherNodeWithAll: Omit & { unionChild?: Types.Maybe, unionChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; - MyScalar: Types.Scalars['MyScalar']; - Int: Types.Scalars['Int']; - Boolean: Types.Scalars['Boolean']; + MyScalar: Types.Scalars['MyScalar']['output']; + Int: Types.Scalars['Int']['output']; + Boolean: Types.Scalars['Boolean']['output']; }>; export type MyDirectiveDirectiveArgs = { - arg: Types.Scalars['Int']; - arg2: Types.Scalars['String']; - arg3: Types.Scalars['Boolean']; + arg: Types.Scalars['Int']['input']; + arg2: Types.Scalars['String']['input']; + arg3: Types.Scalars['Boolean']['input']; }; export type MyDirectiveDirectiveResolver = DirectiveResolverFn; @@ -617,37 +617,37 @@ export type Omit = Pick>; export type RequireFields = Omit & { [P in K]-?: NonNullable }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; - MyScalar: any; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } + MyScalar: { input: any; output: any; } }; export type MyType = { __typename?: 'MyType'; - foo: Scalars['String']; + foo: Scalars['String']['output']; otherType?: Maybe; - withArgs?: Maybe; + withArgs?: Maybe; unionChild?: Maybe; }; export type MyTypeWithArgsArgs = { - arg?: InputMaybe; - arg2: Scalars['String']; + arg?: InputMaybe; + arg2: Scalars['String']['input']; }; export type Child = { __typename?: 'Child'; - bar: Scalars['String']; + bar: Scalars['String']['output']; parent?: Maybe; }; export type MyOtherType = { __typename?: 'MyOtherType'; - bar: Scalars['String']; + bar: Scalars['String']['output']; }; export type ChildUnion = Child | MyOtherType; @@ -663,16 +663,16 @@ export type Subscription = { }; export type Node = { - id: Scalars['ID']; + id: Scalars['ID']['output']; }; export type SomeNode = Node & { __typename?: 'SomeNode'; - id: Scalars['ID']; + id: Scalars['ID']['output']; }; export type AnotherNode = { - id: Scalars['ID']; + id: Scalars['ID']['output']; }; export type WithChild = { @@ -687,14 +687,14 @@ export type WithChildren = { export type AnotherNodeWithChild = AnotherNode & WithChild & { __typename?: 'AnotherNodeWithChild'; - id: Scalars['ID']; + id: Scalars['ID']['output']; unionChild?: Maybe; interfaceChild?: Maybe; }; export type AnotherNodeWithAll = AnotherNode & WithChild & WithChildren & { __typename?: 'AnotherNodeWithAll'; - id: Scalars['ID']; + id: Scalars['ID']['output']; unionChild?: Maybe; unionChildren: Array; interfaceChild?: Maybe; @@ -787,14 +787,14 @@ export type ResolversInterfaceTypes> = R /** Mapping between all available schema types and the resolvers types */ export type ResolversTypes = ResolversObject<{ MyType: ResolverTypeWrapper & { unionChild?: Maybe }>; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; Child: ResolverTypeWrapper; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; Query: ResolverTypeWrapper<{}>; Subscription: ResolverTypeWrapper<{}>; Node: ResolverTypeWrapper['Node']>; - ID: ResolverTypeWrapper; + ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; @@ -802,22 +802,22 @@ export type ResolversTypes = ResolversObject<{ AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>; AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; - MyScalar: ResolverTypeWrapper; - Int: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; + MyScalar: ResolverTypeWrapper; + Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; }>; /** Mapping between all available schema types and the resolvers parents */ export type ResolversParentTypes = ResolversObject<{ MyType: Omit & { unionChild?: Maybe }; - String: Scalars['String']; + String: Scalars['String']['output']; Child: Child; MyOtherType: MyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; Query: {}; Subscription: {}; Node: ResolversInterfaceTypes['Node']; - ID: Scalars['ID']; + ID: Scalars['ID']['output']; SomeNode: SomeNode; AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; @@ -825,15 +825,15 @@ export type ResolversParentTypes = ResolversObject<{ AnotherNodeWithChild: Omit & { unionChild?: Maybe }; AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; - MyScalar: Scalars['MyScalar']; - Int: Scalars['Int']; - Boolean: Scalars['Boolean']; + MyScalar: Scalars['MyScalar']['output']; + Int: Scalars['Int']['output']; + Boolean: Scalars['Boolean']['output']; }>; export type MyDirectiveDirectiveArgs = { - arg: Scalars['Int']; - arg2: Scalars['String']; - arg3: Scalars['Boolean']; + arg: Scalars['Int']['input']; + arg2: Scalars['String']['input']; + arg3: Scalars['Boolean']['input']; }; export type MyDirectiveDirectiveResolver = DirectiveResolverFn; diff --git a/packages/plugins/typescript/resolvers/tests/mapping.spec.ts b/packages/plugins/typescript/resolvers/tests/mapping.spec.ts index 61dfb0b8436..ec9d5ba7bbf 100644 --- a/packages/plugins/typescript/resolvers/tests/mapping.spec.ts +++ b/packages/plugins/typescript/resolvers/tests/mapping.spec.ts @@ -24,14 +24,14 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversTypes = { MyType: ResolverTypeWrapper & { unionChild?: Maybe }>; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; Child: ResolverTypeWrapper; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; Query: ResolverTypeWrapper<{}>; Subscription: ResolverTypeWrapper<{}>; Node: ResolverTypeWrapper['Node']>; - ID: ResolverTypeWrapper; + ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; @@ -39,22 +39,22 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>; AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; - MyScalar: ResolverTypeWrapper; - Int: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; + MyScalar: ResolverTypeWrapper; + Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; }; `); expect(result.content).toBeSimilarStringTo(` export type ResolversParentTypes = { MyType: Omit & { unionChild?: Maybe }; - String: Scalars['String']; + String: Scalars['String']['output']; Child: Child; MyOtherType: MyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; Query: {}; Subscription: {}; Node: ResolversInterfaceTypes['Node']; - ID: Scalars['ID']; + ID: Scalars['ID']['output']; SomeNode: SomeNode; AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; @@ -62,9 +62,9 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: Omit & { unionChild?: Maybe }; AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; - MyScalar: Scalars['MyScalar']; - Int: Scalars['Int']; - Boolean: Scalars['Boolean']; + MyScalar: Scalars['MyScalar']['output']; + Int: Scalars['Int']['output']; + Boolean: Scalars['Boolean']['output']; }; `); }); @@ -107,7 +107,7 @@ describe('ResolversTypes', () => { Query: ResolverTypeWrapper<{}>; Subscription: ResolverTypeWrapper<{}>; Node: ResolverTypeWrapper['Node']>; - ID: ResolverTypeWrapper; + ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; @@ -115,9 +115,9 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: ResolverTypeWrapper; AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; - MyScalar: ResolverTypeWrapper; - Int: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; + MyScalar: ResolverTypeWrapper; + Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; }; `); expect(result.content).toBeSimilarStringTo(` @@ -130,7 +130,7 @@ describe('ResolversTypes', () => { Query: {}; Subscription: {}; Node: ResolversInterfaceTypes['Node']; - ID: Scalars['ID']; + ID: Scalars['ID']['output']; SomeNode: SomeNode; AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; @@ -138,9 +138,9 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: AnotherNodeWithChildMapper; AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; - MyScalar: Scalars['MyScalar']; - Int: Scalars['Int']; - Boolean: Scalars['Boolean']; + MyScalar: Scalars['MyScalar']['output']; + Int: Scalars['Int']['output']; + Boolean: Scalars['Boolean']['output']; }; `); }); @@ -185,23 +185,23 @@ describe('ResolversTypes', () => { expect(content).toBeSimilarStringTo(` export type ResolversTypes = { Movie: ResolverTypeWrapper; - ID: ResolverTypeWrapper; - String: ResolverTypeWrapper; + ID: ResolverTypeWrapper; + String: ResolverTypeWrapper; Book: ResolverTypeWrapper; MovieLike: ResolverTypeWrapper['MovieLike']>; NonInterfaceHasNarrative: ResolverTypeWrapper & { narrative: ResolversTypes['MovieLike'], movie: ResolversTypes['Movie'] }>; - Boolean: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; }; `); expect(content).toBeSimilarStringTo(` export type ResolversParentTypes = { Movie: MovieEntity; - ID: Scalars['ID']; - String: Scalars['String']; + ID: Scalars['ID']['output']; + String: Scalars['String']['output']; Book: Book; MovieLike: ResolversUnionTypes['MovieLike']; NonInterfaceHasNarrative: Omit & { narrative: ResolversParentTypes['MovieLike'], movie: ResolversParentTypes['Movie'] }; - Boolean: Scalars['Boolean']; + Boolean: Scalars['Boolean']['output']; }; `); }); @@ -254,26 +254,26 @@ describe('ResolversTypes', () => { `); expect(content).toBeSimilarStringTo(`export type ResolversTypes = { Movie: ResolverTypeWrapper; - ID: ResolverTypeWrapper; - String: ResolverTypeWrapper; + ID: ResolverTypeWrapper; + String: ResolverTypeWrapper; Book: ResolverTypeWrapper; MovieLike: ResolverTypeWrapper['MovieLike']>; NonInterfaceHasNarrative: ResolverTypeWrapper & { narrative: ResolversTypes['MovieLike'], movie: ResolversTypes['Movie'] }>; LayerOfIndirection: ResolverTypeWrapper & { movies: Array }>; AnotherLayerOfIndirection: ResolverTypeWrapper & { inner: ResolversTypes['LayerOfIndirection'] }>; - Boolean: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; };`); expect(content).toBeSimilarStringTo(` export type ResolversParentTypes = { Movie: MovieEntity; - ID: Scalars['ID']; - String: Scalars['String']; + ID: Scalars['ID']['output']; + String: Scalars['String']['output']; Book: Book; MovieLike: ResolversUnionTypes['MovieLike']; NonInterfaceHasNarrative: Omit & { narrative: ResolversParentTypes['MovieLike'], movie: ResolversParentTypes['Movie'] }; LayerOfIndirection: Omit & { movies: Array }; AnotherLayerOfIndirection: Omit & { inner: ResolversParentTypes['LayerOfIndirection'] }; - Boolean: Scalars['Boolean']; + Boolean: Scalars['Boolean']['output']; }; `); }); @@ -310,10 +310,10 @@ describe('ResolversTypes', () => { expect(content).toBeSimilarStringTo(`export type GqlResolversTypes = { Account: ResolverTypeWrapper>; - ID: ResolverTypeWrapper>; - String: ResolverTypeWrapper>; + ID: ResolverTypeWrapper>; + String: ResolverTypeWrapper>; Program: ResolverTypeWrapper>; - Boolean: ResolverTypeWrapper>; + Boolean: ResolverTypeWrapper>; };`); }); @@ -407,14 +407,14 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversTypes = { MyType: ResolverTypeWrapper & { unionChild?: Maybe }>>; - String: ResolverTypeWrapper>; + String: ResolverTypeWrapper>; Child: ResolverTypeWrapper>; MyOtherType: ResolverTypeWrapper>; ChildUnion: Partial['ChildUnion']>>; Query: ResolverTypeWrapper<{}>; Subscription: ResolverTypeWrapper<{}>; Node: ResolverTypeWrapper['Node']>; - ID: ResolverTypeWrapper>; + ID: ResolverTypeWrapper>; SomeNode: ResolverTypeWrapper>; AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; @@ -422,21 +422,21 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>>; AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>>; MyUnion: Partial['MyUnion']>>; - MyScalar: ResolverTypeWrapper>; - Int: ResolverTypeWrapper>; - Boolean: ResolverTypeWrapper>; + MyScalar: ResolverTypeWrapper>; + Int: ResolverTypeWrapper>; + Boolean: ResolverTypeWrapper>; };`); expect(result.content).toBeSimilarStringTo(` export type ResolversParentTypes = { MyType: Partial & { unionChild?: Maybe }>; - String: Partial; + String: Partial; Child: Partial; MyOtherType: Partial; ChildUnion: Partial['ChildUnion']>; Query: {}; Subscription: {}; Node: ResolversInterfaceTypes['Node']; - ID: Partial; + ID: Partial; SomeNode: Partial; AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; @@ -444,9 +444,9 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: Partial & { unionChild?: Maybe }>; AnotherNodeWithAll: Partial & { unionChild?: Maybe, unionChildren: Array }>; MyUnion: Partial['MyUnion']>; - MyScalar: Partial; - Int: Partial; - Boolean: Partial; + MyScalar: Partial; + Int: Partial; + Boolean: Partial; }; `); }); @@ -480,14 +480,14 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversTypes = { MyType: ResolverTypeWrapper & { unionChild?: Maybe }>>; - String: ResolverTypeWrapper>; + String: ResolverTypeWrapper>; Child: ResolverTypeWrapper>; MyOtherType: ResolverTypeWrapper>; ChildUnion: CustomPartial['ChildUnion']>>; Query: ResolverTypeWrapper<{}>; Subscription: ResolverTypeWrapper<{}>; Node: ResolverTypeWrapper['Node']>; - ID: ResolverTypeWrapper>; + ID: ResolverTypeWrapper>; SomeNode: ResolverTypeWrapper>; AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; @@ -495,21 +495,21 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>>; AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>>; MyUnion: CustomPartial['MyUnion']>>; - MyScalar: ResolverTypeWrapper>; - Int: ResolverTypeWrapper>; - Boolean: ResolverTypeWrapper>; + MyScalar: ResolverTypeWrapper>; + Int: ResolverTypeWrapper>; + Boolean: ResolverTypeWrapper>; };`); expect(result.content).toBeSimilarStringTo(` export type ResolversParentTypes = { MyType: CustomPartial & { unionChild?: Maybe }>; - String: CustomPartial; + String: CustomPartial; Child: CustomPartial; MyOtherType: CustomPartial; ChildUnion: CustomPartial['ChildUnion']>; Query: {}; Subscription: {}; Node: ResolversInterfaceTypes['Node']; - ID: CustomPartial; + ID: CustomPartial; SomeNode: CustomPartial; AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; @@ -517,9 +517,9 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: CustomPartial & { unionChild?: Maybe }>; AnotherNodeWithAll: CustomPartial & { unionChild?: Maybe, unionChildren: Array }>; MyUnion: CustomPartial['MyUnion']>; - MyScalar: CustomPartial; - Int: CustomPartial; - Boolean: CustomPartial; + MyScalar: CustomPartial; + Int: CustomPartial; + Boolean: CustomPartial; }; `); }); @@ -556,14 +556,14 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversTypes = { MyType: ResolverTypeWrapper & { unionChild?: Maybe }>>; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; Query: ResolverTypeWrapper<{}>; Subscription: ResolverTypeWrapper<{}>; Node: ResolverTypeWrapper['Node']>; - ID: ResolverTypeWrapper; + ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; @@ -571,21 +571,21 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>>; AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; - MyScalar: ResolverTypeWrapper; - Int: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; + MyScalar: ResolverTypeWrapper; + Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; };`); expect(result.content).toBeSimilarStringTo(` export type ResolversParentTypes = { MyType: CustomPartial & { unionChild?: Maybe }>; - String: Scalars['String']; + String: Scalars['String']['output']; Child: Omit & { parent?: Maybe }; MyOtherType: MyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; Query: {}; Subscription: {}; Node: ResolversInterfaceTypes['Node']; - ID: Scalars['ID']; + ID: Scalars['ID']['output']; SomeNode: SomeNode; AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; @@ -593,9 +593,9 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: CustomPartial & { unionChild?: Maybe }>; AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; - MyScalar: Scalars['MyScalar']; - Int: Scalars['Int']; - Boolean: Scalars['Boolean']; + MyScalar: Scalars['MyScalar']['output']; + Int: Scalars['Int']['output']; + Boolean: Scalars['Boolean']['output']; }; `); }); @@ -633,11 +633,11 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversTypes = { User: ResolverTypeWrapper; - ID: ResolverTypeWrapper>; - String: ResolverTypeWrapper>; + ID: ResolverTypeWrapper>; + String: ResolverTypeWrapper>; Chat: ResolverTypeWrapper & { owner: ResolversTypes['User'], members?: Maybe> }>>; Query: ResolverTypeWrapper<{}>; - Boolean: ResolverTypeWrapper>; + Boolean: ResolverTypeWrapper>; }; `); @@ -708,14 +708,14 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversTypes = { MyType: ResolverTypeWrapper; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; Query: ResolverTypeWrapper<{}>; Subscription: ResolverTypeWrapper<{}>; Node: ResolverTypeWrapper['Node']>; - ID: ResolverTypeWrapper; + ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; @@ -723,21 +723,21 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: ResolverTypeWrapper; AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; - MyScalar: ResolverTypeWrapper; - Int: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; + MyScalar: ResolverTypeWrapper; + Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; };`); expect(result.content).toBeSimilarStringTo(` export type ResolversParentTypes = { MyType: DatabaseMyType; - String: Scalars['String']; + String: Scalars['String']['output']; Child: Omit & { parent?: Maybe }; MyOtherType: MyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; Query: {}; Subscription: {}; Node: ResolversInterfaceTypes['Node']; - ID: Scalars['ID']; + ID: Scalars['ID']['output']; SomeNode: SomeNode; AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; @@ -745,9 +745,9 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: AnotherNodeWithChildMapper; AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; - MyScalar: Scalars['MyScalar']; - Int: Scalars['Int']; - Boolean: Scalars['Boolean']; + MyScalar: Scalars['MyScalar']['output']; + Int: Scalars['Int']['output']; + Boolean: Scalars['Boolean']['output']; }; `); }); @@ -786,14 +786,14 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversTypes = { MyType: ResolverTypeWrapper; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; Query: ResolverTypeWrapper<{}>; Subscription: ResolverTypeWrapper<{}>; Node: ResolverTypeWrapper['Node']>; - ID: ResolverTypeWrapper; + ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; @@ -801,21 +801,21 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: ResolverTypeWrapper; AnotherNodeWithAll: ResolverTypeWrapper; MyUnion: ResolverTypeWrapper['MyUnion']>; - MyScalar: ResolverTypeWrapper; - Int: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; + MyScalar: ResolverTypeWrapper; + Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; };`); expect(result.content).toBeSimilarStringTo(` export type ResolversParentTypes = { MyType: DatabaseMyType; - String: Scalars['String']; + String: Scalars['String']['output']; Child: Omit & { parent?: Maybe }; MyOtherType: DatabaseMyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; Query: {}; Subscription: {}; Node: ResolversInterfaceTypes['Node']; - ID: Scalars['ID']; + ID: Scalars['ID']['output']; SomeNode: SomeNode; AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; @@ -823,9 +823,9 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: AnotherNodeWithChildMapper; AnotherNodeWithAll: AnotherNodeWithAllMapper; MyUnion: ResolversUnionTypes['MyUnion']; - MyScalar: Scalars['MyScalar']; - Int: Scalars['Int']; - Boolean: Scalars['Boolean']; + MyScalar: Scalars['MyScalar']['output']; + Int: Scalars['Int']['output']; + Boolean: Scalars['Boolean']['output']; }; `); }); @@ -870,14 +870,14 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversTypes = { MyType: ResolverTypeWrapper; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; Query: ResolverTypeWrapper<{}>; Subscription: ResolverTypeWrapper<{}>; Node: ResolverTypeWrapper['Node']>; - ID: ResolverTypeWrapper; + ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; @@ -885,21 +885,21 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: ResolverTypeWrapper; AnotherNodeWithAll: ResolverTypeWrapper; MyUnion: ResolverTypeWrapper['MyUnion']>; - MyScalar: ResolverTypeWrapper; - Int: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; + MyScalar: ResolverTypeWrapper; + Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; };`); expect(result.content).toBeSimilarStringTo(` export type ResolversParentTypes = { MyType: DatabaseMyType; - String: Scalars['String']; + String: Scalars['String']['output']; Child: Omit & { parent?: Maybe }; MyOtherType: DatabaseMyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; Query: {}; Subscription: {}; Node: ResolversInterfaceTypes['Node']; - ID: Scalars['ID']; + ID: Scalars['ID']['output']; SomeNode: SomeNode; AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; @@ -907,9 +907,9 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: AnotherNodeWithChildMapper; AnotherNodeWithAll: AnotherNodeWithAllMapper; MyUnion: ResolversUnionTypes['MyUnion']; - MyScalar: Scalars['MyScalar']; - Int: Scalars['Int']; - Boolean: Scalars['Boolean']; + MyScalar: Scalars['MyScalar']['output']; + Int: Scalars['Int']['output']; + Boolean: Scalars['Boolean']['output']; }; `); }); @@ -1010,14 +1010,14 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversTypes = { MyType: ResolverTypeWrapper; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; Query: ResolverTypeWrapper<{}>; Subscription: ResolverTypeWrapper<{}>; Node: ResolverTypeWrapper['Node']>; - ID: ResolverTypeWrapper; + ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; @@ -1025,21 +1025,21 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: ResolverTypeWrapper; AnotherNodeWithAll: ResolverTypeWrapper; MyUnion: ResolverTypeWrapper['MyUnion']>; - MyScalar: ResolverTypeWrapper; - Int: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; + MyScalar: ResolverTypeWrapper; + Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; };`); expect(result.content).toBeSimilarStringTo(` export type ResolversParentTypes = { MyType: MyTypeDb; - String: Scalars['String']; + String: Scalars['String']['output']; Child: Omit & { parent?: Maybe }; MyOtherType: CustomMyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; Query: {}; Subscription: {}; Node: ResolversInterfaceTypes['Node']; - ID: Scalars['ID']; + ID: Scalars['ID']['output']; SomeNode: SomeNode; AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; @@ -1047,9 +1047,9 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: AnotherNodeWithChildMapper; AnotherNodeWithAll: AnotherNodeWithAllMapper; MyUnion: ResolversUnionTypes['MyUnion']; - MyScalar: Scalars['MyScalar']; - Int: Scalars['Int']; - Boolean: Scalars['Boolean']; + MyScalar: Scalars['MyScalar']['output']; + Int: Scalars['Int']['output']; + Boolean: Scalars['Boolean']['output']; }; `); }); @@ -1085,14 +1085,14 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversTypes = { MyType: ResolverTypeWrapper & { unionChild?: Maybe }>>; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; Query: ResolverTypeWrapper<{}>; Subscription: ResolverTypeWrapper<{}>; Node: ResolverTypeWrapper['Node']>; - ID: ResolverTypeWrapper; + ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; @@ -1100,23 +1100,23 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>>; AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; - MyScalar: ResolverTypeWrapper; - Int: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; + MyScalar: ResolverTypeWrapper; + Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; }; `); expect(result.content).toBeSimilarStringTo(` export type ResolversParentTypes = { MyType: Partial & { unionChild?: Maybe }>; - String: Scalars['String']; + String: Scalars['String']['output']; Child: Omit & { parent?: Maybe }; MyOtherType: MyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; Query: {}; Subscription: {}; Node: ResolversInterfaceTypes['Node']; - ID: Scalars['ID']; + ID: Scalars['ID']['output']; SomeNode: SomeNode; AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; @@ -1124,9 +1124,9 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: ExtraPartial & { unionChild?: Maybe }>; AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; - MyScalar: Scalars['MyScalar']; - Int: Scalars['Int']; - Boolean: Scalars['Boolean']; + MyScalar: Scalars['MyScalar']['output']; + Int: Scalars['Int']['output']; + Boolean: Scalars['Boolean']['output']; }; `); }); @@ -1225,9 +1225,9 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type MyDirectiveDirectiveArgs = { - arg: Scalars['Int']; - arg2: Scalars['String']; - arg3: Scalars['Boolean']; + arg: Scalars['Int']['input']; + arg2: Scalars['String']['input']; + arg3: Scalars['Boolean']['input']; }; `); expect(result.content).toBeSimilarStringTo(` @@ -1308,9 +1308,9 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type MyDirectiveDirectiveArgs = { - arg: Scalars['Int']; - arg2: Scalars['String']; - arg3: Scalars['Boolean']; + arg: Scalars['Int']['input']; + arg2: Scalars['String']['input']; + arg3: Scalars['Boolean']['input']; }; `); expect(result.content).toBeSimilarStringTo(` @@ -1389,9 +1389,9 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type MyDirectiveDirectiveArgs = { - arg: Scalars['Int']; - arg2: Scalars['String']; - arg3: Scalars['Boolean']; + arg: Scalars['Int']['input']; + arg2: Scalars['String']['input']; + arg3: Scalars['Boolean']['input']; }; `); expect(result.content).toBeSimilarStringTo(` @@ -1624,14 +1624,14 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversTypes = { MyType: ResolverTypeWrapper & { otherType?: Maybe, unionChild?: Maybe }>; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; Query: ResolverTypeWrapper<{}>; Subscription: ResolverTypeWrapper<{}>; Node: ResolverTypeWrapper['Node']>; - ID: ResolverTypeWrapper; + ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; @@ -1639,21 +1639,21 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>; AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; - MyScalar: ResolverTypeWrapper; - Int: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; + MyScalar: ResolverTypeWrapper; + Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; };`); expect(result.content).toBeSimilarStringTo(` export type ResolversParentTypes = { MyType: Omit & { otherType?: Maybe, unionChild?: Maybe }; - String: Scalars['String']; + String: Scalars['String']['output']; Child: Omit & { parent?: Maybe }; MyOtherType: MyOtherTypeCustom; ChildUnion: ResolversUnionTypes['ChildUnion']; Query: {}; Subscription: {}; Node: ResolversInterfaceTypes['Node']; - ID: Scalars['ID']; + ID: Scalars['ID']['output']; SomeNode: SomeNode; AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; @@ -1661,9 +1661,9 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: Omit & { unionChild?: Maybe }; AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; - MyScalar: Scalars['MyScalar']; - Int: Scalars['Int']; - Boolean: Scalars['Boolean']; + MyScalar: Scalars['MyScalar']['output']; + Int: Scalars['Int']['output']; + Boolean: Scalars['Boolean']['output']; }; `); await resolversTestingValidate(mergeOutputs([result, 'type MyOtherTypeCustom = {};'])); @@ -1700,14 +1700,14 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversTypes = { MyType: ResolverTypeWrapper; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; Query: ResolverTypeWrapper<{}>; Subscription: ResolverTypeWrapper<{}>; Node: ResolverTypeWrapper['Node']>; - ID: ResolverTypeWrapper; + ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; @@ -1715,21 +1715,21 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>; AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; - MyScalar: ResolverTypeWrapper; - Int: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; + MyScalar: ResolverTypeWrapper; + Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; };`); expect(result.content).toBeSimilarStringTo(` export type ResolversParentTypes = { MyType: MyTypeCustom; - String: Scalars['String']; + String: Scalars['String']['output']; Child: Omit & { parent?: Maybe }; MyOtherType: MyOtherTypeCustom; ChildUnion: ResolversUnionTypes['ChildUnion']; Query: {}; Subscription: {}; Node: ResolversInterfaceTypes['Node']; - ID: Scalars['ID']; + ID: Scalars['ID']['output']; SomeNode: SomeNode; AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; @@ -1737,9 +1737,9 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: Omit & { unionChild?: Maybe }; AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; - MyScalar: Scalars['MyScalar']; - Int: Scalars['Int']; - Boolean: Scalars['Boolean']; + MyScalar: Scalars['MyScalar']['output']; + Int: Scalars['Int']['output']; + Boolean: Scalars['Boolean']['output']; }; `); await resolversTestingValidate(mergeOutputs([result, `type MyTypeCustom = {}; type MyOtherTypeCustom = {};`])); @@ -1778,14 +1778,14 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversTypes = { MyType: ResolverTypeWrapper & { otherType?: Maybe, unionChild?: Maybe }>; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; Child: ResolverTypeWrapper & { parent?: Maybe }>; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; Query: ResolverTypeWrapper<{}>; Subscription: ResolverTypeWrapper<{}>; Node: ResolverTypeWrapper['Node']>; - ID: ResolverTypeWrapper; + ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; @@ -1793,23 +1793,23 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: ResolverTypeWrapper; AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; - MyScalar: ResolverTypeWrapper; - Int: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; + MyScalar: ResolverTypeWrapper; + Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; }; `); expect(result.content).toBeSimilarStringTo(` export type ResolversParentTypes = { MyType: Omit & { otherType?: Maybe, unionChild?: Maybe }; - String: Scalars['String']; + String: Scalars['String']['output']; Child: Omit & { parent?: Maybe }; MyOtherType: MyNamespace.MyCustomOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; Query: {}; Subscription: {}; Node: ResolversInterfaceTypes['Node']; - ID: Scalars['ID']; + ID: Scalars['ID']['output']; SomeNode: SomeNode; AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; @@ -1817,9 +1817,9 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: InterfaceNamespace.AnotherNodeWithChildMapper; AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; - MyScalar: Scalars['MyScalar']; - Int: Scalars['Int']; - Boolean: Scalars['Boolean']; + MyScalar: Scalars['MyScalar']['output']; + Int: Scalars['Int']['output']; + Boolean: Scalars['Boolean']['output']; }; `); }); @@ -1934,14 +1934,14 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversTypes = { MyType: ResolverTypeWrapper & { unionChild?: Maybe }>; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; Child: ResolverTypeWrapper; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; Query: ResolverTypeWrapper; Subscription: ResolverTypeWrapper; Node: ResolverTypeWrapper['Node']>; - ID: ResolverTypeWrapper; + ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; @@ -1949,23 +1949,23 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>; AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; - MyScalar: ResolverTypeWrapper; - Int: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; + MyScalar: ResolverTypeWrapper; + Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; }; `); expect(result.content).toBeSimilarStringTo(` export type ResolversParentTypes = { MyType: Omit & { unionChild?: Maybe }; - String: Scalars['String']; + String: Scalars['String']['output']; Child: Child; MyOtherType: MyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; Query: MyNamespace.MyRootType; Subscription: MyNamespace.MyRootType; Node: ResolversInterfaceTypes['Node']; - ID: Scalars['ID']; + ID: Scalars['ID']['output']; SomeNode: SomeNode; AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; @@ -1973,9 +1973,9 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: Omit & { unionChild?: Maybe }; AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; - MyScalar: Scalars['MyScalar']; - Int: Scalars['Int']; - Boolean: Scalars['Boolean']; + MyScalar: Scalars['MyScalar']['output']; + Int: Scalars['Int']['output']; + Boolean: Scalars['Boolean']['output']; }; `); }); @@ -2012,14 +2012,14 @@ describe('ResolversTypes', () => { expect(result.content).toBeSimilarStringTo(` export type ResolversTypes = { MyType: ResolverTypeWrapper & { unionChild?: Maybe }>>; - String: ResolverTypeWrapper>; + String: ResolverTypeWrapper>; Child: ResolverTypeWrapper & { parent?: Maybe }>>; MyOtherType: ResolverTypeWrapper>; ChildUnion: MyNamespace.MyDefaultMapper['ChildUnion']>>; Query: ResolverTypeWrapper<{}>; Subscription: ResolverTypeWrapper<{}>; Node: ResolverTypeWrapper['Node']>; - ID: ResolverTypeWrapper>; + ID: ResolverTypeWrapper>; SomeNode: ResolverTypeWrapper>; AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; @@ -2027,22 +2027,22 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>>; AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>>; MyUnion: MyNamespace.MyDefaultMapper['MyUnion']>>; - MyScalar: ResolverTypeWrapper>; - Int: ResolverTypeWrapper>; - Boolean: ResolverTypeWrapper>; + MyScalar: ResolverTypeWrapper>; + Int: ResolverTypeWrapper>; + Boolean: ResolverTypeWrapper>; }; `); expect(result.content).toBeSimilarStringTo(` export type ResolversParentTypes = { MyType: MyNamespace.MyType & { unionChild?: Maybe }>; - String: MyNamespace.MyDefaultMapper; + String: MyNamespace.MyDefaultMapper; Child: MyNamespace.MyDefaultMapper & { parent?: Maybe }>; MyOtherType: MyNamespace.MyDefaultMapper; ChildUnion: MyNamespace.MyDefaultMapper['ChildUnion']>; Query: {}; Subscription: {}; Node: ResolversInterfaceTypes['Node']; - ID: MyNamespace.MyDefaultMapper; + ID: MyNamespace.MyDefaultMapper; SomeNode: MyNamespace.MyDefaultMapper; AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; @@ -2050,9 +2050,9 @@ describe('ResolversTypes', () => { AnotherNodeWithChild: InterfaceNamespace.MyInterface & { unionChild?: Maybe }>; AnotherNodeWithAll: MyNamespace.MyDefaultMapper & { unionChild?: Maybe, unionChildren: Array }>; MyUnion: MyNamespace.MyDefaultMapper['MyUnion']>; - MyScalar: MyNamespace.MyDefaultMapper; - Int: MyNamespace.MyDefaultMapper; - Boolean: MyNamespace.MyDefaultMapper; + MyScalar: MyNamespace.MyDefaultMapper; + Int: MyNamespace.MyDefaultMapper; + Boolean: MyNamespace.MyDefaultMapper; }; `); }); diff --git a/packages/plugins/typescript/resolvers/tests/ts-resolvers.spec.ts b/packages/plugins/typescript/resolvers/tests/ts-resolvers.spec.ts index fc715a5a9ae..ca86237229a 100644 --- a/packages/plugins/typescript/resolvers/tests/ts-resolvers.spec.ts +++ b/packages/plugins/typescript/resolvers/tests/ts-resolvers.spec.ts @@ -892,9 +892,9 @@ __isTypeOf?: IsTypeOfResolverFn; expect(result.content).toBeSimilarStringTo(` export type MyDirectiveDirectiveArgs = { - arg: Scalars['Int']; - arg2: Scalars['String']; - arg3: Scalars['Boolean']; + arg: Scalars['Int']['input']; + arg2: Scalars['String']['input']; + arg3: Scalars['Boolean']['input']; }; `); @@ -968,9 +968,9 @@ __isTypeOf?: IsTypeOfResolverFn; expect(result.content).toBeSimilarStringTo(` export type MyDirectiveDirectiveArgs = { - arg: Scalars['Int']; - arg2: Scalars['String']; - arg3: Scalars['Boolean']; + arg: Scalars['Int']['input']; + arg2: Scalars['String']['input']; + arg3: Scalars['Boolean']['input']; };`); expect(result.content).toBeSimilarStringTo(` @@ -1045,9 +1045,9 @@ __isTypeOf?: IsTypeOfResolverFn; expect(result.content).toBeSimilarStringTo(` export type MyDirectiveDirectiveArgs = { - arg: Scalars['Int']; - arg2: Scalars['String']; - arg3: Scalars['Boolean']; + arg: Scalars['Int']['input']; + arg2: Scalars['String']['input']; + arg3: Scalars['Boolean']['input']; }; `); @@ -1136,9 +1136,9 @@ __isTypeOf?: IsTypeOfResolverFn; expect(result.content).toBeSimilarStringTo(` export type MyDirectiveDirectiveArgs = { - arg: Scalars['Int']; - arg2: Scalars['String']; - arg3: Scalars['Boolean']; + arg: Scalars['Int']['input']; + arg2: Scalars['String']['input']; + arg3: Scalars['Boolean']['input']; }; `); @@ -1211,9 +1211,9 @@ __isTypeOf?: IsTypeOfResolverFn; expect(result.content).toBeSimilarStringTo(` export type MyDirectiveDirectiveArgs = { - arg: Scalars['Int']; - arg2: Scalars['String']; - arg3: Scalars['Boolean']; + arg: Scalars['Int']['input']; + arg2: Scalars['String']['input']; + arg3: Scalars['Boolean']['input']; }; `); @@ -1285,9 +1285,9 @@ __isTypeOf?: IsTypeOfResolverFn; expect(result.content).toBeSimilarStringTo(` export type MyDirectiveDirectiveArgs = { - arg: Scalars['Int']; - arg2: Scalars['String']; - arg3: Scalars['Boolean']; + arg: Scalars['Int']['input']; + arg2: Scalars['String']['input']; + arg3: Scalars['Boolean']['input']; }; `); @@ -1360,9 +1360,9 @@ __isTypeOf?: IsTypeOfResolverFn; expect(result.content).toBeSimilarStringTo(` export type MyDirectiveDirectiveArgs = { - arg: Scalars['Int']; - arg2: Scalars['String']; - arg3: Scalars['Boolean']; + arg: Scalars['Int']['input']; + arg2: Scalars['String']['input']; + arg3: Scalars['Boolean']['input']; }; `); @@ -1670,13 +1670,13 @@ export type ResolverFn = ( expect(tsContent.content).toBeSimilarStringTo(` export type CccFoo = { __typename?: 'CCCFoo'; - foo: Scalars['String']; + foo: Scalars['String']['output']; }; `); expect(tsContent.content).toBeSimilarStringTo(` export type CccBar = { __typename?: 'CCCBar'; - bar: Scalars['String']; + bar: Scalars['String']['output']; }; `); @@ -1689,21 +1689,21 @@ export type ResolverFn = ( /** Mapping between all available schema types and the resolvers types */ export type ResolversTypes = { CCCFoo: ResolverTypeWrapper; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; CCCBar: ResolverTypeWrapper; Query: ResolverTypeWrapper<{}>; CCCUnion: ResolverTypeWrapper['CCCUnion']>; - Boolean: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; }; `); expect(content.content).toBeSimilarStringTo(` export type ResolversParentTypes = { CCCFoo: CccFoo; - String: Scalars['String']; + String: Scalars['String']['output']; CCCBar: CccBar; Query: {}; CCCUnion: ResolversUnionTypes['CCCUnion']; - Boolean: Scalars['Boolean']; + Boolean: Scalars['Boolean']['output']; }; `); expect(content.content).toBeSimilarStringTo(` @@ -1956,9 +1956,9 @@ export type ResolverFn = ( Subscription: ResolverTypeWrapper<{}>; Query: ResolverTypeWrapper<{}>; Mutation: ResolverTypeWrapper<{}>; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; Post: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; }; `); }); @@ -1989,9 +1989,9 @@ export type ResolverFn = ( Subscription: {}; Query: {}; Mutation: {}; - String: Scalars['String']; + String: Scalars['String']['output']; Post: Post; - Boolean: Scalars['Boolean']; + Boolean: Scalars['Boolean']['output']; }; `); }); @@ -2041,32 +2041,32 @@ export type ResolverFn = ( expect(content.content).toBeSimilarStringTo(` export type ResolversTypes = { Query: ResolverTypeWrapper<{}>; - ID: ResolverTypeWrapper; + ID: ResolverTypeWrapper; StandardError: ResolverTypeWrapper; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; User: ResolverTypeWrapper; UserResult: ResolverTypeWrapper; UserPayload: ResolverTypeWrapper['UserPayload']>; Post: ResolverTypeWrapper; PostsResult: ResolverTypeWrapper; PostsPayload: ResolverTypeWrapper['PostsPayload']>; - Boolean: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; }; `); expect(content.content).toBeSimilarStringTo(` export type ResolversParentTypes = { Query: {}; - ID: Scalars['ID']; + ID: Scalars['ID']['output']; StandardError: StandardError; - String: Scalars['String']; + String: Scalars['String']['output']; User: User; UserResult: UserResult; UserPayload: ResolversUnionTypes['UserPayload']; Post: Post; PostsResult: PostsResult; PostsPayload: ResolversUnionTypes['PostsPayload']; - Boolean: Scalars['Boolean']; + Boolean: Scalars['Boolean']['output']; }; `); }); @@ -2103,14 +2103,14 @@ export type ResolverFn = ( expect(content.content).toBeSimilarStringTo(` export type ResolversTypes = { MyType: ResolverTypeWrapper & { unionChild?: Maybe }>; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; Child: ResolverTypeWrapper; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; Query: ResolverTypeWrapper<{}>; Subscription: ResolverTypeWrapper<{}>; Node: ResolverTypeWrapper['Node']>; - ID: ResolverTypeWrapper; + ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; @@ -2118,23 +2118,23 @@ export type ResolverFn = ( AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>; AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; - MyScalar: ResolverTypeWrapper; - Int: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; + MyScalar: ResolverTypeWrapper; + Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; }; `); expect(content.content).toBeSimilarStringTo(` export type ResolversParentTypes = { MyType: Omit & { unionChild?: Maybe }; - String: Scalars['String']; + String: Scalars['String']['output']; Child: Child; MyOtherType: MyOtherType; ChildUnion: ResolversUnionTypes['ChildUnion']; Query: {}; Subscription: {}; Node: ResolversInterfaceTypes['Node']; - ID: Scalars['ID']; + ID: Scalars['ID']['output']; SomeNode: SomeNode; AnotherNode: ResolversInterfaceTypes['AnotherNode']; WithChild: ResolversInterfaceTypes['WithChild']; @@ -2142,9 +2142,9 @@ export type ResolverFn = ( AnotherNodeWithChild: Omit & { unionChild?: Maybe }; AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; MyUnion: ResolversUnionTypes['MyUnion']; - MyScalar: Scalars['MyScalar']; - Int: Scalars['Int']; - Boolean: Scalars['Boolean']; + MyScalar: Scalars['MyScalar']['output']; + Int: Scalars['Int']['output']; + Boolean: Scalars['Boolean']['output']; }; `); }); @@ -2169,14 +2169,14 @@ export type ResolverFn = ( expect(content.content).toBeSimilarStringTo(` export type I_ResolversTypes_Types = { MyType: ResolverTypeWrapper & { unionChild?: Maybe }>; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; Child: ResolverTypeWrapper; MyOtherType: ResolverTypeWrapper; ChildUnion: ResolverTypeWrapper['ChildUnion']>; Query: ResolverTypeWrapper<{}>; Subscription: ResolverTypeWrapper<{}>; Node: ResolverTypeWrapper['Node']>; - ID: ResolverTypeWrapper; + ID: ResolverTypeWrapper; SomeNode: ResolverTypeWrapper; AnotherNode: ResolverTypeWrapper['AnotherNode']>; WithChild: ResolverTypeWrapper['WithChild']>; @@ -2184,23 +2184,23 @@ export type ResolverFn = ( AnotherNodeWithChild: ResolverTypeWrapper & { unionChild?: Maybe }>; AnotherNodeWithAll: ResolverTypeWrapper & { unionChild?: Maybe, unionChildren: Array }>; MyUnion: ResolverTypeWrapper['MyUnion']>; - MyScalar: ResolverTypeWrapper; - Int: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; + MyScalar: ResolverTypeWrapper; + Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; }; `); expect(content.content).toBeSimilarStringTo(` export type I_ResolversParentTypes_Types = { MyType: Omit & { unionChild?: Maybe }; - String: Scalars['String']; + String: Scalars['String']['output']; Child: I_Child_Types; MyOtherType: I_MyOtherType_Types; ChildUnion: I_ResolversUnionTypes_Types['ChildUnion']; Query: {}; Subscription: {}; Node: I_ResolversInterfaceTypes_Types['Node']; - ID: Scalars['ID']; + ID: Scalars['ID']['output']; SomeNode: I_SomeNode_Types; AnotherNode: I_ResolversInterfaceTypes_Types['AnotherNode']; WithChild: I_ResolversInterfaceTypes_Types['WithChild']; @@ -2208,9 +2208,9 @@ export type ResolverFn = ( AnotherNodeWithChild: Omit & { unionChild?: Maybe }; AnotherNodeWithAll: Omit & { unionChild?: Maybe, unionChildren: Array }; MyUnion: I_ResolversUnionTypes_Types['MyUnion']; - MyScalar: Scalars['MyScalar']; - Int: Scalars['Int']; - Boolean: Scalars['Boolean']; + MyScalar: Scalars['MyScalar']['output']; + Int: Scalars['Int']['output']; + Boolean: Scalars['Boolean']['output']; }; `); }); @@ -2264,9 +2264,9 @@ export type ResolverFn = ( Subscription: ResolverTypeWrapper; Query: ResolverTypeWrapper; Mutation: ResolverTypeWrapper; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; Post: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; }; `); @@ -2344,9 +2344,9 @@ export type ResolverFn = ( MySubscription: ResolverTypeWrapper; MyQuery: ResolverTypeWrapper; MyMutation: ResolverTypeWrapper; - String: ResolverTypeWrapper; + String: ResolverTypeWrapper; Post: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; }; `); }); @@ -2793,8 +2793,8 @@ export type ResolverFn = ( export type IResolversTypes = { Query: ResolverTypeWrapper<{}>; Test: Test; - Boolean: ResolverTypeWrapper; - String: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; + String: ResolverTypeWrapper; };`); }); diff --git a/packages/plugins/typescript/typescript/src/visitor.ts b/packages/plugins/typescript/typescript/src/visitor.ts index cb8d08b81df..0ab076816ac 100644 --- a/packages/plugins/typescript/typescript/src/visitor.ts +++ b/packages/plugins/typescript/typescript/src/visitor.ts @@ -105,7 +105,7 @@ export class TsVisitor< }); } - protected _getTypeForNode(node: NamedTypeNode): string { + protected _getTypeForNode(node: NamedTypeNode, isVisitingInputType: boolean): string { const typeAsString = node.name as any as string; if (this.config.useImplementingTypes) { @@ -128,7 +128,7 @@ export class TsVisitor< } } - const typeString = super._getTypeForNode(node); + const typeString = super._getTypeForNode(node, isVisitingInputType); const schemaType = this._schema.getType(node.name as any as string); if (isEnumType(schemaType)) { @@ -252,7 +252,7 @@ export class TsVisitor< } const originalNode = parent[key] as UnionTypeDefinitionNode; const possibleTypes = originalNode.types - .map(t => (this.scalars[t.name.value] ? this._getScalar(t.name.value) : this.convertName(t))) + .map(t => (this.scalars[t.name.value] ? this._getScalar(t.name.value, 'output') : this.convertName(t))) .concat(...withFutureAddedValue) .join(' | '); diff --git a/packages/plugins/typescript/typescript/tests/__snapshots__/typescript.spec.ts.snap b/packages/plugins/typescript/typescript/tests/__snapshots__/typescript.spec.ts.snap index b042e0ef99e..824f8f15dcf 100644 --- a/packages/plugins/typescript/typescript/tests/__snapshots__/typescript.spec.ts.snap +++ b/packages/plugins/typescript/typescript/tests/__snapshots__/typescript.spec.ts.snap @@ -3,11 +3,11 @@ exports[`TypeScript should use implementing types as node type - issue #5126 1`] = ` "/** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type Matrix = { @@ -16,26 +16,26 @@ export type Matrix = { }; export type Pill = { - id: Scalars['ID']; + id: Scalars['ID']['output']; }; export type RedPill = Pill & { __typename?: 'RedPill'; - red: Scalars['String']; + red: Scalars['String']['output']; }; export type GreenPill = Pill & { __typename?: 'GreenPill'; - green: Scalars['String']; + green: Scalars['String']['output']; }; export type Foo = { - id: Scalars['ID']; + id: Scalars['ID']['output']; }; export type Bar = Foo & { __typename?: 'Bar'; - lol: Scalars['String']; + lol: Scalars['String']['output']; }; export type Hello = { @@ -49,17 +49,17 @@ export type NoInterface = { }; export type NestedInterface = { - field: Scalars['String']; + field: Scalars['String']['output']; }; export type NestedType1 = NestedInterface & { __typename?: 'NestedType1'; - hi: Scalars['String']; + hi: Scalars['String']['output']; }; export type NestedType2 = NestedInterface & { __typename?: 'NestedType2'; - ho: Scalars['String']; + ho: Scalars['String']['output']; }; export type NestedField = { diff --git a/packages/plugins/typescript/typescript/tests/typescript.spec.ts b/packages/plugins/typescript/typescript/tests/typescript.spec.ts index 6744cbc6a32..732a4f6e1ea 100644 --- a/packages/plugins/typescript/typescript/tests/typescript.spec.ts +++ b/packages/plugins/typescript/typescript/tests/typescript.spec.ts @@ -23,13 +23,13 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } /** My custom scalar */ - A: any; + A: { input: any; output: any; } }; `); }); @@ -43,9 +43,12 @@ describe('TypeScript', () => { `); const result = await plugin(schema, [], {}, { outputFile: '' }); + expect(result.prepend).toBeSimilarStringTo('export type InputMaybe = Maybe;'); expect(result.content).toBeSimilarStringTo(` /** MyInput */ - export type MyInput`); + export type MyInput = { + f?: InputMaybe; + }`); }); it('Should add description for input fields', async () => { @@ -62,7 +65,7 @@ describe('TypeScript', () => { /** MyInput */ export type MyInput = { /** f is something */ - f: Scalars['String']; + f: Scalars['String']['input']; }`); }); @@ -83,7 +86,9 @@ describe('TypeScript', () => { * MyInput * multiline */ - export type MyInput`); + export type MyInput = { + f: Scalars['String']['input']; + }`); }); it('Should work with unions', async () => { @@ -102,7 +107,7 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` /** my union */ - export type A = `); + export type A = B | C`); }); it('Should work with types', async () => { @@ -120,11 +125,17 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` /** this is b */ - export type B = `); + export type B = { + __typename?: 'B'; + id?: Maybe; + }`); expect(result.content).toBeSimilarStringTo(` /** this is c */ - export type C = `); + export type C = { + __typename?: 'C'; + id?: Maybe; + }`); }); it('Should work with type fields', async () => { @@ -140,7 +151,7 @@ describe('TypeScript', () => { export type B = { __typename?: 'B'; /** the id */ - id?: Maybe; + id?: Maybe; };`); }); @@ -156,7 +167,7 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type Node = { /** the id */ - id: Scalars['ID']; + id: Scalars['ID']['output']; };`); }); @@ -322,14 +333,15 @@ describe('TypeScript', () => { `); const result = await plugin(schema, [], { disableDescriptions: true }, { outputFile: '' }); + expect(result.content).not.toBeSimilarStringTo(`/** My custom scalar */`); expect(result.content).toBeSimilarStringTo(` export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; - A: any; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } + A: { input: any; output: any; } }; `); }); @@ -343,8 +355,11 @@ describe('TypeScript', () => { `); const result = await plugin(schema, [], { disableDescriptions: true }, { outputFile: '' }); + expect(result.content).not.toBeSimilarStringTo('/** MyInput */'); expect(result.content).toBeSimilarStringTo(` - export type MyInput`); + export type MyInput = { + f?: InputMaybe; + }`); }); it('Should not add description for input fields', async () => { @@ -357,9 +372,11 @@ describe('TypeScript', () => { `); const result = await plugin(schema, [], { disableDescriptions: true }, { outputFile: '' }); + expect(result.content).not.toBeSimilarStringTo('/** MyInput */'); + expect(result.content).not.toBeSimilarStringTo('/** f is something */'); expect(result.content).toBeSimilarStringTo(` export type MyInput = { - f: Scalars['String']; + f: Scalars['String']['input']; }`); }); @@ -375,8 +392,16 @@ describe('TypeScript', () => { `); const result = await plugin(schema, [], { disableDescriptions: true }, { outputFile: '' }); + expect(result.content).not.toBeSimilarStringTo(` + /** + * MyInput + * multiline + */ + `); expect(result.content).toBeSimilarStringTo(` - export type MyInput`); + export type MyInput = { + f: Scalars['String']['input']; + }`); }); it('Should work with unions', async () => { @@ -393,8 +418,9 @@ describe('TypeScript', () => { `); const result = await plugin(schema, [], { disableDescriptions: true }, { outputFile: '' }); + expect(result.content).not.toBeSimilarStringTo('/** my union */'); expect(result.content).toBeSimilarStringTo(` - export type A = `); + export type A = B | C`); }); it('Should work with types', async () => { @@ -410,11 +436,19 @@ describe('TypeScript', () => { `); const result = await plugin(schema, [], { disableDescriptions: true }, { outputFile: '' }); + expect(result.content).not.toBeSimilarStringTo('/** this is b */'); expect(result.content).toBeSimilarStringTo(` - export type B = `); + export type B = { + __typename?: 'B'; + id?: Maybe; + }`); + expect(result.content).not.toBeSimilarStringTo('/** this is c */'); expect(result.content).toBeSimilarStringTo(` - export type C = `); + export type C = { + __typename?: 'C'; + id?: Maybe; + }`); }); it('Should work with type fields', async () => { @@ -426,10 +460,11 @@ describe('TypeScript', () => { `); const result = await plugin(schema, [], { disableDescriptions: true }, { outputFile: '' }); + expect(result.content).not.toBeSimilarStringTo('/** the id */'); expect(result.content).toBeSimilarStringTo(` export type B = { __typename?: 'B'; - id?: Maybe; + id?: Maybe; };`); }); @@ -442,9 +477,10 @@ describe('TypeScript', () => { `); const result = await plugin(schema, [], { disableDescriptions: true }, { outputFile: '' }); + expect(result.content).not.toBeSimilarStringTo('/** the id */'); expect(result.content).toBeSimilarStringTo(` export type Node = { - id: Scalars['ID']; + id: Scalars['ID']['output']; };`); }); @@ -460,6 +496,9 @@ describe('TypeScript', () => { `); const result = await plugin(schema, [], { disableDescriptions: true }, { outputFile: '' }); + expect(result.content).not.toBeSimilarStringTo('/** custom enum */'); + expect(result.content).not.toBeSimilarStringTo('/** this is a */'); + expect(result.content).not.toBeSimilarStringTo('/** this is b */'); expect(result.content).toBeSimilarStringTo(` export enum MyEnum { A = 'A', @@ -484,6 +523,9 @@ describe('TypeScript', () => { { outputFile: '' } )) as Types.ComplexPluginOutput; + expect(result.content).not.toBeSimilarStringTo('/** custom enum */'); + expect(result.content).not.toBeSimilarStringTo('/** this is a */'); + expect(result.content).not.toBeSimilarStringTo('/** this is b */'); expect(result.content).toBeSimilarStringTo(` export type MyEnum = | 'A' @@ -544,11 +586,11 @@ describe('TypeScript', () => { const output = mergeOutputs([result]); expect(output).toContain(`export type InputMaybe = T | null | undefined;`); expect(output).toContain(`export type Maybe = T | null;`); - expect(output).toContain(`test?: Maybe;`); - expect(output).toContain(`id?: InputMaybe;`); + expect(output).toContain(`test?: Maybe;`); + expect(output).toContain(`id?: InputMaybe;`); expect(output).toContain(`filter?: InputMaybe;`); - expect(output).toContain(`a?: InputMaybe;`); - expect(output).toContain(`b?: InputMaybe;`); + expect(output).toContain(`a?: InputMaybe;`); + expect(output).toContain(`b?: InputMaybe;`); }); it('#5643 - Incorrect combinations of declartionKinds leads to syntax error', async () => { @@ -891,7 +933,7 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(`export type ITest = { __typename?: 'Test'; t?: Maybe; - test?: Maybe; + test?: Maybe; };`); expect(result.content).toBeSimilarStringTo(`export type ITestTestArgs = { @@ -934,10 +976,11 @@ describe('TypeScript', () => { }); it('#1488 - Should generate readonly also in input types when immutableTypes is set', async () => { - const schema = buildSchema(` - input MyInput { - f: String! - }`); + const schema = buildSchema(/* GraphQL */ ` + input MyInput { + f: String! + } + `); const result = (await plugin( schema, @@ -948,25 +991,26 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type MyInput = { - readonly f: Scalars['String']; + readonly f: Scalars['String']['input']; };`); validateTs(result); }); it('#3141 - @deprecated directive support', async () => { - const schema = buildSchema(` - type User { - fullName: String! - firstName: String! @deprecated(reason: "Field \`fullName\` has been superseded by \`firstName\`.") - }`); + const schema = buildSchema(/* GraphQL */ ` + type User { + fullName: String! + firstName: String! @deprecated(reason: "Field \`fullName\` has been superseded by \`firstName\`.") + } + `); const result = await plugin(schema, [], {}, { outputFile: '' }); expect(result.content).toBeSimilarStringTo(` export type User = { __typename?: 'User'; - fullName: Scalars['String']; + fullName: Scalars['String']['output']; /** @deprecated Field \`fullName\` has been superseded by \`firstName\`. */ - firstName: Scalars['String']; + firstName: Scalars['String']['output']; };`); validateTs(result); }); @@ -989,42 +1033,42 @@ describe('TypeScript', () => { }); it('#7766 - input value @deprecated directive support', async () => { - const schema = buildSchema(` - input MyInput { - A: Int - B: Int @deprecated(reason: "input value \`B\` has been deprecated.") - }`); + const schema = buildSchema(/* GraphQL */ ` + input MyInput { + A: Int + B: Int @deprecated(reason: "input value \`B\` has been deprecated.") + } + `); const result = await plugin(schema, [], {}, { outputFile: '' }); expect(result.content).toBeSimilarStringTo(` export type MyInput = { - A?: InputMaybe; + A?: InputMaybe; /** @deprecated input value \`B\` has been deprecated. */ - B?: InputMaybe; + B?: InputMaybe; };`); validateTs(result); }); it('#1462 - Union of scalars and argument of directive', async () => { - const schema = buildSchema(` - union Any = String | Int | Float | ID + const schema = buildSchema(/* GraphQL */ ` + union Any = String | Int | Float | ID - directive @default( - value: Any, - ) on ENUM_VALUE | FIELD_DEFINITION + directive @default(value: Any) on ENUM_VALUE | FIELD_DEFINITION - type CardEdge { - count: Int! @default(value: 1) - }`); + type CardEdge { + count: Int! @default(value: 1) + } + `); const result = await plugin(schema, [], {}, { outputFile: '' }); expect(result.content).toBeSimilarStringTo( - `export type Any = Scalars['String'] | Scalars['Int'] | Scalars['Float'] | Scalars['ID'];` + `export type Any = Scalars['String']['output'] | Scalars['Int']['output'] | Scalars['Float']['output'] | Scalars['ID']['output'];` ); expect(result.content).toBeSimilarStringTo(` export type CardEdge = { __typename?: 'CardEdge'; - count: Scalars['Int']; + count: Scalars['Int']['output']; };`); validateTs(result); }); @@ -1082,10 +1126,10 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export interface ISuggestion { - id: Scalars['ID']; - userId: Scalars['ID']; + id: Scalars['ID']['output']; + userId: Scalars['ID']['output']; suggestionType: SuggestionType; - text: Scalars['String']; + text: Scalars['String']['output']; } `); expect(result.content).toBeSimilarStringTo(` @@ -1103,7 +1147,7 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export interface IRootQueryTypeSuggestionsForUserArgs { - userId: Scalars['ID']; + userId: Scalars['ID']['input']; suggestionType: SuggestionType; } `); @@ -1112,7 +1156,7 @@ describe('TypeScript', () => { describe('Config', () => { it('Should build type correctly when specified with avoidOptionals config', async () => { - const schema = buildSchema(` + const schema = buildSchema(/* GraphQL */ ` type MyType { foo: String bar: String! @@ -1128,15 +1172,15 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type MyType = { __typename?: 'MyType'; - foo: Maybe; - bar: Scalars['String']; + foo: Maybe; + bar: Scalars['String']['output']; }; `); validateTs(result); }); it('Should build input type correctly when specified with avoidInputOptionals config', async () => { - const schema = buildSchema(` + const schema = buildSchema(/* GraphQL */ ` input MyInput { foo: String bar: String! @@ -1151,8 +1195,8 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type MyInput = { - foo: InputMaybe; - bar: Scalars['String']; + foo: InputMaybe; + bar: Scalars['String']['input']; } `); @@ -1160,10 +1204,11 @@ describe('TypeScript', () => { }); it('Should build type correctly when specified with immutableTypes config', async () => { - const schema = buildSchema(` + const schema = buildSchema(/* GraphQL */ ` type MyType { foo: [String!]! - }`); + } + `); const result = (await plugin( schema, [], @@ -1174,7 +1219,7 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type MyType = { readonly __typename?: 'MyType'; - readonly foo: ReadonlyArray; + readonly foo: ReadonlyArray; }; `); validateTs(result); @@ -1375,10 +1420,10 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type mytypefooargs = { - a: Scalars['String']; - b?: InputMaybe; - c?: InputMaybe>>; - d: Array; + a: Scalars['String']['input']; + b?: InputMaybe; + c?: InputMaybe>>; + d: Array; }; `); expect(result.content).toBeSimilarStringTo(` @@ -1450,10 +1495,10 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type MyTypefooArgs = { - a: Scalars['String']; - b?: InputMaybe; - c?: InputMaybe>>; - d: Array; + a: Scalars['String']['input']; + b?: InputMaybe; + c?: InputMaybe>>; + d: Array; }; `); @@ -1524,7 +1569,7 @@ describe('TypeScript', () => { }); it('Should use class correctly when declarationKind: class is set', async () => { - const schema = buildSchema(` + const schema = buildSchema(/* GraphQL */ ` input MyInput { id: ID! displayName: String @@ -1546,16 +1591,16 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export class MyInput { - id: Scalars['ID']; - displayName?: InputMaybe; + id: Scalars['ID']['input']; + displayName?: InputMaybe; } `); expect(result.content).toBeSimilarStringTo(` export class MyType { __typename?: 'MyType'; - id: Scalars['ID']; - displayName?: Maybe; + id: Scalars['ID']['output']; + displayName?: Maybe; } `); @@ -1563,7 +1608,7 @@ describe('TypeScript', () => { }); it('Should use interface for type when declarationKind for types is set', async () => { - const schema = buildSchema(` + const schema = buildSchema(/* GraphQL */ ` input MyInput { id: ID! displayName: String @@ -1587,23 +1632,23 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type MyInput = { - id: Scalars['ID']; - displayName?: InputMaybe; + id: Scalars['ID']['input']; + displayName?: InputMaybe; } `); expect(result.content).toBeSimilarStringTo(` export interface MyType { __typename?: 'MyType'; - id: Scalars['ID']; - displayName?: Maybe; + id: Scalars['ID']['output']; + displayName?: Maybe; } `); validateTs(result); }); it('Should use interface for input when declarationKind for inputs is set', async () => { - const schema = buildSchema(` + const schema = buildSchema(/* GraphQL */ ` input MyInput { id: ID! displayName: String @@ -1627,23 +1672,23 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export interface MyInput { - id: Scalars['ID']; - displayName?: InputMaybe; + id: Scalars['ID']['input']; + displayName?: InputMaybe; } `); expect(result.content).toBeSimilarStringTo(` export type MyType = { __typename?: 'MyType'; - id: Scalars['ID']; - displayName?: Maybe; + id: Scalars['ID']['output']; + displayName?: Maybe; } `); validateTs(result); }); it('Should use interface for arguments when declarationKind for arguments is set', async () => { - const schema = buildSchema(` + const schema = buildSchema(/* GraphQL */ ` type MyType { id: ID! displayName: String @@ -1664,22 +1709,22 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type MyType = { __typename?: 'MyType'; - id: Scalars['ID']; - displayName?: Maybe; + id: Scalars['ID']['output']; + displayName?: Maybe; child?: Maybe; } `); expect(result.content).toBeSimilarStringTo(` export interface MyTypeChildArgs { - id: Scalars['ID']; + id: Scalars['ID']['input']; } `); validateTs(result); }); it('Should use interface for all objects when declarationKind is interface', async () => { - const schema = buildSchema(` + const schema = buildSchema(/* GraphQL */ ` input MyInput { id: ID! displayName: String @@ -1701,16 +1746,16 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export interface MyInput { - id: Scalars['ID']; - displayName?: InputMaybe; + id: Scalars['ID']['input']; + displayName?: InputMaybe; } `); expect(result.content).toBeSimilarStringTo(` export interface MyType { __typename?: 'MyType'; - id: Scalars['ID']; - displayName?: Maybe; + id: Scalars['ID']['output']; + displayName?: Maybe; } `); validateTs(result); @@ -1744,7 +1789,7 @@ describe('TypeScript', () => { }); it('Should extend one interface from another', async () => { - const schema = buildSchema(` + const schema = buildSchema(/* GraphQL */ ` interface MyInterface { id: ID! displayName: String @@ -1767,24 +1812,24 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export interface MyInterface { - id: Scalars['ID']; - displayName?: Maybe; + id: Scalars['ID']['output']; + displayName?: Maybe; } `); expect(result.content).toBeSimilarStringTo(` export interface MyType extends MyInterface { __typename?: 'MyType'; - id: Scalars['ID']; - displayName?: Maybe; - value?: Maybe; + id: Scalars['ID']['output']; + displayName?: Maybe; + value?: Maybe; } `); validateTs(result); }); it('Should extend mutiple interfaces', async () => { - const schema = buildSchema(` + const schema = buildSchema(/* GraphQL */ ` interface MyInterface1 { id: ID! displayName: String @@ -1811,23 +1856,23 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export interface MyInterface1 { - id: Scalars['ID']; - displayName?: Maybe; + id: Scalars['ID']['output']; + displayName?: Maybe; } `); expect(result.content).toBeSimilarStringTo(` export interface MyInterface2 { - value?: Maybe; + value?: Maybe; } `); expect(result.content).toBeSimilarStringTo(` export interface MyType extends MyInterface1, MyInterface2 { __typename?: 'MyType'; - id: Scalars['ID']; - displayName?: Maybe; - value?: Maybe; + id: Scalars['ID']['output']; + displayName?: Maybe; + value?: Maybe; } `); validateTs(result); @@ -1836,39 +1881,43 @@ describe('TypeScript', () => { describe('Scalars', () => { it('Should generate a scalars mapping correctly for built-in scalars', async () => { - const schema = buildSchema(` - type MyType { - foo: String - bar: String! - }`); + const schema = buildSchema(/* GraphQL */ ` + type MyType { + foo: String + bar: String! + } + `); const result = await plugin(schema, [], {}, { outputFile: '' }); expect(result.content).toBeSimilarStringTo(` export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } };`); expect(result.content).toBeSimilarStringTo(` export type MyType = { __typename?: 'MyType'; - foo?: Maybe; - bar: Scalars['String']; + foo?: Maybe; + bar: Scalars['String']['output']; };`); validateTs(result); }); it('Should generate a scalars mapping correctly when using scalars as path', async () => { - const schema = buildSchema(` - scalar MyScalar + const schema = buildSchema(/* GraphQL */ ` + scalar MyScalar + scalar MyScalarInput - type MyType { - foo: String - bar: MyScalar! - }`); + type MyType { + foo: String + bar: MyScalar! + baz(input: MyScalarInput): MyScalarInput + } + `); const result = (await plugin( schema, [], @@ -1879,37 +1928,48 @@ describe('TypeScript', () => { )) as Types.ComplexPluginOutput; expect(result.prepend).toContain(`import { MyScalar } from '../../scalars';`); + expect(result.prepend).toContain(`import { MyScalarInput } from '../../scalars';`); + expect(result.prepend).toContain(`import { String } from '../../scalars';`); + expect(result.prepend).toContain(`import { Boolean } from '../../scalars';`); expect(result.content).toBeSimilarStringTo(` - export type Scalars = { - ID: string; - String: String; - Boolean: Boolean; - Int: number; - Float: number; - MyScalar: MyScalar; - };`); + export type Scalars = { + ID: { input: string | number; output: string; } + String: { input: String['input']; output: String['output']; } + Boolean: { input: Boolean['input']; output: Boolean['output']; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } + MyScalar: { input: MyScalar['input']; output: MyScalar['output']; } + MyScalarInput: { input: MyScalarInput['input']; output: MyScalarInput['output']; } + };`); expect(result.content).toBeSimilarStringTo(` - export type MyType = { - __typename?: 'MyType'; - foo?: Maybe; - bar: Scalars['MyScalar']; - };`); + export type MyType = { + __typename?: 'MyType'; + foo?: Maybe; + bar: Scalars['MyScalar']['output']; + baz?: Maybe; + };`); + expect(result.content).toBeSimilarStringTo(` + export type MyTypeBazArgs = { + input?: InputMaybe; + };`); validateTs(result); }); it('Should import a type of a mapped scalar', async () => { - const schema = buildSchema(` - scalar MyScalar - scalar MyOtherScalar - scalar MyAliasedScalar + const schema = buildSchema(/* GraphQL */ ` + scalar MyScalar + scalar MyOtherScalar + scalar MyAliasedScalar - type MyType { - foo: String - bar: MyScalar! - baz: MyOtherScalar! - qux: MyAliasedScalar! - }`); + type MyType { + foo: String + bar: MyScalar! + baz: MyOtherScalar! + qux: MyAliasedScalar! + tux(in: MyScalar!): MyScalar! + } + `); const result = (await plugin( schema, [], @@ -1928,65 +1988,79 @@ describe('TypeScript', () => { expect(result.prepend).toContain(`import { MyOtherScalar } from '../../scalars';`); expect(result.prepend).toContain(`import { MyAliasedScalar as AliasedScalar } from '../../scalars';`); expect(result.content).toBeSimilarStringTo(` - export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; - MyScalar: MyScalar; - MyOtherScalar: MyOtherScalar; - MyAliasedScalar: AliasedScalar; - };`); + export type Scalars = { + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } + MyScalar: { input: MyScalar['input']; output: MyScalar['output']; } + MyOtherScalar: { input: MyOtherScalar['input']; output: MyOtherScalar['output']; } + MyAliasedScalar: { input: AliasedScalar['input']; output: AliasedScalar['output']; } + };`); expect(result.content).toBeSimilarStringTo(` - export type MyType = { - __typename?: 'MyType'; - foo?: Maybe; - bar: Scalars['MyScalar']; - baz: Scalars['MyOtherScalar']; - qux: Scalars['MyAliasedScalar']; - };`); + export type MyType = { + __typename?: 'MyType'; + foo?: Maybe; + bar: Scalars['MyScalar']['output']; + baz: Scalars['MyOtherScalar']['output']; + qux: Scalars['MyAliasedScalar']['output']; + tux: Scalars['MyScalar']['output']; + };`); + expect(result.content).toBeSimilarStringTo(` + export type MyTypeTuxArgs = { + in: Scalars['MyScalar']['input']; + }`); validateTs(result); }); it('Should generate a scalars mapping correctly for custom scalars', async () => { - const schema = buildSchema(` - scalar MyScalar + const schema = buildSchema(/* GraphQL */ ` + scalar MyScalar - type MyType { - foo: String - bar: MyScalar! - }`); + type MyType { + foo: String + bar: MyScalar! + buz(input: MyScalar!): MyScalar! + } + `); const result = await plugin(schema, [], {}, { outputFile: '' }); expect(result.content).toBeSimilarStringTo(` - export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; - MyScalar: any; - };`); + export type Scalars = { + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } + MyScalar: { input: any; output: any; } + };`); expect(result.content).toBeSimilarStringTo(` - export type MyType = { - __typename?: 'MyType'; - foo?: Maybe; - bar: Scalars['MyScalar']; - };`); + export type MyType = { + __typename?: 'MyType'; + foo?: Maybe; + bar: Scalars['MyScalar']['output']; + buz: Scalars['MyScalar']['output']; + };`); + expect(result.content).toBeSimilarStringTo(` + export type MyTypeBuzArgs = { + input: Scalars['MyScalar']['input']; + }`); validateTs(result); }); it('Should generate a scalars mapping correctly for custom scalars with mapping', async () => { - const schema = buildSchema(` - scalar MyScalar + const schema = buildSchema(/* GraphQL */ ` + scalar MyScalar - type MyType { - foo: String - bar: MyScalar! - }`); + type MyType { + foo: String + bar: MyScalar! + buz(input: MyScalar!): MyScalar! + } + `); const result = (await plugin( schema, [], @@ -1995,32 +2069,79 @@ describe('TypeScript', () => { )) as Types.ComplexPluginOutput; expect(result.content).toBeSimilarStringTo(` - export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; - MyScalar: Date; - };`); + export type Scalars = { + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } + MyScalar: { input: Date; output: Date; } + };`); expect(result.content).toBeSimilarStringTo(` - export type MyType = { - __typename?: 'MyType'; - foo?: Maybe; - bar: Scalars['MyScalar']; - };`); + export type MyType = { + __typename?: 'MyType'; + foo?: Maybe; + bar: Scalars['MyScalar']['output']; + buz: Scalars['MyScalar']['output']; + };`); + expect(result.content).toBeSimilarStringTo(` + export type MyTypeBuzArgs = { + input: Scalars['MyScalar']['input']; + }`); + validateTs(result); + }); + + it('Should generate a scalars mapping correctly for custom scalars with input/output mapping', async () => { + const schema = buildSchema(/* GraphQL */ ` + scalar MyScalar + + type MyType { + foo: String + bar: MyScalar! + buz(input: MyScalar!): MyScalar! + } + `); + const result = (await plugin( + schema, + [], + { scalars: { MyScalar: { input: 'bigint', output: 'number | bigint' } } }, + { outputFile: '' } + )) as Types.ComplexPluginOutput; + + expect(result.content).toBeSimilarStringTo(` + export type Scalars = { + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } + MyScalar: { input: bigint; output: number | bigint; } + };`); + + expect(result.content).toBeSimilarStringTo(` + export type MyType = { + __typename?: 'MyType'; + foo?: Maybe; + bar: Scalars['MyScalar']['output']; + buz: Scalars['MyScalar']['output']; + };`); + expect(result.content).toBeSimilarStringTo(` + export type MyTypeBuzArgs = { + input: Scalars['MyScalar']['input']; + }`); validateTs(result); }); it('Should correctly throw an error when an unknown scalar is detected while using `strictScalars`', () => { - const schema = buildSchema(` - scalar MyScalar + const schema = buildSchema(/* GraphQL */ ` + scalar MyScalar - type MyType { - foo: String - bar: MyScalar! - }`); + type MyType { + foo: String + bar: MyScalar! + } + `); expect(() => { plugin(schema, [], { strictScalars: true }, { outputFile: '' }); @@ -2028,13 +2149,15 @@ describe('TypeScript', () => { }); it('Should allow overriding default scalar type', async () => { - const schema = buildSchema(` - scalar MyScalar + const schema = buildSchema(/* GraphQL */ ` + scalar MyScalar - type MyType { - foo: String - bar: MyScalar! - }`); + type MyType { + foo: String + bar: MyScalar! + buz(input: MyScalar!): MyScalar! + } + `); const result = (await plugin( schema, [], @@ -2043,21 +2166,26 @@ describe('TypeScript', () => { )) as Types.ComplexPluginOutput; expect(result.content).toBeSimilarStringTo(` - export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; - MyScalar: unknown; - };`); + export type Scalars = { + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } + MyScalar: { input: unknown; output: unknown; } + };`); expect(result.content).toBeSimilarStringTo(` - export type MyType = { - __typename?: 'MyType'; - foo?: Maybe; - bar: Scalars['MyScalar']; - };`); + export type MyType = { + __typename?: 'MyType'; + foo?: Maybe; + bar: Scalars['MyScalar']['output']; + buz: Scalars['MyScalar']['output']; + };`); + expect(result.content).toBeSimilarStringTo(` + export type MyTypeBuzArgs = { + input: Scalars['MyScalar']['input']; + }`); validateTs(result); }); @@ -2094,25 +2222,26 @@ describe('TypeScript', () => { describe('Object (type)', () => { it('Should build type correctly', async () => { - const schema = buildSchema(` + const schema = buildSchema(/* GraphQL */ ` type MyType { foo: String bar: String! - }`); + } + `); const result = await plugin(schema, [], {}, { outputFile: '' }); expect(result.content).toBeSimilarStringTo(` export type MyType = { __typename?: 'MyType'; - foo?: Maybe; - bar: Scalars['String']; + foo?: Maybe; + bar: Scalars['String']['output']; }; `); validateTs(result); }); it('Should build type correctly when implementing interface', async () => { - const schema = buildSchema(` + const schema = buildSchema(/* GraphQL */ ` interface MyInterface { foo: String! } @@ -2120,25 +2249,25 @@ describe('TypeScript', () => { type MyType implements MyInterface { foo: String! } - `); + `); const result = await plugin(schema, [], {}, { outputFile: '' }); expect(result.content).toBeSimilarStringTo(` export type MyInterface = { - foo: Scalars['String']; + foo: Scalars['String']['output']; }; `); expect(result.content).toBeSimilarStringTo(` export type MyType = MyInterface & { __typename?: 'MyType'; - foo: Scalars['String']; + foo: Scalars['String']['output']; }; `); validateTs(result); }); it('Should build type correctly when implementing multiple interfaces', async () => { - const schema = buildSchema(` + const schema = buildSchema(/* GraphQL */ ` interface MyInterface { foo: String! } @@ -2151,24 +2280,24 @@ describe('TypeScript', () => { foo: String! bar: String! } - `); + `); const result = await plugin(schema, [], {}, { outputFile: '' }); expect(result.content).toBeSimilarStringTo(` export type MyInterface = { - foo: Scalars['String']; + foo: Scalars['String']['output']; }; `); expect(result.content).toBeSimilarStringTo(` export type MyOtherInterface = { - bar: Scalars['String']; + bar: Scalars['String']['output']; }; `); expect(result.content).toBeSimilarStringTo(` export type MyType = MyInterface & MyOtherInterface & { __typename?: 'MyType'; - foo: Scalars['String']; - bar: Scalars['String']; + foo: Scalars['String']['output']; + bar: Scalars['String']['output']; }; `); validateTs(result); @@ -2186,7 +2315,7 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type MyInterface = { - foo: Scalars['String']; + foo: Scalars['String']['output']; }; `); expect(result.content).toBeSimilarStringTo(` @@ -2198,7 +2327,7 @@ describe('TypeScript', () => { }); it('Should build type correctly with links between types', async () => { - const schema = buildSchema(` + const schema = buildSchema(/* GraphQL */ ` type MyType { foo: MyOtherType! } @@ -2206,7 +2335,7 @@ describe('TypeScript', () => { type MyOtherType { bar: String! } - `); + `); const result = await plugin(schema, [], {}, { outputFile: '' }); expect(result.content).toBeSimilarStringTo(` @@ -2218,14 +2347,14 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type MyOtherType = { __typename?: 'MyOtherType'; - bar: Scalars['String']; + bar: Scalars['String']['output']; }; `); validateTs(result); }); it('Should build type correctly when wrapping field definitions', async () => { - const schema = buildSchema(` + const schema = buildSchema(/* GraphQL */ ` interface MyInterface { foo: String! } @@ -2233,7 +2362,7 @@ describe('TypeScript', () => { type MyType implements MyInterface { foo: String! } - `); + `); const result = (await plugin( schema, [], @@ -2243,20 +2372,20 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type MyInterface = { - foo: FieldWrapper; + foo: FieldWrapper; }; `); expect(result.content).toBeSimilarStringTo(` export type MyType = MyInterface & { __typename?: 'MyType'; - foo: FieldWrapper; + foo: FieldWrapper; }; `); validateTs(result); }); it('Should build list type correctly when wrapping field definitions', async () => { - const schema = buildSchema(` + const schema = buildSchema(/* GraphQL */ ` type ListOfStrings { foo: [String!]! } @@ -2275,14 +2404,14 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type ListOfStrings = { __typename?: 'ListOfStrings'; - foo: Array>; + foo: Array>; }; `); expect(result.content).toBeSimilarStringTo(` export type ListOfMaybeStrings = { __typename?: 'ListOfMaybeStrings'; - foo: Array>>; + foo: Array>>; }; `); @@ -2290,7 +2419,7 @@ describe('TypeScript', () => { }); it('Should build list type correctly when wrapping entire field definitions', async () => { - const schema = buildSchema(` + const schema = buildSchema(/* GraphQL */ ` type ListOfStrings { foo: [String!]! } @@ -2309,14 +2438,14 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type ListOfStrings = { __typename?: 'ListOfStrings'; - foo: EntireFieldWrapper>; + foo: EntireFieldWrapper>; }; `); expect(result.content).toBeSimilarStringTo(` export type ListOfMaybeStrings = { __typename?: 'ListOfMaybeStrings'; - foo: EntireFieldWrapper>>; + foo: EntireFieldWrapper>>; }; `); @@ -2324,7 +2453,7 @@ describe('TypeScript', () => { }); it('Should build list type correctly when wrapping both field definitions and entire field definitions', async () => { - const schema = buildSchema(` + const schema = buildSchema(/* GraphQL */ ` type ListOfStrings { foo: [String!]! } @@ -2343,14 +2472,14 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type ListOfStrings = { __typename?: 'ListOfStrings'; - foo: EntireFieldWrapper>>; + foo: EntireFieldWrapper>>; }; `); expect(result.content).toBeSimilarStringTo(` export type ListOfMaybeStrings = { __typename?: 'ListOfMaybeStrings'; - foo: EntireFieldWrapper>>>; + foo: EntireFieldWrapper>>>; }; `); @@ -2358,11 +2487,11 @@ describe('TypeScript', () => { }); it('Should not wrap input type fields', async () => { - const schema = buildSchema(` + const schema = buildSchema(/* GraphQL */ ` input MyInput { foo: String! } - `); + `); const result = (await plugin( schema, [], @@ -2372,7 +2501,7 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type MyInput = { - foo: Scalars['String']; + foo: Scalars['String']['input']; }; `); validateTs(result); @@ -2438,17 +2567,18 @@ describe('TypeScript', () => { describe('Interface', () => { it('Should build interface correctly', async () => { - const schema = buildSchema(` + const schema = buildSchema(/* GraphQL */ ` interface MyInterface { foo: String bar: String! - }`); + } + `); const result = await plugin(schema, [], {}, { outputFile: '' }); expect(result.content).toBeSimilarStringTo(` export type MyInterface = { - foo?: Maybe; - bar: Scalars['String']; + foo?: Maybe; + bar: Scalars['String']['output']; }; `); validateTs(result); @@ -2504,7 +2634,7 @@ describe('TypeScript', () => { export type Query = { __typename?: 'Query'; - myField?: Maybe; + myField?: Maybe; }; export type QueryMyFieldArgs = { @@ -2582,7 +2712,7 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type MyInput = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; `); validateTs(result); @@ -2610,7 +2740,7 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type Input = - { int: Scalars['Int']; }; + { int: Scalars['Int']['input']; }; `); }); @@ -2632,8 +2762,8 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type Input = - { int: Scalars['Int']; boolean?: never; } - | { int?: never; boolean: Scalars['Boolean']; }; + { int: Scalars['Int']['input']; boolean?: never; } + | { int?: never; boolean: Scalars['Boolean']['input']; }; `); }); @@ -2654,7 +2784,7 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export interface Input { - int: Scalars['Int']; + int: Scalars['Int']['input']; } `); }); @@ -2677,8 +2807,8 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type Input = - { int: Scalars['Int']; boolean?: never; } - | { int?: never; boolean: Scalars['Boolean']; }; + { int: Scalars['Int']['input']; boolean?: never; } + | { int?: never; boolean: Scalars['Boolean']['input']; }; `); }); @@ -2726,8 +2856,8 @@ describe('TypeScript', () => { const result = await plugin(schema, [], {}, { outputFile: '' }); expect(result.content).toBeSimilarStringTo(` export type Input = - { int: Scalars['Int']; boolean?: never; } - | { int?: never; boolean: Scalars['Boolean']; }; + { int: Scalars['Int']['input']; boolean?: never; } + | { int?: never; boolean: Scalars['Boolean']['input']; }; `); }); @@ -2751,8 +2881,8 @@ describe('TypeScript', () => { const result = await plugin(schema, [], {}, { outputFile: '' }); expect(result.content).toBeSimilarStringTo(` export type Input = - { int: Scalars['Int']; boolean?: never; } - | { int?: never; boolean: Scalars['Boolean']; }; + { int: Scalars['Int']['input']; boolean?: never; } + | { int?: never; boolean: Scalars['Boolean']['input']; }; `); }); }); @@ -2760,7 +2890,11 @@ describe('TypeScript', () => { describe('Naming Convention & Types Prefix', () => { it('Should use custom namingConvention for type name and args typename', async () => { - const schema = buildSchema(`type MyType { foo(a: String!, b: String, c: [String], d: [Int!]!): String }`); + const schema = buildSchema(/* GraphQL */ ` + type MyType { + foo(a: String!, b: String, c: [String], d: [Int!]!): String + } + `); const result = (await plugin( schema, [], @@ -2770,16 +2904,16 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type mytypefooargs = { - a: Scalars['String']; - b?: InputMaybe; - c?: InputMaybe>>; - d: Array; + a: Scalars['String']['input']; + b?: InputMaybe; + c?: InputMaybe>>; + d: Array; }; `); expect(result.content).toBeSimilarStringTo(` export type mytype = { __typename?: 'MyType'; - foo?: Maybe; + foo?: Maybe; }; `); @@ -2787,7 +2921,11 @@ describe('TypeScript', () => { }); it('Should use custom namingConvention and add custom prefix', async () => { - const schema = buildSchema(`type MyType { foo(a: String!, b: String, c: [String], d: [Int!]!): String }`); + const schema = buildSchema(/* GraphQL */ ` + type MyType { + foo(a: String!, b: String, c: [String], d: [Int!]!): String + } + `); const result = (await plugin( schema, [], @@ -2797,17 +2935,17 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type Imytypefooargs = { - a: Scalars['String']; - b?: InputMaybe; - c?: InputMaybe>>; - d: Array; + a: Scalars['String']['input']; + b?: InputMaybe; + c?: InputMaybe>>; + d: Array; }; `); expect(result.content).toBeSimilarStringTo(` export type Imytype = { __typename?: 'MyType'; - foo?: Maybe; + foo?: Maybe; }; `); @@ -2839,47 +2977,47 @@ describe('TypeScript', () => { validateTs(result); }); - const schema = buildSchema(` - enum MyEnum { - A - B - C - } + const schema = buildSchema(/* GraphQL */ ` + enum MyEnum { + A + B + C + } - type MyType { - f: String - bar: MyEnum - b_a_r: String - myOtherField: String - } + type MyType { + f: String + bar: MyEnum + b_a_r: String + myOtherField: String + } - type My_Type { - linkTest: MyType - } + type My_Type { + linkTest: MyType + } - union MyUnion = My_Type | MyType + union MyUnion = My_Type | MyType - interface Some_Interface { - id: ID! - } + interface Some_Interface { + id: ID! + } - type Impl1 implements Some_Interface { - id: ID! - } + type Impl1 implements Some_Interface { + id: ID! + } - type Impl_2 implements Some_Interface { - id: ID! - } + type Impl_2 implements Some_Interface { + id: ID! + } - type impl_3 implements Some_Interface { - id: ID! - } + type impl_3 implements Some_Interface { + id: ID! + } - type Query { - something: MyUnion - use_interface: Some_Interface - } - `); + type Query { + something: MyUnion + use_interface: Some_Interface + } + `); it('Should generate correct values when using links between types - lowerCase', async () => { const result = (await plugin( @@ -2899,10 +3037,10 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type mytype = { __typename?: 'MyType'; - f?: Maybe; + f?: Maybe; bar?: Maybe; - b_a_r?: Maybe; - myOtherField?: Maybe; + b_a_r?: Maybe; + myOtherField?: Maybe; }; `); expect(result.content).toBeSimilarStringTo(` @@ -2916,25 +3054,25 @@ describe('TypeScript', () => { `); expect(result.content).toBeSimilarStringTo(` export type some_interface = { - id: Scalars['ID']; + id: Scalars['ID']['output']; }; `); expect(result.content).toBeSimilarStringTo(` export type impl1 = some_interface & { __typename?: 'Impl1'; - id: Scalars['ID']; + id: Scalars['ID']['output']; }; `); expect(result.content).toBeSimilarStringTo(` export type impl_2 = some_interface & { __typename?: 'Impl_2'; - id: Scalars['ID']; + id: Scalars['ID']['output']; }; `); expect(result.content).toBeSimilarStringTo(` export type impl_3 = some_interface & { __typename?: 'impl_3'; - id: Scalars['ID']; + id: Scalars['ID']['output']; }; `); expect(result.content).toBeSimilarStringTo(` @@ -2961,10 +3099,10 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type MyType = { __typename?: 'MyType'; - f?: Maybe; + f?: Maybe; bar?: Maybe; - b_a_r?: Maybe; - myOtherField?: Maybe; + b_a_r?: Maybe; + myOtherField?: Maybe; }; `); expect(result.content).toBeSimilarStringTo(` @@ -2978,25 +3116,25 @@ describe('TypeScript', () => { `); expect(result.content).toBeSimilarStringTo(` export type Some_Interface = { - id: Scalars['ID']; + id: Scalars['ID']['output']; }; `); expect(result.content).toBeSimilarStringTo(` export type Impl1 = Some_Interface & { __typename?: 'Impl1'; - id: Scalars['ID']; + id: Scalars['ID']['output']; }; `); expect(result.content).toBeSimilarStringTo(` export type Impl_2 = Some_Interface & { __typename?: 'Impl_2'; - id: Scalars['ID']; + id: Scalars['ID']['output']; }; `); expect(result.content).toBeSimilarStringTo(` export type Impl_3 = Some_Interface & { __typename?: 'impl_3'; - id: Scalars['ID']; + id: Scalars['ID']['output']; }; `); expect(result.content).toBeSimilarStringTo(` @@ -3023,10 +3161,10 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type IMyType = { __typename?: 'MyType'; - f?: Maybe; + f?: Maybe; bar?: Maybe; - b_a_r?: Maybe; - myOtherField?: Maybe; + b_a_r?: Maybe; + myOtherField?: Maybe; };`); expect(result.content).toBeSimilarStringTo(` export type IMy_Type = { @@ -3037,25 +3175,25 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(`export type IMyUnion = IMy_Type | IMyType;`); expect(result.content).toBeSimilarStringTo(` export type ISome_Interface = { - id: Scalars['ID']; + id: Scalars['ID']['output']; }; `); expect(result.content).toBeSimilarStringTo(` export type IImpl1 = ISome_Interface & { __typename?: 'Impl1'; - id: Scalars['ID']; + id: Scalars['ID']['output']; }; `); expect(result.content).toBeSimilarStringTo(` export type IImpl_2 = ISome_Interface & { __typename?: 'Impl_2'; - id: Scalars['ID']; + id: Scalars['ID']['output']; }; `); expect(result.content).toBeSimilarStringTo(` export type IImpl_3 = ISome_Interface & { __typename?: 'impl_3'; - id: Scalars['ID']; + id: Scalars['ID']['output']; }; `); expect(result.content).toBeSimilarStringTo(` @@ -3072,16 +3210,20 @@ describe('TypeScript', () => { describe('Arguments', () => { it('Should generate correctly types for field arguments - with basic fields', async () => { - const schema = buildSchema(`type MyType { foo(a: String!, b: String, c: [String], d: [Int!]!): String }`); + const schema = buildSchema(/* GraphQL */ ` + type MyType { + foo(a: String!, b: String, c: [String], d: [Int!]!): String + } + `); const result = await plugin(schema, [], {}, { outputFile: '' }); expect(result.content).toBeSimilarStringTo(` export type MyTypeFooArgs = { - a: Scalars['String']; - b?: InputMaybe; - c?: InputMaybe>>; - d: Array; + a: Scalars['String']['input']; + b?: InputMaybe; + c?: InputMaybe>>; + d: Array; }; `); @@ -3089,17 +3231,19 @@ describe('TypeScript', () => { }); it('Should generate correctly types for field arguments - with default value', async () => { - const schema = buildSchema( - `type MyType { foo(a: String = "default", b: String! = "default", c: String, d: String!): String }` - ); + const schema = buildSchema(/* GraphQL */ ` + type MyType { + foo(a: String = "default", b: String! = "default", c: String, d: String!): String + } + `); const result = await plugin(schema, [], {}, { outputFile: '' }); expect(result.content).toBeSimilarStringTo(` export type MyTypeFooArgs = { - a?: InputMaybe; - b?: Scalars['String']; - c?: InputMaybe; - d: Scalars['String']; + a?: InputMaybe; + b?: Scalars['String']['input']; + c?: InputMaybe; + d: Scalars['String']['input']; }; `); @@ -3107,9 +3251,11 @@ describe('TypeScript', () => { }); it('Should generate correctly types for field arguments - with default value and avoidOptionals option set to true', async () => { - const schema = buildSchema( - `type MyType { foo(a: String = "default", b: String! = "default", c: String, d: String!): String }` - ); + const schema = buildSchema(/* GraphQL */ ` + type MyType { + foo(a: String = "default", b: String! = "default", c: String, d: String!): String + } + `); const result = (await plugin( schema, [], @@ -3119,10 +3265,10 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type MyTypeFooArgs = { - a?: InputMaybe; - b?: Scalars['String']; - c: InputMaybe; - d: Scalars['String']; + a?: InputMaybe; + b?: Scalars['String']['input']; + c: InputMaybe; + d: Scalars['String']['input']; }; `); @@ -3130,9 +3276,14 @@ describe('TypeScript', () => { }); it('Should generate correctly types for field arguments - with input type', async () => { - const schema = buildSchema( - `input MyInput { f: String } type MyType { foo(a: MyInput, b: MyInput!, c: [MyInput], d: [MyInput]!, e: [MyInput!]!): String }` - ); + const schema = buildSchema(/* GraphQL */ ` + input MyInput { + f: String + } + type MyType { + foo(a: MyInput, b: MyInput!, c: [MyInput], d: [MyInput]!, e: [MyInput!]!): String + } + `); const result = await plugin(schema, [], {}, { outputFile: '' }); expect(result.content).toBeSimilarStringTo(` @@ -3149,23 +3300,30 @@ describe('TypeScript', () => { }); it('Should add custom prefix for mutation arguments', async () => { - const schema = buildSchema(`input Input { name: String } type Mutation { foo(id: ID, input: Input): String }`); + const schema = buildSchema(/* GraphQL */ ` + input Input { + name: String + } + type Mutation { + foo(id: ID, input: Input): String + } + `); const result = await plugin(schema, [], { typesPrefix: 'T' }, { outputFile: '' }); expect(result.content).toBeSimilarStringTo(` export type TInput = { - name?: InputMaybe; + name?: InputMaybe; }; `); expect(result.content).toBeSimilarStringTo(` export type TMutation = { __typename?: 'Mutation'; - foo?: Maybe; + foo?: Maybe; }; export type TMutationFooArgs = { - id?: InputMaybe; + id?: InputMaybe; input?: InputMaybe; }; `); @@ -3192,25 +3350,30 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type NodeTextArgs = { - arg1: Scalars['String']; - arg2?: InputMaybe; + arg1: Scalars['String']['input']; + arg2?: InputMaybe; }; `); await validateTs(result); }); it('Should generate correctly types for inputs with default value - #4273', async () => { - const schema = buildSchema( - `input MyInput { a: String = "default", b: String! = "default", c: String, d: String! }` - ); + const schema = buildSchema(/* GraphQL */ ` + input MyInput { + a: String = "default" + b: String! = "default" + c: String + d: String! + } + `); const result = await plugin(schema, [], {}, { outputFile: '' }); expect(result.content).toBeSimilarStringTo(` export type MyInput = { - a?: InputMaybe; - b?: Scalars['String']; - c?: InputMaybe; - d: Scalars['String']; + a?: InputMaybe; + b?: Scalars['String']['input']; + c?: InputMaybe; + d: Scalars['String']['input']; }; `); @@ -3218,17 +3381,22 @@ describe('TypeScript', () => { }); it('Should generate correctly types for inputs with default value and avoidOptionals.defaultValue set to true - #5112', async () => { - const schema = buildSchema( - `input MyInput { a: String = "default", b: String! = "default", c: String, d: String! }` - ); + const schema = buildSchema(/* GraphQL */ ` + input MyInput { + a: String = "default" + b: String! = "default" + c: String + d: String! + } + `); const result = await plugin(schema, [], { avoidOptionals: { defaultValue: true } }, { outputFile: '' }); expect(result.content).toBeSimilarStringTo(` export type MyInput = { - a?: InputMaybe; - b: Scalars['String']; - c?: InputMaybe; - d: Scalars['String']; + a?: InputMaybe; + b: Scalars['String']['input']; + c?: InputMaybe; + d: Scalars['String']['input']; }; `); @@ -3236,9 +3404,11 @@ describe('TypeScript', () => { }); it('Should generate correctly types for field arguments with default value and avoidOptionals.defaultValue option set to true - #5112', async () => { - const schema = buildSchema( - `type MyType { foo(a: String = "default", b: String! = "default", c: String, d: String!): String }` - ); + const schema = buildSchema(/* GraphQL */ ` + type MyType { + foo(a: String = "default", b: String! = "default", c: String, d: String!): String + } + `); const result = (await plugin( schema, [], @@ -3248,10 +3418,10 @@ describe('TypeScript', () => { expect(result.content).toBeSimilarStringTo(` export type MyTypeFooArgs = { - a?: InputMaybe; - b: Scalars['String']; - c?: InputMaybe; - d: Scalars['String']; + a?: InputMaybe; + b: Scalars['String']['input']; + c?: InputMaybe; + d: Scalars['String']['input']; }; `); @@ -3589,13 +3759,13 @@ describe('TypeScript', () => { // Filter.contain should be optional expect(output.content).toBeSimilarStringTo(` export type Filter = { - contain?: InputMaybe; + contain?: InputMaybe; }; `); // filter should be non-optional expect(output.content).toBeSimilarStringTo(` export type QueryListArgs = { - after?: InputMaybe; + after?: InputMaybe; orderBy?: InputMaybe; filter: Filter; }; diff --git a/packages/presets/client/tests/client-preset.spec.ts b/packages/presets/client/tests/client-preset.spec.ts index 55dea54142d..9d92a26301b 100644 --- a/packages/presets/client/tests/client-preset.spec.ts +++ b/packages/presets/client/tests/client-preset.spec.ts @@ -347,18 +347,18 @@ export * from "./gql";`); 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type Query = { __typename?: 'Query'; - a?: Maybe; - b?: Maybe; - c?: Maybe; + a?: Maybe; + b?: Maybe; + c?: Maybe; }; export type AQueryVariables = Exact<{ [key: string]: never; }>; @@ -477,18 +477,18 @@ export * from "./gql";`); 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type Query = { __typename: 'Query'; - a?: Maybe; - b?: Maybe; - c?: Maybe; + a?: Maybe; + b?: Maybe; + c?: Maybe; }; export type AQueryVariables = Exact<{ [key: string]: never; }>; @@ -590,16 +590,16 @@ export * from "./gql";`); 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type Query = { __typename?: 'Query'; - a?: Maybe; + a?: Maybe; }; export type AQueryVariables = Exact<{ [key: string]: never; }>; @@ -1256,18 +1256,18 @@ export * from "./gql.js";`); 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type Query = { __typename?: 'Query'; - a?: Maybe; - b?: Maybe; - c?: Maybe; + a?: Maybe; + b?: Maybe; + c?: Maybe; }; export type BbbQueryVariables = Exact<{ [key: string]: never; }>; @@ -1334,18 +1334,18 @@ export * from "./gql.js";`); 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type Query = { __typename?: 'Query'; - a?: Maybe; - b?: Maybe; - c?: Maybe; + a?: Maybe; + b?: Maybe; + c?: Maybe; }; export type AQueryVariables = Exact<{ [key: string]: never; }>; @@ -1415,18 +1415,18 @@ export * from "./gql.js";`); 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type Query = { __typename?: 'Query'; - a?: Maybe; - b?: Maybe; - c?: Maybe; + a?: Maybe; + b?: Maybe; + c?: Maybe; }; export type AQueryVariables = Exact<{ [key: string]: never; }>; @@ -1496,18 +1496,18 @@ export * from "./gql.js";`); 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type Query = { __typename?: 'Query'; - a?: Maybe; - b?: Maybe; - c?: Maybe; + a?: Maybe; + b?: Maybe; + c?: Maybe; }; export type AQueryVariables = Exact<{ [key: string]: never; }>; @@ -1579,18 +1579,18 @@ export * from "./gql.js";`); 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type Query = { __typename?: 'Query'; - a?: Maybe; - b?: Maybe; - c?: Maybe; + a?: Maybe; + b?: Maybe; + c?: Maybe; }; export type AaaQueryVariables = Exact<{ [key: string]: never; }>; @@ -1658,18 +1658,18 @@ export * from "./gql.js";`); 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type Query = { __typename?: 'Query'; - a?: Maybe; - b?: Maybe; - c?: Maybe; + a?: Maybe; + b?: Maybe; + c?: Maybe; }; export type AQueryVariables = Exact<{ [key: string]: never; }>; @@ -1750,17 +1750,17 @@ export * from "./gql.js";`); 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type A = { __typename?: 'A'; a: A; - b: Scalars['String']; + b: Scalars['String']['output']; }; export type Query = { @@ -1829,17 +1829,17 @@ export * from "./gql.js";`); 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type Foo = { __typename?: 'Foo'; - id?: Maybe; - value?: Maybe; + id?: Maybe; + value?: Maybe; }; export type Query = { @@ -1914,17 +1914,17 @@ export * from "./gql.js";`); 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type Foo = { __typename?: 'Foo'; - id?: Maybe; - value?: Maybe; + id?: Maybe; + value?: Maybe; }; export type Query = { @@ -1999,17 +1999,17 @@ export * from "./gql.js";`); 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type Foo = { __typename?: 'Foo'; - id?: Maybe; - value?: Maybe; + id?: Maybe; + value?: Maybe; }; export type Query = { @@ -2140,17 +2140,17 @@ export * from "./gql.js";`); 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type Foo = { __typename?: 'Foo'; - id?: Maybe; - value?: Maybe; + id?: Maybe; + value?: Maybe; }; export type Query = { @@ -2279,16 +2279,16 @@ export * from "./gql.js";`); 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: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; + ID: { input: string | number; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } }; export type Foo = { __typename?: 'Foo'; - value?: Maybe; + value?: Maybe; }; export type Query = { diff --git a/website/src/pages/docs/advanced/how-does-it-work.mdx b/website/src/pages/docs/advanced/how-does-it-work.mdx index 0c92718c53d..20614bb2be6 100644 --- a/website/src/pages/docs/advanced/how-does-it-work.mdx +++ b/website/src/pages/docs/advanced/how-does-it-work.mdx @@ -112,12 +112,12 @@ export default config; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; - Date: any; + ID: { input: string | number; output: string; }; + String: { input: string; output: string; }; + Boolean: { input: boolean; output: boolean; }; + Int: { input: number; output: number; }; + Float: { input: number; output: number; }; + Date: { input: any; output: any; }; }; export type Query = { @@ -131,12 +131,12 @@ export type Query = { export type QueryUserArgs = { - id: Scalars['ID']; + id: Scalars['ID']['input']; }; export type QuerySearchArgs = { - term: Scalars['String']; + term: Scalars['String']['input']; }; export enum Role { @@ -145,36 +145,36 @@ export enum Role { } export type Node = { - id: Scalars['ID']; + id: Scalars['ID']['output']; }; export type SearchResult = User | Chat | ChatMessage; export type User = Node & { __typename?: 'User'; - id: Scalars['ID']; - username: Scalars['String']; - email: Scalars['String']; + id: Scalars['ID']['output']; + username: Scalars['String']['output']; + email: Scalars['String']['output']; role: Role; }; export type Chat = Node & { __typename?: 'Chat'; - id: Scalars['ID']; + id: Scalars['ID']['output']; users: Array; messages: Array; }; export type ChatMessage = Node & { __typename?: 'ChatMessage'; - id: Scalars['ID']; - content: Scalars['String']; - time: Scalars['Date']; + id: Scalars['ID']['output']; + content: Scalars['String']['output']; + time: Scalars['Date']['output']; user: User; }; export type FindUserQueryVariables = Exact<{ - userId: Scalars['ID']; + userId: Scalars['ID']['input']; }>;