diff --git a/.changeset/salty-guests-retire.md b/.changeset/salty-guests-retire.md new file mode 100644 index 00000000000..78587b447ad --- /dev/null +++ b/.changeset/salty-guests-retire.md @@ -0,0 +1,6 @@ +--- +'@graphql-codegen/typescript-operations': major +'@graphql-codegen/client-preset': major +--- + +Integrate new typescript-operations into client-preset diff --git a/dev-test/codegen.ts b/dev-test/codegen.ts index a1126bf169e..075ee2918be 100644 --- a/dev-test/codegen.ts +++ b/dev-test/codegen.ts @@ -40,7 +40,6 @@ const config: CodegenConfig = { { add: { content: 'declare namespace GraphQL {' } }, { add: { placement: 'append', content: '}' } }, 'typescript', - 'typescript-operations', ], }, './dev-test/test-schema/env.types.ts': { schema: process.env.SCHEMA_PATH, plugins: ['typescript'] }, @@ -65,81 +64,81 @@ const config: CodegenConfig = { './dev-test/githunt/typed-document-nodes.ts': { schema: './dev-test/githunt/schema.json', documents: './dev-test/githunt/**/*.graphql', - plugins: ['typescript', 'typescript-operations', 'typed-document-node'], + plugins: ['typescript-operations', 'typed-document-node'], }, './dev-test/githunt/types.ts': { schema: './dev-test/githunt/schema.json', documents: './dev-test/githunt/**/*.graphql', - plugins: ['typescript', 'typescript-operations'], + plugins: ['typescript-operations'], }, './dev-test/githunt/types.preResolveTypes.ts': { schema: './dev-test/githunt/schema.json', documents: './dev-test/githunt/**/*.graphql', config: { preResolveTypes: true }, - plugins: ['typescript', 'typescript-operations'], + plugins: ['typescript-operations'], }, './dev-test/githunt/types.onlyEnums.ts': { schema: './dev-test/githunt/schema.json', documents: './dev-test/githunt/**/*.graphql', - config: { onlyEnums: true }, - plugins: ['typescript'], + config: { generatesOperationTypes: false }, + plugins: ['typescript-operations'], }, './dev-test/githunt/types.preResolveTypes.onlyOperationTypes.ts': { schema: './dev-test/githunt/schema.json', documents: './dev-test/githunt/**/*.graphql', - config: { preResolveTypes: true, onlyOperationTypes: true }, - plugins: ['typescript', 'typescript-operations'], + config: { preResolveTypes: true }, + plugins: ['typescript-operations'], }, './dev-test/githunt/types.flatten.preResolveTypes.ts': { schema: './dev-test/githunt/schema.json', documents: './dev-test/githunt/**/*.graphql', config: { preResolveTypes: true, flattenGeneratedTypes: true }, - plugins: ['typescript', 'typescript-operations'], + plugins: ['typescript-operations'], }, './dev-test/githunt/types.enumsAsTypes.ts': { schema: './dev-test/githunt/schema.json', documents: './dev-test/githunt/**/*.graphql', - config: { enumsAsTypes: true }, - plugins: ['typescript', 'typescript-operations'], + config: { enumType: 'string-literal' }, + plugins: ['typescript-operations'], }, './dev-test/githunt/types.d.ts': { schema: './dev-test/githunt/schema.json', documents: './dev-test/githunt/**/*.graphql', - config: { enumsAsTypes: true }, - plugins: ['typescript', 'typescript-operations'], + config: {}, + plugins: ['typescript-operations'], }, './dev-test/githunt/types.avoidOptionals.ts': { schema: './dev-test/githunt/schema.json', documents: './dev-test/githunt/**/*.graphql', config: { avoidOptionals: true }, - plugins: ['typescript', 'typescript-operations'], + plugins: ['typescript-operations'], }, './dev-test/githunt/types.immutableTypes.ts': { schema: './dev-test/githunt/schema.json', documents: './dev-test/githunt/**/*.graphql', config: { immutableTypes: true }, - plugins: ['typescript', 'typescript-operations'], + plugins: ['typescript-operations'], }, './dev-test/star-wars/types.ts': { schema: './dev-test/star-wars/schema.json', documents: './dev-test/star-wars/**/*.graphql', - plugins: ['typescript', 'typescript-operations'], + plugins: ['typescript-operations'], }, './dev-test/star-wars/types.excludeQueryAlpha.ts': { schema: './dev-test/star-wars/schema.json', documents: ['./dev-test/star-wars/**/*.graphql', '!./dev-test/star-wars/**/ExcludeQueryAlpha.graphql'], - plugins: ['typescript', 'typescript-operations'], + plugins: ['typescript-operations'], }, './dev-test/star-wars/types.excludeQueryBeta.ts': { schema: './dev-test/star-wars/schema.json', documents: ['./dev-test/star-wars/**/*.graphql', '!./dev-test/star-wars/**/ExcludeQueryBeta.graphql'], - plugins: ['typescript', 'typescript-operations'], + plugins: ['typescript-operations'], }, './dev-test/star-wars/types.preResolveTypes.ts': { schema: './dev-test/star-wars/schema.json', documents: './dev-test/star-wars/**/*.graphql', config: { preResolveTypes: true }, - plugins: ['typescript', 'typescript-operations'], + plugins: ['typescript-operations'], }, './dev-test/star-wars/types.OnlyEnums.ts': { schema: './dev-test/star-wars/schema.json', @@ -150,25 +149,25 @@ const config: CodegenConfig = { './dev-test/star-wars/types.preResolveTypes.onlyOperationTypes.ts': { schema: './dev-test/star-wars/schema.json', documents: './dev-test/star-wars/**/*.graphql', - config: { preResolveTypes: true, onlyOperationTypes: true }, - plugins: ['typescript', 'typescript-operations'], + config: { preResolveTypes: true }, + plugins: ['typescript-operations'], }, './dev-test/test-schema/types.preResolveTypes.ts': { schema: './dev-test/test-schema/schema.graphql', documents: ['query test { testArr1 testArr2 testArr3 }'], config: { preResolveTypes: true }, - plugins: ['typescript', 'typescript-operations'], + plugins: ['typescript-operations'], }, './dev-test/test-schema/types.preResolveTypes.onlyOperationTypes.ts': { schema: './dev-test/test-schema/schema.graphql', documents: ['query test { testArr1 testArr2 testArr3 }'], - config: { preResolveTypes: true, onlyOperationTypes: true }, - plugins: ['typescript', 'typescript-operations'], + config: { preResolveTypes: true }, + plugins: ['typescript-operations'], }, './dev-test/star-wars/types.d.ts': { schema: './dev-test/star-wars/schema.json', - config: { enumsAsTypes: true }, - plugins: ['typescript', 'typescript-operations'], + config: { enumType: 'string-literal' }, + plugins: ['typescript-operations'], }, './dev-test/modules/': { schema: './dev-test/modules/*/types/*.graphql', @@ -179,25 +178,25 @@ const config: CodegenConfig = { './dev-test/star-wars/types.globallyAvailable.d.ts': { schema: './dev-test/star-wars/schema.json', documents: './dev-test/star-wars/**/*.graphql', - config: { enumsAsTypes: true, noExport: true }, - plugins: ['typescript', 'typescript-operations'], + config: { noExport: true }, + plugins: ['typescript-operations'], }, './dev-test/star-wars/types.avoidOptionals.ts': { schema: './dev-test/star-wars/schema.json', documents: './dev-test/star-wars/**/*.graphql', config: { avoidOptionals: true }, - plugins: ['typescript', 'typescript-operations'], + plugins: ['typescript-operations'], }, './dev-test/star-wars/types.immutableTypes.ts': { schema: './dev-test/star-wars/schema.json', documents: './dev-test/star-wars/**/*.graphql', config: { immutableTypes: true }, - plugins: ['typescript', 'typescript-operations'], + plugins: ['typescript-operations'], }, './dev-test/star-wars/types.skipSchema.ts': { schema: './dev-test/star-wars/schema.json', documents: './dev-test/star-wars/**/*.graphql', - plugins: ['typescript', 'typescript-operations'], + plugins: ['typescript-operations'], }, './dev-test/gql-tag-operations/gql/': { schema: './dev-test/gql-tag-operations/schema.graphql', @@ -224,7 +223,7 @@ const config: CodegenConfig = { './dev-test/test-null-value/result.d.ts': { schema: './dev-test/test-null-value/schema.graphql', documents: ['./dev-test/test-null-value/query.ts'], - plugins: ['typescript', 'typescript-operations'], + plugins: ['typescript-operations'], config: { // The combination of these two flags caused the following issue: // https://github.com/dotansimha/graphql-code-generator/pull/9709 diff --git a/dev-test/githunt/typed-document-nodes.ts b/dev-test/githunt/typed-document-nodes.ts index 4eed5751e4f..3cbeb500f21 100644 --- a/dev-test/githunt/typed-document-nodes.ts +++ b/dev-test/githunt/typed-document-nodes.ts @@ -1,174 +1,6 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A comment about an entry, submitted by a user */ -export type Comment = { - __typename?: 'Comment'; - /** The text of the comment */ - content: Scalars['String']['output']; - /** A timestamp of when the comment was posted */ - createdAt: Scalars['Float']['output']; - /** The SQL ID of this entry */ - id: Scalars['Int']['output']; - /** The GitHub user who posted the comment */ - postedBy: User; - /** The repository which this comment is about */ - repoName: Scalars['String']['output']; -}; - -/** Information about a GitHub repository submitted to GitHunt */ -export type Entry = { - __typename?: 'Entry'; - /** The number of comments posted about this repository */ - commentCount: Scalars['Int']['output']; - /** Comments posted about this repository */ - comments: Array>; - /** A timestamp of when the entry was submitted */ - createdAt: Scalars['Float']['output']; - /** The hot score of this repository */ - hotScore: Scalars['Float']['output']; - /** The SQL ID of this entry */ - id: Scalars['Int']['output']; - /** The GitHub user who submitted this entry */ - postedBy: User; - /** Information about the repository from GitHub */ - repository: Repository; - /** The score of this repository, upvotes - downvotes */ - score: Scalars['Int']['output']; - /** XXX to be changed */ - vote: Vote; -}; - -/** Information about a GitHub repository submitted to GitHunt */ -export type EntryCommentsArgs = { - limit?: InputMaybe; - offset?: InputMaybe; -}; - -/** A list of options for the sort order of the feed */ -export enum FeedType { - /** Sort by a combination of freshness and score, using Reddit's algorithm */ - Hot = 'HOT', - /** Newest entries first */ - New = 'NEW', - /** Highest score entries first */ - Top = 'TOP', -} - -export type Mutation = { - __typename?: 'Mutation'; - /** Comment on a repository, returns the new comment */ - submitComment?: Maybe; - /** Submit a new repository, returns the new submission */ - submitRepository?: Maybe; - /** Vote on a repository submission, returns the submission that was voted on */ - vote?: Maybe; -}; - -export type MutationSubmitCommentArgs = { - commentContent: Scalars['String']['input']; - repoFullName: Scalars['String']['input']; -}; - -export type MutationSubmitRepositoryArgs = { - repoFullName: Scalars['String']['input']; -}; - -export type MutationVoteArgs = { - repoFullName: Scalars['String']['input']; - type: VoteType; -}; - -export type Query = { - __typename?: 'Query'; - /** Return the currently logged in user, or null if nobody is logged in */ - currentUser?: Maybe; - /** A single entry */ - entry?: Maybe; - /** A feed of repository submissions */ - feed?: Maybe>>; -}; - -export type QueryEntryArgs = { - repoFullName: Scalars['String']['input']; -}; - -export type QueryFeedArgs = { - limit?: InputMaybe; - offset?: InputMaybe; - type: FeedType; -}; - -/** - * A repository object from the GitHub API. This uses the exact field names returned by the - * GitHub API for simplicity, even though the convention for GraphQL is usually to camel case. - */ -export type Repository = { - __typename?: 'Repository'; - /** The description of the repository */ - description?: Maybe; - /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */ - full_name: Scalars['String']['output']; - /** The link to the repository on GitHub */ - html_url: Scalars['String']['output']; - /** Just the name of the repository, e.g. GitHunt-API */ - name: Scalars['String']['output']; - /** The number of open issues on this repository on GitHub */ - open_issues_count?: Maybe; - /** The owner of this repository on GitHub, e.g. apollostack */ - owner?: Maybe; - /** The number of people who have starred this repository on GitHub */ - stargazers_count: Scalars['Int']['output']; -}; - -export type Subscription = { - __typename?: 'Subscription'; - /** Subscription fires on every comment added */ - commentAdded?: Maybe; -}; - -export type SubscriptionCommentAddedArgs = { - repoFullName: Scalars['String']['input']; -}; - -/** A user object from the GitHub API. This uses the exact field names returned from the GitHub API. */ -export type User = { - __typename?: 'User'; - /** The URL to a directly embeddable image for this user's avatar */ - avatar_url: Scalars['String']['output']; - /** The URL of this user's GitHub page */ - html_url: Scalars['String']['output']; - /** The name of the user, e.g. apollostack */ - login: Scalars['String']['output']; -}; - -/** XXX to be removed */ -export type Vote = { - __typename?: 'Vote'; - vote_value: Scalars['Int']['output']; -}; - -/** The type of vote to record, when submitting a vote */ -export enum VoteType { - Cancel = 'CANCEL', - Down = 'DOWN', - Up = 'UP', -} - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type OnCommentAddedSubscriptionVariables = Exact<{ repoFullName: string; }>; diff --git a/dev-test/githunt/types.avoidOptionals.ts b/dev-test/githunt/types.avoidOptionals.ts index 66c403d7758..e566e5cec23 100644 --- a/dev-test/githunt/types.avoidOptionals.ts +++ b/dev-test/githunt/types.avoidOptionals.ts @@ -1,173 +1,5 @@ -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A comment about an entry, submitted by a user */ -export type Comment = { - __typename?: 'Comment'; - /** The text of the comment */ - content: Scalars['String']['output']; - /** A timestamp of when the comment was posted */ - createdAt: Scalars['Float']['output']; - /** The SQL ID of this entry */ - id: Scalars['Int']['output']; - /** The GitHub user who posted the comment */ - postedBy: User; - /** The repository which this comment is about */ - repoName: Scalars['String']['output']; -}; - -/** Information about a GitHub repository submitted to GitHunt */ -export type Entry = { - __typename?: 'Entry'; - /** The number of comments posted about this repository */ - commentCount: Scalars['Int']['output']; - /** Comments posted about this repository */ - comments: Array>; - /** A timestamp of when the entry was submitted */ - createdAt: Scalars['Float']['output']; - /** The hot score of this repository */ - hotScore: Scalars['Float']['output']; - /** The SQL ID of this entry */ - id: Scalars['Int']['output']; - /** The GitHub user who submitted this entry */ - postedBy: User; - /** Information about the repository from GitHub */ - repository: Repository; - /** The score of this repository, upvotes - downvotes */ - score: Scalars['Int']['output']; - /** XXX to be changed */ - vote: Vote; -}; - -/** Information about a GitHub repository submitted to GitHunt */ -export type EntryCommentsArgs = { - limit: InputMaybe; - offset: InputMaybe; -}; - -/** A list of options for the sort order of the feed */ -export enum FeedType { - /** Sort by a combination of freshness and score, using Reddit's algorithm */ - Hot = 'HOT', - /** Newest entries first */ - New = 'NEW', - /** Highest score entries first */ - Top = 'TOP', -} - -export type Mutation = { - __typename?: 'Mutation'; - /** Comment on a repository, returns the new comment */ - submitComment: Maybe; - /** Submit a new repository, returns the new submission */ - submitRepository: Maybe; - /** Vote on a repository submission, returns the submission that was voted on */ - vote: Maybe; -}; - -export type MutationSubmitCommentArgs = { - commentContent: Scalars['String']['input']; - repoFullName: Scalars['String']['input']; -}; - -export type MutationSubmitRepositoryArgs = { - repoFullName: Scalars['String']['input']; -}; - -export type MutationVoteArgs = { - repoFullName: Scalars['String']['input']; - type: VoteType; -}; - -export type Query = { - __typename?: 'Query'; - /** Return the currently logged in user, or null if nobody is logged in */ - currentUser: Maybe; - /** A single entry */ - entry: Maybe; - /** A feed of repository submissions */ - feed: Maybe>>; -}; - -export type QueryEntryArgs = { - repoFullName: Scalars['String']['input']; -}; - -export type QueryFeedArgs = { - limit: InputMaybe; - offset: InputMaybe; - type: FeedType; -}; - -/** - * A repository object from the GitHub API. This uses the exact field names returned by the - * GitHub API for simplicity, even though the convention for GraphQL is usually to camel case. - */ -export type Repository = { - __typename?: 'Repository'; - /** The description of the repository */ - description: Maybe; - /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */ - full_name: Scalars['String']['output']; - /** The link to the repository on GitHub */ - html_url: Scalars['String']['output']; - /** Just the name of the repository, e.g. GitHunt-API */ - name: Scalars['String']['output']; - /** The number of open issues on this repository on GitHub */ - open_issues_count: Maybe; - /** The owner of this repository on GitHub, e.g. apollostack */ - owner: Maybe; - /** The number of people who have starred this repository on GitHub */ - stargazers_count: Scalars['Int']['output']; -}; - -export type Subscription = { - __typename?: 'Subscription'; - /** Subscription fires on every comment added */ - commentAdded: Maybe; -}; - -export type SubscriptionCommentAddedArgs = { - repoFullName: Scalars['String']['input']; -}; - -/** A user object from the GitHub API. This uses the exact field names returned from the GitHub API. */ -export type User = { - __typename?: 'User'; - /** The URL to a directly embeddable image for this user's avatar */ - avatar_url: Scalars['String']['output']; - /** The URL of this user's GitHub page */ - html_url: Scalars['String']['output']; - /** The name of the user, e.g. apollostack */ - login: Scalars['String']['output']; -}; - -/** XXX to be removed */ -export type Vote = { - __typename?: 'Vote'; - vote_value: Scalars['Int']['output']; -}; - -/** The type of vote to record, when submitting a vote */ -export enum VoteType { - Cancel = 'CANCEL', - Down = 'DOWN', - Up = 'UP', -} - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type OnCommentAddedSubscriptionVariables = Exact<{ repoFullName: string; }>; diff --git a/dev-test/githunt/types.d.ts b/dev-test/githunt/types.d.ts index b84825f3808..87e35a2a5da 100644 --- a/dev-test/githunt/types.d.ts +++ b/dev-test/githunt/types.d.ts @@ -1,168 +1,5 @@ -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A comment about an entry, submitted by a user */ -export type Comment = { - __typename?: 'Comment'; - /** The text of the comment */ - content: Scalars['String']['output']; - /** A timestamp of when the comment was posted */ - createdAt: Scalars['Float']['output']; - /** The SQL ID of this entry */ - id: Scalars['Int']['output']; - /** The GitHub user who posted the comment */ - postedBy: User; - /** The repository which this comment is about */ - repoName: Scalars['String']['output']; -}; - -/** Information about a GitHub repository submitted to GitHunt */ -export type Entry = { - __typename?: 'Entry'; - /** The number of comments posted about this repository */ - commentCount: Scalars['Int']['output']; - /** Comments posted about this repository */ - comments: Array>; - /** A timestamp of when the entry was submitted */ - createdAt: Scalars['Float']['output']; - /** The hot score of this repository */ - hotScore: Scalars['Float']['output']; - /** The SQL ID of this entry */ - id: Scalars['Int']['output']; - /** The GitHub user who submitted this entry */ - postedBy: User; - /** Information about the repository from GitHub */ - repository: Repository; - /** The score of this repository, upvotes - downvotes */ - score: Scalars['Int']['output']; - /** XXX to be changed */ - vote: Vote; -}; - -/** Information about a GitHub repository submitted to GitHunt */ -export type EntryCommentsArgs = { - limit?: InputMaybe; - offset?: InputMaybe; -}; - -/** A list of options for the sort order of the feed */ -export type FeedType = - /** Sort by a combination of freshness and score, using Reddit's algorithm */ - | 'HOT' - /** Newest entries first */ - | 'NEW' - /** Highest score entries first */ - | 'TOP'; - -export type Mutation = { - __typename?: 'Mutation'; - /** Comment on a repository, returns the new comment */ - submitComment?: Maybe; - /** Submit a new repository, returns the new submission */ - submitRepository?: Maybe; - /** Vote on a repository submission, returns the submission that was voted on */ - vote?: Maybe; -}; - -export type MutationSubmitCommentArgs = { - commentContent: Scalars['String']['input']; - repoFullName: Scalars['String']['input']; -}; - -export type MutationSubmitRepositoryArgs = { - repoFullName: Scalars['String']['input']; -}; - -export type MutationVoteArgs = { - repoFullName: Scalars['String']['input']; - type: VoteType; -}; - -export type Query = { - __typename?: 'Query'; - /** Return the currently logged in user, or null if nobody is logged in */ - currentUser?: Maybe; - /** A single entry */ - entry?: Maybe; - /** A feed of repository submissions */ - feed?: Maybe>>; -}; - -export type QueryEntryArgs = { - repoFullName: Scalars['String']['input']; -}; - -export type QueryFeedArgs = { - limit?: InputMaybe; - offset?: InputMaybe; - type: FeedType; -}; - -/** - * A repository object from the GitHub API. This uses the exact field names returned by the - * GitHub API for simplicity, even though the convention for GraphQL is usually to camel case. - */ -export type Repository = { - __typename?: 'Repository'; - /** The description of the repository */ - description?: Maybe; - /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */ - full_name: Scalars['String']['output']; - /** The link to the repository on GitHub */ - html_url: Scalars['String']['output']; - /** Just the name of the repository, e.g. GitHunt-API */ - name: Scalars['String']['output']; - /** The number of open issues on this repository on GitHub */ - open_issues_count?: Maybe; - /** The owner of this repository on GitHub, e.g. apollostack */ - owner?: Maybe; - /** The number of people who have starred this repository on GitHub */ - stargazers_count: Scalars['Int']['output']; -}; - -export type Subscription = { - __typename?: 'Subscription'; - /** Subscription fires on every comment added */ - commentAdded?: Maybe; -}; - -export type SubscriptionCommentAddedArgs = { - repoFullName: Scalars['String']['input']; -}; - -/** A user object from the GitHub API. This uses the exact field names returned from the GitHub API. */ -export type User = { - __typename?: 'User'; - /** The URL to a directly embeddable image for this user's avatar */ - avatar_url: Scalars['String']['output']; - /** The URL of this user's GitHub page */ - html_url: Scalars['String']['output']; - /** The name of the user, e.g. apollostack */ - login: Scalars['String']['output']; -}; - -/** XXX to be removed */ -export type Vote = { - __typename?: 'Vote'; - vote_value: Scalars['Int']['output']; -}; - -/** The type of vote to record, when submitting a vote */ -export type VoteType = 'CANCEL' | 'DOWN' | 'UP'; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type OnCommentAddedSubscriptionVariables = Exact<{ repoFullName: string; }>; diff --git a/dev-test/githunt/types.enumsAsTypes.ts b/dev-test/githunt/types.enumsAsTypes.ts index b84825f3808..87e35a2a5da 100644 --- a/dev-test/githunt/types.enumsAsTypes.ts +++ b/dev-test/githunt/types.enumsAsTypes.ts @@ -1,168 +1,5 @@ -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A comment about an entry, submitted by a user */ -export type Comment = { - __typename?: 'Comment'; - /** The text of the comment */ - content: Scalars['String']['output']; - /** A timestamp of when the comment was posted */ - createdAt: Scalars['Float']['output']; - /** The SQL ID of this entry */ - id: Scalars['Int']['output']; - /** The GitHub user who posted the comment */ - postedBy: User; - /** The repository which this comment is about */ - repoName: Scalars['String']['output']; -}; - -/** Information about a GitHub repository submitted to GitHunt */ -export type Entry = { - __typename?: 'Entry'; - /** The number of comments posted about this repository */ - commentCount: Scalars['Int']['output']; - /** Comments posted about this repository */ - comments: Array>; - /** A timestamp of when the entry was submitted */ - createdAt: Scalars['Float']['output']; - /** The hot score of this repository */ - hotScore: Scalars['Float']['output']; - /** The SQL ID of this entry */ - id: Scalars['Int']['output']; - /** The GitHub user who submitted this entry */ - postedBy: User; - /** Information about the repository from GitHub */ - repository: Repository; - /** The score of this repository, upvotes - downvotes */ - score: Scalars['Int']['output']; - /** XXX to be changed */ - vote: Vote; -}; - -/** Information about a GitHub repository submitted to GitHunt */ -export type EntryCommentsArgs = { - limit?: InputMaybe; - offset?: InputMaybe; -}; - -/** A list of options for the sort order of the feed */ -export type FeedType = - /** Sort by a combination of freshness and score, using Reddit's algorithm */ - | 'HOT' - /** Newest entries first */ - | 'NEW' - /** Highest score entries first */ - | 'TOP'; - -export type Mutation = { - __typename?: 'Mutation'; - /** Comment on a repository, returns the new comment */ - submitComment?: Maybe; - /** Submit a new repository, returns the new submission */ - submitRepository?: Maybe; - /** Vote on a repository submission, returns the submission that was voted on */ - vote?: Maybe; -}; - -export type MutationSubmitCommentArgs = { - commentContent: Scalars['String']['input']; - repoFullName: Scalars['String']['input']; -}; - -export type MutationSubmitRepositoryArgs = { - repoFullName: Scalars['String']['input']; -}; - -export type MutationVoteArgs = { - repoFullName: Scalars['String']['input']; - type: VoteType; -}; - -export type Query = { - __typename?: 'Query'; - /** Return the currently logged in user, or null if nobody is logged in */ - currentUser?: Maybe; - /** A single entry */ - entry?: Maybe; - /** A feed of repository submissions */ - feed?: Maybe>>; -}; - -export type QueryEntryArgs = { - repoFullName: Scalars['String']['input']; -}; - -export type QueryFeedArgs = { - limit?: InputMaybe; - offset?: InputMaybe; - type: FeedType; -}; - -/** - * A repository object from the GitHub API. This uses the exact field names returned by the - * GitHub API for simplicity, even though the convention for GraphQL is usually to camel case. - */ -export type Repository = { - __typename?: 'Repository'; - /** The description of the repository */ - description?: Maybe; - /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */ - full_name: Scalars['String']['output']; - /** The link to the repository on GitHub */ - html_url: Scalars['String']['output']; - /** Just the name of the repository, e.g. GitHunt-API */ - name: Scalars['String']['output']; - /** The number of open issues on this repository on GitHub */ - open_issues_count?: Maybe; - /** The owner of this repository on GitHub, e.g. apollostack */ - owner?: Maybe; - /** The number of people who have starred this repository on GitHub */ - stargazers_count: Scalars['Int']['output']; -}; - -export type Subscription = { - __typename?: 'Subscription'; - /** Subscription fires on every comment added */ - commentAdded?: Maybe; -}; - -export type SubscriptionCommentAddedArgs = { - repoFullName: Scalars['String']['input']; -}; - -/** A user object from the GitHub API. This uses the exact field names returned from the GitHub API. */ -export type User = { - __typename?: 'User'; - /** The URL to a directly embeddable image for this user's avatar */ - avatar_url: Scalars['String']['output']; - /** The URL of this user's GitHub page */ - html_url: Scalars['String']['output']; - /** The name of the user, e.g. apollostack */ - login: Scalars['String']['output']; -}; - -/** XXX to be removed */ -export type Vote = { - __typename?: 'Vote'; - vote_value: Scalars['Int']['output']; -}; - -/** The type of vote to record, when submitting a vote */ -export type VoteType = 'CANCEL' | 'DOWN' | 'UP'; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type OnCommentAddedSubscriptionVariables = Exact<{ repoFullName: string; }>; diff --git a/dev-test/githunt/types.flatten.preResolveTypes.ts b/dev-test/githunt/types.flatten.preResolveTypes.ts index 90348f33215..a68bbeba546 100644 --- a/dev-test/githunt/types.flatten.preResolveTypes.ts +++ b/dev-test/githunt/types.flatten.preResolveTypes.ts @@ -1,173 +1,5 @@ -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A comment about an entry, submitted by a user */ -export type Comment = { - __typename?: 'Comment'; - /** The text of the comment */ - content: Scalars['String']['output']; - /** A timestamp of when the comment was posted */ - createdAt: Scalars['Float']['output']; - /** The SQL ID of this entry */ - id: Scalars['Int']['output']; - /** The GitHub user who posted the comment */ - postedBy: User; - /** The repository which this comment is about */ - repoName: Scalars['String']['output']; -}; - -/** Information about a GitHub repository submitted to GitHunt */ -export type Entry = { - __typename?: 'Entry'; - /** The number of comments posted about this repository */ - commentCount: Scalars['Int']['output']; - /** Comments posted about this repository */ - comments: Array>; - /** A timestamp of when the entry was submitted */ - createdAt: Scalars['Float']['output']; - /** The hot score of this repository */ - hotScore: Scalars['Float']['output']; - /** The SQL ID of this entry */ - id: Scalars['Int']['output']; - /** The GitHub user who submitted this entry */ - postedBy: User; - /** Information about the repository from GitHub */ - repository: Repository; - /** The score of this repository, upvotes - downvotes */ - score: Scalars['Int']['output']; - /** XXX to be changed */ - vote: Vote; -}; - -/** Information about a GitHub repository submitted to GitHunt */ -export type EntryCommentsArgs = { - limit?: InputMaybe; - offset?: InputMaybe; -}; - -/** A list of options for the sort order of the feed */ -export enum FeedType { - /** Sort by a combination of freshness and score, using Reddit's algorithm */ - Hot = 'HOT', - /** Newest entries first */ - New = 'NEW', - /** Highest score entries first */ - Top = 'TOP', -} - -export type Mutation = { - __typename?: 'Mutation'; - /** Comment on a repository, returns the new comment */ - submitComment?: Maybe; - /** Submit a new repository, returns the new submission */ - submitRepository?: Maybe; - /** Vote on a repository submission, returns the submission that was voted on */ - vote?: Maybe; -}; - -export type MutationSubmitCommentArgs = { - commentContent: Scalars['String']['input']; - repoFullName: Scalars['String']['input']; -}; - -export type MutationSubmitRepositoryArgs = { - repoFullName: Scalars['String']['input']; -}; - -export type MutationVoteArgs = { - repoFullName: Scalars['String']['input']; - type: VoteType; -}; - -export type Query = { - __typename?: 'Query'; - /** Return the currently logged in user, or null if nobody is logged in */ - currentUser?: Maybe; - /** A single entry */ - entry?: Maybe; - /** A feed of repository submissions */ - feed?: Maybe>>; -}; - -export type QueryEntryArgs = { - repoFullName: Scalars['String']['input']; -}; - -export type QueryFeedArgs = { - limit?: InputMaybe; - offset?: InputMaybe; - type: FeedType; -}; - -/** - * A repository object from the GitHub API. This uses the exact field names returned by the - * GitHub API for simplicity, even though the convention for GraphQL is usually to camel case. - */ -export type Repository = { - __typename?: 'Repository'; - /** The description of the repository */ - description?: Maybe; - /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */ - full_name: Scalars['String']['output']; - /** The link to the repository on GitHub */ - html_url: Scalars['String']['output']; - /** Just the name of the repository, e.g. GitHunt-API */ - name: Scalars['String']['output']; - /** The number of open issues on this repository on GitHub */ - open_issues_count?: Maybe; - /** The owner of this repository on GitHub, e.g. apollostack */ - owner?: Maybe; - /** The number of people who have starred this repository on GitHub */ - stargazers_count: Scalars['Int']['output']; -}; - -export type Subscription = { - __typename?: 'Subscription'; - /** Subscription fires on every comment added */ - commentAdded?: Maybe; -}; - -export type SubscriptionCommentAddedArgs = { - repoFullName: Scalars['String']['input']; -}; - -/** A user object from the GitHub API. This uses the exact field names returned from the GitHub API. */ -export type User = { - __typename?: 'User'; - /** The URL to a directly embeddable image for this user's avatar */ - avatar_url: Scalars['String']['output']; - /** The URL of this user's GitHub page */ - html_url: Scalars['String']['output']; - /** The name of the user, e.g. apollostack */ - login: Scalars['String']['output']; -}; - -/** XXX to be removed */ -export type Vote = { - __typename?: 'Vote'; - vote_value: Scalars['Int']['output']; -}; - -/** The type of vote to record, when submitting a vote */ -export enum VoteType { - Cancel = 'CANCEL', - Down = 'DOWN', - Up = 'UP', -} - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type OnCommentAddedSubscriptionVariables = Exact<{ repoFullName: string; }>; diff --git a/dev-test/githunt/types.immutableTypes.ts b/dev-test/githunt/types.immutableTypes.ts index f708b3c3dce..32423b2970d 100644 --- a/dev-test/githunt/types.immutableTypes.ts +++ b/dev-test/githunt/types.immutableTypes.ts @@ -1,173 +1,5 @@ -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A comment about an entry, submitted by a user */ -export type Comment = { - readonly __typename?: 'Comment'; - /** The text of the comment */ - readonly content: Scalars['String']['output']; - /** A timestamp of when the comment was posted */ - readonly createdAt: Scalars['Float']['output']; - /** The SQL ID of this entry */ - readonly id: Scalars['Int']['output']; - /** The GitHub user who posted the comment */ - readonly postedBy: User; - /** The repository which this comment is about */ - readonly repoName: Scalars['String']['output']; -}; - -/** Information about a GitHub repository submitted to GitHunt */ -export type Entry = { - readonly __typename?: 'Entry'; - /** The number of comments posted about this repository */ - readonly commentCount: Scalars['Int']['output']; - /** Comments posted about this repository */ - readonly comments: ReadonlyArray>; - /** A timestamp of when the entry was submitted */ - readonly createdAt: Scalars['Float']['output']; - /** The hot score of this repository */ - readonly hotScore: Scalars['Float']['output']; - /** The SQL ID of this entry */ - readonly id: Scalars['Int']['output']; - /** The GitHub user who submitted this entry */ - readonly postedBy: User; - /** Information about the repository from GitHub */ - readonly repository: Repository; - /** The score of this repository, upvotes - downvotes */ - readonly score: Scalars['Int']['output']; - /** XXX to be changed */ - readonly vote: Vote; -}; - -/** Information about a GitHub repository submitted to GitHunt */ -export type EntryCommentsArgs = { - limit?: InputMaybe; - offset?: InputMaybe; -}; - -/** A list of options for the sort order of the feed */ -export enum FeedType { - /** Sort by a combination of freshness and score, using Reddit's algorithm */ - Hot = 'HOT', - /** Newest entries first */ - New = 'NEW', - /** Highest score entries first */ - Top = 'TOP', -} - -export type Mutation = { - readonly __typename?: 'Mutation'; - /** Comment on a repository, returns the new comment */ - readonly submitComment?: Maybe; - /** Submit a new repository, returns the new submission */ - readonly submitRepository?: Maybe; - /** Vote on a repository submission, returns the submission that was voted on */ - readonly vote?: Maybe; -}; - -export type MutationSubmitCommentArgs = { - commentContent: Scalars['String']['input']; - repoFullName: Scalars['String']['input']; -}; - -export type MutationSubmitRepositoryArgs = { - repoFullName: Scalars['String']['input']; -}; - -export type MutationVoteArgs = { - repoFullName: Scalars['String']['input']; - type: VoteType; -}; - -export type Query = { - readonly __typename?: 'Query'; - /** Return the currently logged in user, or null if nobody is logged in */ - readonly currentUser?: Maybe; - /** A single entry */ - readonly entry?: Maybe; - /** A feed of repository submissions */ - readonly feed?: Maybe>>; -}; - -export type QueryEntryArgs = { - repoFullName: Scalars['String']['input']; -}; - -export type QueryFeedArgs = { - limit?: InputMaybe; - offset?: InputMaybe; - type: FeedType; -}; - -/** - * A repository object from the GitHub API. This uses the exact field names returned by the - * GitHub API for simplicity, even though the convention for GraphQL is usually to camel case. - */ -export type Repository = { - readonly __typename?: 'Repository'; - /** The description of the repository */ - readonly description?: Maybe; - /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */ - readonly full_name: Scalars['String']['output']; - /** The link to the repository on GitHub */ - readonly html_url: Scalars['String']['output']; - /** Just the name of the repository, e.g. GitHunt-API */ - readonly name: Scalars['String']['output']; - /** The number of open issues on this repository on GitHub */ - readonly open_issues_count?: Maybe; - /** The owner of this repository on GitHub, e.g. apollostack */ - readonly owner?: Maybe; - /** The number of people who have starred this repository on GitHub */ - readonly stargazers_count: Scalars['Int']['output']; -}; - -export type Subscription = { - readonly __typename?: 'Subscription'; - /** Subscription fires on every comment added */ - readonly commentAdded?: Maybe; -}; - -export type SubscriptionCommentAddedArgs = { - repoFullName: Scalars['String']['input']; -}; - -/** A user object from the GitHub API. This uses the exact field names returned from the GitHub API. */ -export type User = { - readonly __typename?: 'User'; - /** The URL to a directly embeddable image for this user's avatar */ - readonly avatar_url: Scalars['String']['output']; - /** The URL of this user's GitHub page */ - readonly html_url: Scalars['String']['output']; - /** The name of the user, e.g. apollostack */ - readonly login: Scalars['String']['output']; -}; - -/** XXX to be removed */ -export type Vote = { - readonly __typename?: 'Vote'; - readonly vote_value: Scalars['Int']['output']; -}; - -/** The type of vote to record, when submitting a vote */ -export enum VoteType { - Cancel = 'CANCEL', - Down = 'DOWN', - Up = 'UP', -} - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type OnCommentAddedSubscriptionVariables = Exact<{ repoFullName: string; }>; diff --git a/dev-test/githunt/types.preResolveTypes.onlyOperationTypes.ts b/dev-test/githunt/types.preResolveTypes.onlyOperationTypes.ts index 29bff30b9dd..87e35a2a5da 100644 --- a/dev-test/githunt/types.preResolveTypes.onlyOperationTypes.ts +++ b/dev-test/githunt/types.preResolveTypes.onlyOperationTypes.ts @@ -1,36 +1,5 @@ -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A list of options for the sort order of the feed */ -export enum FeedType { - /** Sort by a combination of freshness and score, using Reddit's algorithm */ - Hot = 'HOT', - /** Newest entries first */ - New = 'NEW', - /** Highest score entries first */ - Top = 'TOP', -} - -/** The type of vote to record, when submitting a vote */ -export enum VoteType { - Cancel = 'CANCEL', - Down = 'DOWN', - Up = 'UP', -} - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type OnCommentAddedSubscriptionVariables = Exact<{ repoFullName: string; }>; diff --git a/dev-test/githunt/types.preResolveTypes.ts b/dev-test/githunt/types.preResolveTypes.ts index c63166be345..87e35a2a5da 100644 --- a/dev-test/githunt/types.preResolveTypes.ts +++ b/dev-test/githunt/types.preResolveTypes.ts @@ -1,173 +1,5 @@ -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A comment about an entry, submitted by a user */ -export type Comment = { - __typename?: 'Comment'; - /** The text of the comment */ - content: Scalars['String']['output']; - /** A timestamp of when the comment was posted */ - createdAt: Scalars['Float']['output']; - /** The SQL ID of this entry */ - id: Scalars['Int']['output']; - /** The GitHub user who posted the comment */ - postedBy: User; - /** The repository which this comment is about */ - repoName: Scalars['String']['output']; -}; - -/** Information about a GitHub repository submitted to GitHunt */ -export type Entry = { - __typename?: 'Entry'; - /** The number of comments posted about this repository */ - commentCount: Scalars['Int']['output']; - /** Comments posted about this repository */ - comments: Array>; - /** A timestamp of when the entry was submitted */ - createdAt: Scalars['Float']['output']; - /** The hot score of this repository */ - hotScore: Scalars['Float']['output']; - /** The SQL ID of this entry */ - id: Scalars['Int']['output']; - /** The GitHub user who submitted this entry */ - postedBy: User; - /** Information about the repository from GitHub */ - repository: Repository; - /** The score of this repository, upvotes - downvotes */ - score: Scalars['Int']['output']; - /** XXX to be changed */ - vote: Vote; -}; - -/** Information about a GitHub repository submitted to GitHunt */ -export type EntryCommentsArgs = { - limit?: InputMaybe; - offset?: InputMaybe; -}; - -/** A list of options for the sort order of the feed */ -export enum FeedType { - /** Sort by a combination of freshness and score, using Reddit's algorithm */ - Hot = 'HOT', - /** Newest entries first */ - New = 'NEW', - /** Highest score entries first */ - Top = 'TOP', -} - -export type Mutation = { - __typename?: 'Mutation'; - /** Comment on a repository, returns the new comment */ - submitComment?: Maybe; - /** Submit a new repository, returns the new submission */ - submitRepository?: Maybe; - /** Vote on a repository submission, returns the submission that was voted on */ - vote?: Maybe; -}; - -export type MutationSubmitCommentArgs = { - commentContent: Scalars['String']['input']; - repoFullName: Scalars['String']['input']; -}; - -export type MutationSubmitRepositoryArgs = { - repoFullName: Scalars['String']['input']; -}; - -export type MutationVoteArgs = { - repoFullName: Scalars['String']['input']; - type: VoteType; -}; - -export type Query = { - __typename?: 'Query'; - /** Return the currently logged in user, or null if nobody is logged in */ - currentUser?: Maybe; - /** A single entry */ - entry?: Maybe; - /** A feed of repository submissions */ - feed?: Maybe>>; -}; - -export type QueryEntryArgs = { - repoFullName: Scalars['String']['input']; -}; - -export type QueryFeedArgs = { - limit?: InputMaybe; - offset?: InputMaybe; - type: FeedType; -}; - -/** - * A repository object from the GitHub API. This uses the exact field names returned by the - * GitHub API for simplicity, even though the convention for GraphQL is usually to camel case. - */ -export type Repository = { - __typename?: 'Repository'; - /** The description of the repository */ - description?: Maybe; - /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */ - full_name: Scalars['String']['output']; - /** The link to the repository on GitHub */ - html_url: Scalars['String']['output']; - /** Just the name of the repository, e.g. GitHunt-API */ - name: Scalars['String']['output']; - /** The number of open issues on this repository on GitHub */ - open_issues_count?: Maybe; - /** The owner of this repository on GitHub, e.g. apollostack */ - owner?: Maybe; - /** The number of people who have starred this repository on GitHub */ - stargazers_count: Scalars['Int']['output']; -}; - -export type Subscription = { - __typename?: 'Subscription'; - /** Subscription fires on every comment added */ - commentAdded?: Maybe; -}; - -export type SubscriptionCommentAddedArgs = { - repoFullName: Scalars['String']['input']; -}; - -/** A user object from the GitHub API. This uses the exact field names returned from the GitHub API. */ -export type User = { - __typename?: 'User'; - /** The URL to a directly embeddable image for this user's avatar */ - avatar_url: Scalars['String']['output']; - /** The URL of this user's GitHub page */ - html_url: Scalars['String']['output']; - /** The name of the user, e.g. apollostack */ - login: Scalars['String']['output']; -}; - -/** XXX to be removed */ -export type Vote = { - __typename?: 'Vote'; - vote_value: Scalars['Int']['output']; -}; - -/** The type of vote to record, when submitting a vote */ -export enum VoteType { - Cancel = 'CANCEL', - Down = 'DOWN', - Up = 'UP', -} - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type OnCommentAddedSubscriptionVariables = Exact<{ repoFullName: string; }>; diff --git a/dev-test/githunt/types.ts b/dev-test/githunt/types.ts index c63166be345..87e35a2a5da 100644 --- a/dev-test/githunt/types.ts +++ b/dev-test/githunt/types.ts @@ -1,173 +1,5 @@ -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A comment about an entry, submitted by a user */ -export type Comment = { - __typename?: 'Comment'; - /** The text of the comment */ - content: Scalars['String']['output']; - /** A timestamp of when the comment was posted */ - createdAt: Scalars['Float']['output']; - /** The SQL ID of this entry */ - id: Scalars['Int']['output']; - /** The GitHub user who posted the comment */ - postedBy: User; - /** The repository which this comment is about */ - repoName: Scalars['String']['output']; -}; - -/** Information about a GitHub repository submitted to GitHunt */ -export type Entry = { - __typename?: 'Entry'; - /** The number of comments posted about this repository */ - commentCount: Scalars['Int']['output']; - /** Comments posted about this repository */ - comments: Array>; - /** A timestamp of when the entry was submitted */ - createdAt: Scalars['Float']['output']; - /** The hot score of this repository */ - hotScore: Scalars['Float']['output']; - /** The SQL ID of this entry */ - id: Scalars['Int']['output']; - /** The GitHub user who submitted this entry */ - postedBy: User; - /** Information about the repository from GitHub */ - repository: Repository; - /** The score of this repository, upvotes - downvotes */ - score: Scalars['Int']['output']; - /** XXX to be changed */ - vote: Vote; -}; - -/** Information about a GitHub repository submitted to GitHunt */ -export type EntryCommentsArgs = { - limit?: InputMaybe; - offset?: InputMaybe; -}; - -/** A list of options for the sort order of the feed */ -export enum FeedType { - /** Sort by a combination of freshness and score, using Reddit's algorithm */ - Hot = 'HOT', - /** Newest entries first */ - New = 'NEW', - /** Highest score entries first */ - Top = 'TOP', -} - -export type Mutation = { - __typename?: 'Mutation'; - /** Comment on a repository, returns the new comment */ - submitComment?: Maybe; - /** Submit a new repository, returns the new submission */ - submitRepository?: Maybe; - /** Vote on a repository submission, returns the submission that was voted on */ - vote?: Maybe; -}; - -export type MutationSubmitCommentArgs = { - commentContent: Scalars['String']['input']; - repoFullName: Scalars['String']['input']; -}; - -export type MutationSubmitRepositoryArgs = { - repoFullName: Scalars['String']['input']; -}; - -export type MutationVoteArgs = { - repoFullName: Scalars['String']['input']; - type: VoteType; -}; - -export type Query = { - __typename?: 'Query'; - /** Return the currently logged in user, or null if nobody is logged in */ - currentUser?: Maybe; - /** A single entry */ - entry?: Maybe; - /** A feed of repository submissions */ - feed?: Maybe>>; -}; - -export type QueryEntryArgs = { - repoFullName: Scalars['String']['input']; -}; - -export type QueryFeedArgs = { - limit?: InputMaybe; - offset?: InputMaybe; - type: FeedType; -}; - -/** - * A repository object from the GitHub API. This uses the exact field names returned by the - * GitHub API for simplicity, even though the convention for GraphQL is usually to camel case. - */ -export type Repository = { - __typename?: 'Repository'; - /** The description of the repository */ - description?: Maybe; - /** The full name of the repository with the username, e.g. apollostack/GitHunt-API */ - full_name: Scalars['String']['output']; - /** The link to the repository on GitHub */ - html_url: Scalars['String']['output']; - /** Just the name of the repository, e.g. GitHunt-API */ - name: Scalars['String']['output']; - /** The number of open issues on this repository on GitHub */ - open_issues_count?: Maybe; - /** The owner of this repository on GitHub, e.g. apollostack */ - owner?: Maybe; - /** The number of people who have starred this repository on GitHub */ - stargazers_count: Scalars['Int']['output']; -}; - -export type Subscription = { - __typename?: 'Subscription'; - /** Subscription fires on every comment added */ - commentAdded?: Maybe; -}; - -export type SubscriptionCommentAddedArgs = { - repoFullName: Scalars['String']['input']; -}; - -/** A user object from the GitHub API. This uses the exact field names returned from the GitHub API. */ -export type User = { - __typename?: 'User'; - /** The URL to a directly embeddable image for this user's avatar */ - avatar_url: Scalars['String']['output']; - /** The URL of this user's GitHub page */ - html_url: Scalars['String']['output']; - /** The name of the user, e.g. apollostack */ - login: Scalars['String']['output']; -}; - -/** XXX to be removed */ -export type Vote = { - __typename?: 'Vote'; - vote_value: Scalars['Int']['output']; -}; - -/** The type of vote to record, when submitting a vote */ -export enum VoteType { - Cancel = 'CANCEL', - Down = 'DOWN', - Up = 'UP', -} - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type OnCommentAddedSubscriptionVariables = Exact<{ repoFullName: string; }>; diff --git a/dev-test/gql-tag-operations-masking/gql/graphql.ts b/dev-test/gql-tag-operations-masking/gql/graphql.ts index 58cd48f92f0..205eaa4085b 100644 --- a/dev-test/gql-tag-operations-masking/gql/graphql.ts +++ b/dev-test/gql-tag-operations-masking/gql/graphql.ts @@ -1,112 +1,7 @@ /* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = T | null | undefined; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; - Date: { input: any; output: any }; - Url: { input: any; output: any }; -}; - -export type Meta = { - __typename?: 'Meta'; - count?: Maybe; -}; - -export type Mutation = { - __typename?: 'Mutation'; - createTweet?: Maybe; - deleteTweet?: Maybe; - markTweetRead?: Maybe; -}; - -export type MutationCreateTweetArgs = { - body?: InputMaybe; -}; - -export type MutationDeleteTweetArgs = { - id: Scalars['ID']['input']; -}; - -export type MutationMarkTweetReadArgs = { - id: Scalars['ID']['input']; -}; - -export type Notification = { - __typename?: 'Notification'; - date?: Maybe; - id?: Maybe; - type?: Maybe; -}; - -export type Query = { - __typename?: 'Query'; - Notifications?: Maybe>>; - NotificationsMeta?: Maybe; - Tweet?: Maybe; - Tweets?: Maybe>; - TweetsMeta?: Maybe; - User?: Maybe; -}; - -export type QueryNotificationsArgs = { - limit?: InputMaybe; -}; - -export type QueryTweetArgs = { - id: Scalars['ID']['input']; -}; - -export type QueryTweetsArgs = { - limit?: InputMaybe; - skip?: InputMaybe; - sort_field?: InputMaybe; - sort_order?: InputMaybe; -}; - -export type QueryUserArgs = { - id: Scalars['ID']['input']; -}; - -export type Stat = { - __typename?: 'Stat'; - likes?: Maybe; - responses?: Maybe; - retweets?: Maybe; - views?: Maybe; -}; - -export type Tweet = { - __typename?: 'Tweet'; - Stats?: Maybe; - author: User; - 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']['output']; - last_name?: Maybe; - /** @deprecated Field no longer supported */ - name?: Maybe; - username?: Maybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type TweetFragmentFragment = ({ __typename?: 'Tweet'; id: string; body: string } & { ' $fragmentRefs'?: { TweetAuthorFragmentFragment: TweetAuthorFragmentFragment }; }) & { ' $fragmentName'?: 'TweetFragmentFragment' }; diff --git a/dev-test/gql-tag-operations-urql/gql/graphql.ts b/dev-test/gql-tag-operations-urql/gql/graphql.ts index d15b6d5b108..3873fbc6989 100644 --- a/dev-test/gql-tag-operations-urql/gql/graphql.ts +++ b/dev-test/gql-tag-operations-urql/gql/graphql.ts @@ -1,112 +1,7 @@ /* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = T | null | undefined; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; - Date: { input: any; output: any }; - Url: { input: any; output: any }; -}; - -export type Meta = { - __typename?: 'Meta'; - count?: Maybe; -}; - -export type Mutation = { - __typename?: 'Mutation'; - createTweet?: Maybe; - deleteTweet?: Maybe; - markTweetRead?: Maybe; -}; - -export type MutationCreateTweetArgs = { - body?: InputMaybe; -}; - -export type MutationDeleteTweetArgs = { - id: Scalars['ID']['input']; -}; - -export type MutationMarkTweetReadArgs = { - id: Scalars['ID']['input']; -}; - -export type Notification = { - __typename?: 'Notification'; - date?: Maybe; - id?: Maybe; - type?: Maybe; -}; - -export type Query = { - __typename?: 'Query'; - Notifications?: Maybe>>; - NotificationsMeta?: Maybe; - Tweet?: Maybe; - Tweets?: Maybe>>; - TweetsMeta?: Maybe; - User?: Maybe; -}; - -export type QueryNotificationsArgs = { - limit?: InputMaybe; -}; - -export type QueryTweetArgs = { - id: Scalars['ID']['input']; -}; - -export type QueryTweetsArgs = { - limit?: InputMaybe; - skip?: InputMaybe; - sort_field?: InputMaybe; - sort_order?: InputMaybe; -}; - -export type QueryUserArgs = { - id: Scalars['ID']['input']; -}; - -export type Stat = { - __typename?: 'Stat'; - likes?: Maybe; - responses?: Maybe; - retweets?: Maybe; - views?: Maybe; -}; - -export type Tweet = { - __typename?: 'Tweet'; - Author?: Maybe; - Stats?: Maybe; - 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']['output']; - last_name?: Maybe; - /** @deprecated Field no longer supported */ - name?: Maybe; - username?: Maybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type FooQueryVariables = Exact<{ [key: string]: never }>; export type FooQuery = { __typename?: 'Query'; Tweets?: Array<{ __typename?: 'Tweet'; id: string } | null> | null }; diff --git a/dev-test/gql-tag-operations/gql/graphql.ts b/dev-test/gql-tag-operations/gql/graphql.ts index d15b6d5b108..3873fbc6989 100644 --- a/dev-test/gql-tag-operations/gql/graphql.ts +++ b/dev-test/gql-tag-operations/gql/graphql.ts @@ -1,112 +1,7 @@ /* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = T | null | undefined; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; - Date: { input: any; output: any }; - Url: { input: any; output: any }; -}; - -export type Meta = { - __typename?: 'Meta'; - count?: Maybe; -}; - -export type Mutation = { - __typename?: 'Mutation'; - createTweet?: Maybe; - deleteTweet?: Maybe; - markTweetRead?: Maybe; -}; - -export type MutationCreateTweetArgs = { - body?: InputMaybe; -}; - -export type MutationDeleteTweetArgs = { - id: Scalars['ID']['input']; -}; - -export type MutationMarkTweetReadArgs = { - id: Scalars['ID']['input']; -}; - -export type Notification = { - __typename?: 'Notification'; - date?: Maybe; - id?: Maybe; - type?: Maybe; -}; - -export type Query = { - __typename?: 'Query'; - Notifications?: Maybe>>; - NotificationsMeta?: Maybe; - Tweet?: Maybe; - Tweets?: Maybe>>; - TweetsMeta?: Maybe; - User?: Maybe; -}; - -export type QueryNotificationsArgs = { - limit?: InputMaybe; -}; - -export type QueryTweetArgs = { - id: Scalars['ID']['input']; -}; - -export type QueryTweetsArgs = { - limit?: InputMaybe; - skip?: InputMaybe; - sort_field?: InputMaybe; - sort_order?: InputMaybe; -}; - -export type QueryUserArgs = { - id: Scalars['ID']['input']; -}; - -export type Stat = { - __typename?: 'Stat'; - likes?: Maybe; - responses?: Maybe; - retweets?: Maybe; - views?: Maybe; -}; - -export type Tweet = { - __typename?: 'Tweet'; - Author?: Maybe; - Stats?: Maybe; - 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']['output']; - last_name?: Maybe; - /** @deprecated Field no longer supported */ - name?: Maybe; - username?: Maybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type FooQueryVariables = Exact<{ [key: string]: never }>; export type FooQuery = { __typename?: 'Query'; Tweets?: Array<{ __typename?: 'Tweet'; id: string } | null> | null }; diff --git a/dev-test/gql-tag-operations/graphql/graphql.ts b/dev-test/gql-tag-operations/graphql/graphql.ts index d15b6d5b108..3873fbc6989 100644 --- a/dev-test/gql-tag-operations/graphql/graphql.ts +++ b/dev-test/gql-tag-operations/graphql/graphql.ts @@ -1,112 +1,7 @@ /* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = T | null | undefined; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; - Date: { input: any; output: any }; - Url: { input: any; output: any }; -}; - -export type Meta = { - __typename?: 'Meta'; - count?: Maybe; -}; - -export type Mutation = { - __typename?: 'Mutation'; - createTweet?: Maybe; - deleteTweet?: Maybe; - markTweetRead?: Maybe; -}; - -export type MutationCreateTweetArgs = { - body?: InputMaybe; -}; - -export type MutationDeleteTweetArgs = { - id: Scalars['ID']['input']; -}; - -export type MutationMarkTweetReadArgs = { - id: Scalars['ID']['input']; -}; - -export type Notification = { - __typename?: 'Notification'; - date?: Maybe; - id?: Maybe; - type?: Maybe; -}; - -export type Query = { - __typename?: 'Query'; - Notifications?: Maybe>>; - NotificationsMeta?: Maybe; - Tweet?: Maybe; - Tweets?: Maybe>>; - TweetsMeta?: Maybe; - User?: Maybe; -}; - -export type QueryNotificationsArgs = { - limit?: InputMaybe; -}; - -export type QueryTweetArgs = { - id: Scalars['ID']['input']; -}; - -export type QueryTweetsArgs = { - limit?: InputMaybe; - skip?: InputMaybe; - sort_field?: InputMaybe; - sort_order?: InputMaybe; -}; - -export type QueryUserArgs = { - id: Scalars['ID']['input']; -}; - -export type Stat = { - __typename?: 'Stat'; - likes?: Maybe; - responses?: Maybe; - retweets?: Maybe; - views?: Maybe; -}; - -export type Tweet = { - __typename?: 'Tweet'; - Author?: Maybe; - Stats?: Maybe; - 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']['output']; - last_name?: Maybe; - /** @deprecated Field no longer supported */ - name?: Maybe; - username?: Maybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type FooQueryVariables = Exact<{ [key: string]: never }>; export type FooQuery = { __typename?: 'Query'; Tweets?: Array<{ __typename?: 'Tweet'; id: string } | null> | null }; diff --git a/dev-test/standalone-operations/import-schema-types/_types.generated.ts b/dev-test/standalone-operations/import-schema-types/_types.generated.ts index f51c326a287..8e7086fd159 100644 --- a/dev-test/standalone-operations/import-schema-types/_types.generated.ts +++ b/dev-test/standalone-operations/import-schema-types/_types.generated.ts @@ -1,6 +1,7 @@ import type * as Types from './_base.generated'; type Exact = { [K in keyof T]: T[K] }; +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type WithVariablesQueryVariables = Exact<{ role?: Types.UserRole | null; }>; diff --git a/dev-test/star-wars/types.avoidOptionals.ts b/dev-test/star-wars/types.avoidOptionals.ts index 24b23e24f0c..7bbb8f54163 100644 --- a/dev-test/star-wars/types.avoidOptionals.ts +++ b/dev-test/star-wars/types.avoidOptionals.ts @@ -1,245 +1,5 @@ -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A character from the Star Wars universe */ -export type Character = { - /** The movies this character appears in */ - appearsIn: Array>; - /** The friends of the character, or an empty list if they have none */ - friends: Maybe>>; - /** The friends of the character exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** The ID of the character */ - id: Scalars['ID']['output']; - /** The name of the character */ - name: Scalars['String']['output']; -}; - -/** A character from the Star Wars universe */ -export type CharacterFriendsConnectionArgs = { - after: InputMaybe; - first: InputMaybe; -}; - -/** The input object sent when passing a color */ -export type ColorInput = { - blue: Scalars['Int']['input']; - green: Scalars['Int']['input']; - red: Scalars['Int']['input']; -}; - -/** An autonomous mechanical character in the Star Wars universe */ -export type Droid = Character & { - __typename?: 'Droid'; - /** The movies this droid appears in */ - appearsIn: Array>; - /** This droid's friends, or an empty list if they have none */ - friends: Maybe>>; - /** The friends of the droid exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** The ID of the droid */ - id: Scalars['ID']['output']; - /** What others call this droid */ - name: Scalars['String']['output']; - /** This droid's primary function */ - primaryFunction: Maybe; -}; - -/** An autonomous mechanical character in the Star Wars universe */ -export type DroidFriendsConnectionArgs = { - after: InputMaybe; - first: InputMaybe; -}; - -/** The episodes in the Star Wars trilogy */ -export enum Episode { - /** Star Wars Episode V: The Empire Strikes Back, released in 1980. */ - Empire = 'EMPIRE', - /** Star Wars Episode VI: Return of the Jedi, released in 1983. */ - Jedi = 'JEDI', - /** Star Wars Episode IV: A New Hope, released in 1977. */ - Newhope = 'NEWHOPE', -} - -/** A connection object for a character's friends */ -export type FriendsConnection = { - __typename?: 'FriendsConnection'; - /** The edges for each of the character's friends. */ - edges: Maybe>>; - /** A list of the friends, as a convenience when edges are not needed. */ - friends: Maybe>>; - /** Information for paginating this connection */ - pageInfo: PageInfo; - /** The total number of friends */ - totalCount: Maybe; -}; - -/** An edge object for a character's friends */ -export type FriendsEdge = { - __typename?: 'FriendsEdge'; - /** A cursor used for pagination */ - cursor: Scalars['ID']['output']; - /** The character represented by this friendship edge */ - node: Maybe; -}; - -/** A humanoid creature from the Star Wars universe */ -export type Human = Character & { - __typename?: 'Human'; - /** The movies this human appears in */ - appearsIn: Array>; - /** This human's friends, or an empty list if they have none */ - friends: Maybe>>; - /** The friends of the human exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** Height in the preferred unit, default is meters */ - height: Maybe; - /** The home planet of the human, or null if unknown */ - homePlanet: Maybe; - /** The ID of the human */ - id: Scalars['ID']['output']; - /** Mass in kilograms, or null if unknown */ - mass: Maybe; - /** What this human calls themselves */ - 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; -}; - -/** A humanoid creature from the Star Wars universe */ -export type HumanHeightArgs = { - unit?: InputMaybe; -}; - -/** Units of height */ -export enum LengthUnit { - /** Primarily used in the United States */ - Foot = 'FOOT', - /** The standard unit around the world */ - Meter = 'METER', -} - -/** The mutation type, represents all updates we can make to our data */ -export type Mutation = { - __typename?: 'Mutation'; - createReview: Maybe; -}; - -/** The mutation type, represents all updates we can make to our data */ -export type MutationCreateReviewArgs = { - episode: InputMaybe; - review: ReviewInput; -}; - -/** Information for paginating this connection */ -export type PageInfo = { - __typename?: 'PageInfo'; - endCursor: Maybe; - hasNextPage: Scalars['Boolean']['output']; - startCursor: Maybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type Query = { - __typename?: 'Query'; - character: Maybe; - droid: Maybe; - hero: Maybe; - human: Maybe; - reviews: Maybe>>; - search: Maybe>>; - starship: Maybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryCharacterArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryDroidArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryHeroArgs = { - episode: InputMaybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryHumanArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryReviewsArgs = { - episode: Episode; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QuerySearchArgs = { - text: InputMaybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryStarshipArgs = { - id: Scalars['ID']['input']; -}; - -/** Represents a review for a movie */ -export type Review = { - __typename?: 'Review'; - /** Comment about the movie */ - commentary: Maybe; - /** The number of stars this review gave, 1-5 */ - 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; - /** Favorite color, optional */ - favoriteColor: InputMaybe; - /** 0-5 stars */ - stars: Scalars['Int']['input']; -}; - -export type SearchResult = Droid | Human | Starship; - -export type Starship = { - __typename?: 'Starship'; - /** The ID of the starship */ - id: Scalars['ID']['output']; - /** Length of the starship, along the longest axis */ - length: Maybe; - /** The name of the starship */ - name: Scalars['String']['output']; -}; - -export type StarshipLengthArgs = { - unit?: InputMaybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type CreateReviewForEpisodeMutationVariables = Exact<{ episode: Episode; review: ReviewInput; diff --git a/dev-test/star-wars/types.d.ts b/dev-test/star-wars/types.d.ts index 541a5ad81e6..0fd39f72102 100644 --- a/dev-test/star-wars/types.d.ts +++ b/dev-test/star-wars/types.d.ts @@ -1,239 +1,2 @@ -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A character from the Star Wars universe */ -export type Character = { - /** The movies this character appears in */ - appearsIn: Array>; - /** The friends of the character, or an empty list if they have none */ - friends?: Maybe>>; - /** The friends of the character exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** The ID of the character */ - id: Scalars['ID']['output']; - /** The name of the character */ - name: Scalars['String']['output']; -}; - -/** A character from the Star Wars universe */ -export type CharacterFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; -}; - -/** The input object sent when passing a color */ -export type ColorInput = { - blue: Scalars['Int']['input']; - green: Scalars['Int']['input']; - red: Scalars['Int']['input']; -}; - -/** An autonomous mechanical character in the Star Wars universe */ -export type Droid = Character & { - __typename?: 'Droid'; - /** The movies this droid appears in */ - appearsIn: Array>; - /** This droid's friends, or an empty list if they have none */ - friends?: Maybe>>; - /** The friends of the droid exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** The ID of the droid */ - id: Scalars['ID']['output']; - /** What others call this droid */ - name: Scalars['String']['output']; - /** This droid's primary function */ - primaryFunction?: Maybe; -}; - -/** An autonomous mechanical character in the Star Wars universe */ -export type DroidFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; -}; - -/** The episodes in the Star Wars trilogy */ -export type Episode = - /** Star Wars Episode V: The Empire Strikes Back, released in 1980. */ - | 'EMPIRE' - /** Star Wars Episode VI: Return of the Jedi, released in 1983. */ - | 'JEDI' - /** Star Wars Episode IV: A New Hope, released in 1977. */ - | 'NEWHOPE'; - -/** A connection object for a character's friends */ -export type FriendsConnection = { - __typename?: 'FriendsConnection'; - /** The edges for each of the character's friends. */ - edges?: Maybe>>; - /** A list of the friends, as a convenience when edges are not needed. */ - friends?: Maybe>>; - /** Information for paginating this connection */ - pageInfo: PageInfo; - /** The total number of friends */ - totalCount?: Maybe; -}; - -/** An edge object for a character's friends */ -export type FriendsEdge = { - __typename?: 'FriendsEdge'; - /** A cursor used for pagination */ - cursor: Scalars['ID']['output']; - /** The character represented by this friendship edge */ - node?: Maybe; -}; - -/** A humanoid creature from the Star Wars universe */ -export type Human = Character & { - __typename?: 'Human'; - /** The movies this human appears in */ - appearsIn: Array>; - /** This human's friends, or an empty list if they have none */ - friends?: Maybe>>; - /** The friends of the human exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** Height in the preferred unit, default is meters */ - height?: Maybe; - /** The home planet of the human, or null if unknown */ - homePlanet?: Maybe; - /** The ID of the human */ - id: Scalars['ID']['output']; - /** Mass in kilograms, or null if unknown */ - mass?: Maybe; - /** What this human calls themselves */ - 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; -}; - -/** A humanoid creature from the Star Wars universe */ -export type HumanHeightArgs = { - unit?: InputMaybe; -}; - -/** Units of height */ -export type LengthUnit = - /** Primarily used in the United States */ - | 'FOOT' - /** The standard unit around the world */ - | 'METER'; - -/** The mutation type, represents all updates we can make to our data */ -export type Mutation = { - __typename?: 'Mutation'; - createReview?: Maybe; -}; - -/** The mutation type, represents all updates we can make to our data */ -export type MutationCreateReviewArgs = { - episode?: InputMaybe; - review: ReviewInput; -}; - -/** Information for paginating this connection */ -export type PageInfo = { - __typename?: 'PageInfo'; - endCursor?: Maybe; - hasNextPage: Scalars['Boolean']['output']; - startCursor?: Maybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type Query = { - __typename?: 'Query'; - character?: Maybe; - droid?: Maybe; - hero?: Maybe; - human?: Maybe; - reviews?: Maybe>>; - search?: Maybe>>; - starship?: Maybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryCharacterArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryDroidArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryHeroArgs = { - episode?: InputMaybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryHumanArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryReviewsArgs = { - episode: Episode; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QuerySearchArgs = { - text?: InputMaybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryStarshipArgs = { - id: Scalars['ID']['input']; -}; - -/** Represents a review for a movie */ -export type Review = { - __typename?: 'Review'; - /** Comment about the movie */ - commentary?: Maybe; - /** The number of stars this review gave, 1-5 */ - 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; - /** Favorite color, optional */ - favoriteColor?: InputMaybe; - /** 0-5 stars */ - stars: Scalars['Int']['input']; -}; - -export type SearchResult = Droid | Human | Starship; - -export type Starship = { - __typename?: 'Starship'; - /** The ID of the starship */ - id: Scalars['ID']['output']; - /** Length of the starship, along the longest axis */ - length?: Maybe; - /** The name of the starship */ - name: Scalars['String']['output']; -}; - -export type StarshipLengthArgs = { - unit?: InputMaybe; -}; +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; diff --git a/dev-test/star-wars/types.excludeQueryAlpha.ts b/dev-test/star-wars/types.excludeQueryAlpha.ts index 40703b13094..3dcdf61ba0f 100644 --- a/dev-test/star-wars/types.excludeQueryAlpha.ts +++ b/dev-test/star-wars/types.excludeQueryAlpha.ts @@ -1,245 +1,5 @@ -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A character from the Star Wars universe */ -export type Character = { - /** The movies this character appears in */ - appearsIn: Array>; - /** The friends of the character, or an empty list if they have none */ - friends?: Maybe>>; - /** The friends of the character exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** The ID of the character */ - id: Scalars['ID']['output']; - /** The name of the character */ - name: Scalars['String']['output']; -}; - -/** A character from the Star Wars universe */ -export type CharacterFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; -}; - -/** The input object sent when passing a color */ -export type ColorInput = { - blue: Scalars['Int']['input']; - green: Scalars['Int']['input']; - red: Scalars['Int']['input']; -}; - -/** An autonomous mechanical character in the Star Wars universe */ -export type Droid = Character & { - __typename?: 'Droid'; - /** The movies this droid appears in */ - appearsIn: Array>; - /** This droid's friends, or an empty list if they have none */ - friends?: Maybe>>; - /** The friends of the droid exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** The ID of the droid */ - id: Scalars['ID']['output']; - /** What others call this droid */ - name: Scalars['String']['output']; - /** This droid's primary function */ - primaryFunction?: Maybe; -}; - -/** An autonomous mechanical character in the Star Wars universe */ -export type DroidFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; -}; - -/** The episodes in the Star Wars trilogy */ -export enum Episode { - /** Star Wars Episode V: The Empire Strikes Back, released in 1980. */ - Empire = 'EMPIRE', - /** Star Wars Episode VI: Return of the Jedi, released in 1983. */ - Jedi = 'JEDI', - /** Star Wars Episode IV: A New Hope, released in 1977. */ - Newhope = 'NEWHOPE', -} - -/** A connection object for a character's friends */ -export type FriendsConnection = { - __typename?: 'FriendsConnection'; - /** The edges for each of the character's friends. */ - edges?: Maybe>>; - /** A list of the friends, as a convenience when edges are not needed. */ - friends?: Maybe>>; - /** Information for paginating this connection */ - pageInfo: PageInfo; - /** The total number of friends */ - totalCount?: Maybe; -}; - -/** An edge object for a character's friends */ -export type FriendsEdge = { - __typename?: 'FriendsEdge'; - /** A cursor used for pagination */ - cursor: Scalars['ID']['output']; - /** The character represented by this friendship edge */ - node?: Maybe; -}; - -/** A humanoid creature from the Star Wars universe */ -export type Human = Character & { - __typename?: 'Human'; - /** The movies this human appears in */ - appearsIn: Array>; - /** This human's friends, or an empty list if they have none */ - friends?: Maybe>>; - /** The friends of the human exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** Height in the preferred unit, default is meters */ - height?: Maybe; - /** The home planet of the human, or null if unknown */ - homePlanet?: Maybe; - /** The ID of the human */ - id: Scalars['ID']['output']; - /** Mass in kilograms, or null if unknown */ - mass?: Maybe; - /** What this human calls themselves */ - 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; -}; - -/** A humanoid creature from the Star Wars universe */ -export type HumanHeightArgs = { - unit?: InputMaybe; -}; - -/** Units of height */ -export enum LengthUnit { - /** Primarily used in the United States */ - Foot = 'FOOT', - /** The standard unit around the world */ - Meter = 'METER', -} - -/** The mutation type, represents all updates we can make to our data */ -export type Mutation = { - __typename?: 'Mutation'; - createReview?: Maybe; -}; - -/** The mutation type, represents all updates we can make to our data */ -export type MutationCreateReviewArgs = { - episode?: InputMaybe; - review: ReviewInput; -}; - -/** Information for paginating this connection */ -export type PageInfo = { - __typename?: 'PageInfo'; - endCursor?: Maybe; - hasNextPage: Scalars['Boolean']['output']; - startCursor?: Maybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type Query = { - __typename?: 'Query'; - character?: Maybe; - droid?: Maybe; - hero?: Maybe; - human?: Maybe; - reviews?: Maybe>>; - search?: Maybe>>; - starship?: Maybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryCharacterArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryDroidArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryHeroArgs = { - episode?: InputMaybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryHumanArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryReviewsArgs = { - episode: Episode; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QuerySearchArgs = { - text?: InputMaybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryStarshipArgs = { - id: Scalars['ID']['input']; -}; - -/** Represents a review for a movie */ -export type Review = { - __typename?: 'Review'; - /** Comment about the movie */ - commentary?: Maybe; - /** The number of stars this review gave, 1-5 */ - 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; - /** Favorite color, optional */ - favoriteColor?: InputMaybe; - /** 0-5 stars */ - stars: Scalars['Int']['input']; -}; - -export type SearchResult = Droid | Human | Starship; - -export type Starship = { - __typename?: 'Starship'; - /** The ID of the starship */ - id: Scalars['ID']['output']; - /** Length of the starship, along the longest axis */ - length?: Maybe; - /** The name of the starship */ - name: Scalars['String']['output']; -}; - -export type StarshipLengthArgs = { - unit?: InputMaybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type CreateReviewForEpisodeMutationVariables = Exact<{ episode: Episode; review: ReviewInput; diff --git a/dev-test/star-wars/types.excludeQueryBeta.ts b/dev-test/star-wars/types.excludeQueryBeta.ts index 5b38889e9ac..17d946340de 100644 --- a/dev-test/star-wars/types.excludeQueryBeta.ts +++ b/dev-test/star-wars/types.excludeQueryBeta.ts @@ -1,245 +1,5 @@ -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A character from the Star Wars universe */ -export type Character = { - /** The movies this character appears in */ - appearsIn: Array>; - /** The friends of the character, or an empty list if they have none */ - friends?: Maybe>>; - /** The friends of the character exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** The ID of the character */ - id: Scalars['ID']['output']; - /** The name of the character */ - name: Scalars['String']['output']; -}; - -/** A character from the Star Wars universe */ -export type CharacterFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; -}; - -/** The input object sent when passing a color */ -export type ColorInput = { - blue: Scalars['Int']['input']; - green: Scalars['Int']['input']; - red: Scalars['Int']['input']; -}; - -/** An autonomous mechanical character in the Star Wars universe */ -export type Droid = Character & { - __typename?: 'Droid'; - /** The movies this droid appears in */ - appearsIn: Array>; - /** This droid's friends, or an empty list if they have none */ - friends?: Maybe>>; - /** The friends of the droid exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** The ID of the droid */ - id: Scalars['ID']['output']; - /** What others call this droid */ - name: Scalars['String']['output']; - /** This droid's primary function */ - primaryFunction?: Maybe; -}; - -/** An autonomous mechanical character in the Star Wars universe */ -export type DroidFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; -}; - -/** The episodes in the Star Wars trilogy */ -export enum Episode { - /** Star Wars Episode V: The Empire Strikes Back, released in 1980. */ - Empire = 'EMPIRE', - /** Star Wars Episode VI: Return of the Jedi, released in 1983. */ - Jedi = 'JEDI', - /** Star Wars Episode IV: A New Hope, released in 1977. */ - Newhope = 'NEWHOPE', -} - -/** A connection object for a character's friends */ -export type FriendsConnection = { - __typename?: 'FriendsConnection'; - /** The edges for each of the character's friends. */ - edges?: Maybe>>; - /** A list of the friends, as a convenience when edges are not needed. */ - friends?: Maybe>>; - /** Information for paginating this connection */ - pageInfo: PageInfo; - /** The total number of friends */ - totalCount?: Maybe; -}; - -/** An edge object for a character's friends */ -export type FriendsEdge = { - __typename?: 'FriendsEdge'; - /** A cursor used for pagination */ - cursor: Scalars['ID']['output']; - /** The character represented by this friendship edge */ - node?: Maybe; -}; - -/** A humanoid creature from the Star Wars universe */ -export type Human = Character & { - __typename?: 'Human'; - /** The movies this human appears in */ - appearsIn: Array>; - /** This human's friends, or an empty list if they have none */ - friends?: Maybe>>; - /** The friends of the human exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** Height in the preferred unit, default is meters */ - height?: Maybe; - /** The home planet of the human, or null if unknown */ - homePlanet?: Maybe; - /** The ID of the human */ - id: Scalars['ID']['output']; - /** Mass in kilograms, or null if unknown */ - mass?: Maybe; - /** What this human calls themselves */ - 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; -}; - -/** A humanoid creature from the Star Wars universe */ -export type HumanHeightArgs = { - unit?: InputMaybe; -}; - -/** Units of height */ -export enum LengthUnit { - /** Primarily used in the United States */ - Foot = 'FOOT', - /** The standard unit around the world */ - Meter = 'METER', -} - -/** The mutation type, represents all updates we can make to our data */ -export type Mutation = { - __typename?: 'Mutation'; - createReview?: Maybe; -}; - -/** The mutation type, represents all updates we can make to our data */ -export type MutationCreateReviewArgs = { - episode?: InputMaybe; - review: ReviewInput; -}; - -/** Information for paginating this connection */ -export type PageInfo = { - __typename?: 'PageInfo'; - endCursor?: Maybe; - hasNextPage: Scalars['Boolean']['output']; - startCursor?: Maybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type Query = { - __typename?: 'Query'; - character?: Maybe; - droid?: Maybe; - hero?: Maybe; - human?: Maybe; - reviews?: Maybe>>; - search?: Maybe>>; - starship?: Maybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryCharacterArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryDroidArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryHeroArgs = { - episode?: InputMaybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryHumanArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryReviewsArgs = { - episode: Episode; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QuerySearchArgs = { - text?: InputMaybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryStarshipArgs = { - id: Scalars['ID']['input']; -}; - -/** Represents a review for a movie */ -export type Review = { - __typename?: 'Review'; - /** Comment about the movie */ - commentary?: Maybe; - /** The number of stars this review gave, 1-5 */ - 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; - /** Favorite color, optional */ - favoriteColor?: InputMaybe; - /** 0-5 stars */ - stars: Scalars['Int']['input']; -}; - -export type SearchResult = Droid | Human | Starship; - -export type Starship = { - __typename?: 'Starship'; - /** The ID of the starship */ - id: Scalars['ID']['output']; - /** Length of the starship, along the longest axis */ - length?: Maybe; - /** The name of the starship */ - name: Scalars['String']['output']; -}; - -export type StarshipLengthArgs = { - unit?: InputMaybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type CreateReviewForEpisodeMutationVariables = Exact<{ episode: Episode; review: ReviewInput; diff --git a/dev-test/star-wars/types.globallyAvailable.d.ts b/dev-test/star-wars/types.globallyAvailable.d.ts index 2efbb00482e..4fff8bbe8b4 100644 --- a/dev-test/star-wars/types.globallyAvailable.d.ts +++ b/dev-test/star-wars/types.globallyAvailable.d.ts @@ -1,243 +1,5 @@ -type Maybe = T | null; -type InputMaybe = Maybe; -type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -type MakeEmpty = { [_ in K]?: never }; -type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A character from the Star Wars universe */ -type Character = { - /** The movies this character appears in */ - appearsIn: Array>; - /** The friends of the character, or an empty list if they have none */ - friends?: Maybe>>; - /** The friends of the character exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** The ID of the character */ - id: Scalars['ID']['output']; - /** The name of the character */ - name: Scalars['String']['output']; -}; - -/** A character from the Star Wars universe */ -type CharacterFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; -}; - -/** The input object sent when passing a color */ -type ColorInput = { - blue: Scalars['Int']['input']; - green: Scalars['Int']['input']; - red: Scalars['Int']['input']; -}; - -/** An autonomous mechanical character in the Star Wars universe */ -type Droid = Character & { - __typename?: 'Droid'; - /** The movies this droid appears in */ - appearsIn: Array>; - /** This droid's friends, or an empty list if they have none */ - friends?: Maybe>>; - /** The friends of the droid exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** The ID of the droid */ - id: Scalars['ID']['output']; - /** What others call this droid */ - name: Scalars['String']['output']; - /** This droid's primary function */ - primaryFunction?: Maybe; -}; - -/** An autonomous mechanical character in the Star Wars universe */ -type DroidFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; -}; - -/** The episodes in the Star Wars trilogy */ -type Episode = - /** Star Wars Episode V: The Empire Strikes Back, released in 1980. */ - | 'EMPIRE' - /** Star Wars Episode VI: Return of the Jedi, released in 1983. */ - | 'JEDI' - /** Star Wars Episode IV: A New Hope, released in 1977. */ - | 'NEWHOPE'; - -/** A connection object for a character's friends */ -type FriendsConnection = { - __typename?: 'FriendsConnection'; - /** The edges for each of the character's friends. */ - edges?: Maybe>>; - /** A list of the friends, as a convenience when edges are not needed. */ - friends?: Maybe>>; - /** Information for paginating this connection */ - pageInfo: PageInfo; - /** The total number of friends */ - totalCount?: Maybe; -}; - -/** An edge object for a character's friends */ -type FriendsEdge = { - __typename?: 'FriendsEdge'; - /** A cursor used for pagination */ - cursor: Scalars['ID']['output']; - /** The character represented by this friendship edge */ - node?: Maybe; -}; - -/** A humanoid creature from the Star Wars universe */ -type Human = Character & { - __typename?: 'Human'; - /** The movies this human appears in */ - appearsIn: Array>; - /** This human's friends, or an empty list if they have none */ - friends?: Maybe>>; - /** The friends of the human exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** Height in the preferred unit, default is meters */ - height?: Maybe; - /** The home planet of the human, or null if unknown */ - homePlanet?: Maybe; - /** The ID of the human */ - id: Scalars['ID']['output']; - /** Mass in kilograms, or null if unknown */ - mass?: Maybe; - /** What this human calls themselves */ - 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; -}; - -/** A humanoid creature from the Star Wars universe */ -type HumanHeightArgs = { - unit?: InputMaybe; -}; - -/** Units of height */ -type LengthUnit = - /** Primarily used in the United States */ - | 'FOOT' - /** The standard unit around the world */ - | 'METER'; - -/** The mutation type, represents all updates we can make to our data */ -type Mutation = { - __typename?: 'Mutation'; - createReview?: Maybe; -}; - -/** The mutation type, represents all updates we can make to our data */ -type MutationCreateReviewArgs = { - episode?: InputMaybe; - review: ReviewInput; -}; - -/** Information for paginating this connection */ -type PageInfo = { - __typename?: 'PageInfo'; - endCursor?: Maybe; - hasNextPage: Scalars['Boolean']['output']; - startCursor?: Maybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -type Query = { - __typename?: 'Query'; - character?: Maybe; - droid?: Maybe; - hero?: Maybe; - human?: Maybe; - reviews?: Maybe>>; - search?: Maybe>>; - starship?: Maybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -type QueryCharacterArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -type QueryDroidArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -type QueryHeroArgs = { - episode?: InputMaybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -type QueryHumanArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -type QueryReviewsArgs = { - episode: Episode; -}; - -/** The query type, represents all of the entry points into our object graph */ -type QuerySearchArgs = { - text?: InputMaybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -type QueryStarshipArgs = { - id: Scalars['ID']['input']; -}; - -/** Represents a review for a movie */ -type Review = { - __typename?: 'Review'; - /** Comment about the movie */ - commentary?: Maybe; - /** The number of stars this review gave, 1-5 */ - stars: Scalars['Int']['output']; -}; - -/** The input object sent when someone is creating a new review */ -type ReviewInput = { - /** Comment about the movie, optional */ - commentary?: InputMaybe; - /** Favorite color, optional */ - favoriteColor?: InputMaybe; - /** 0-5 stars */ - stars: Scalars['Int']['input']; -}; - -type SearchResult = Droid | Human | Starship; - -type Starship = { - __typename?: 'Starship'; - /** The ID of the starship */ - id: Scalars['ID']['output']; - /** Length of the starship, along the longest axis */ - length?: Maybe; - /** The name of the starship */ - name: Scalars['String']['output']; -}; - -type StarshipLengthArgs = { - unit?: InputMaybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type CreateReviewForEpisodeMutationVariables = Exact<{ episode: Episode; review: ReviewInput; diff --git a/dev-test/star-wars/types.immutableTypes.ts b/dev-test/star-wars/types.immutableTypes.ts index 5849e8f6d04..1f5936f09e3 100644 --- a/dev-test/star-wars/types.immutableTypes.ts +++ b/dev-test/star-wars/types.immutableTypes.ts @@ -1,245 +1,5 @@ -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A character from the Star Wars universe */ -export type Character = { - /** The movies this character appears in */ - readonly appearsIn: ReadonlyArray>; - /** The friends of the character, or an empty list if they have none */ - readonly friends?: Maybe>>; - /** The friends of the character exposed as a connection with edges */ - readonly friendsConnection: FriendsConnection; - /** The ID of the character */ - readonly id: Scalars['ID']['output']; - /** The name of the character */ - readonly name: Scalars['String']['output']; -}; - -/** A character from the Star Wars universe */ -export type CharacterFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; -}; - -/** The input object sent when passing a color */ -export type ColorInput = { - readonly blue: Scalars['Int']['input']; - readonly green: Scalars['Int']['input']; - readonly red: Scalars['Int']['input']; -}; - -/** An autonomous mechanical character in the Star Wars universe */ -export type Droid = Character & { - readonly __typename?: 'Droid'; - /** The movies this droid appears in */ - readonly appearsIn: ReadonlyArray>; - /** This droid's friends, or an empty list if they have none */ - readonly friends?: Maybe>>; - /** The friends of the droid exposed as a connection with edges */ - readonly friendsConnection: FriendsConnection; - /** The ID of the droid */ - readonly id: Scalars['ID']['output']; - /** What others call this droid */ - readonly name: Scalars['String']['output']; - /** This droid's primary function */ - readonly primaryFunction?: Maybe; -}; - -/** An autonomous mechanical character in the Star Wars universe */ -export type DroidFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; -}; - -/** The episodes in the Star Wars trilogy */ -export enum Episode { - /** Star Wars Episode V: The Empire Strikes Back, released in 1980. */ - Empire = 'EMPIRE', - /** Star Wars Episode VI: Return of the Jedi, released in 1983. */ - Jedi = 'JEDI', - /** Star Wars Episode IV: A New Hope, released in 1977. */ - Newhope = 'NEWHOPE', -} - -/** A connection object for a character's friends */ -export type FriendsConnection = { - readonly __typename?: 'FriendsConnection'; - /** The edges for each of the character's friends. */ - readonly edges?: Maybe>>; - /** A list of the friends, as a convenience when edges are not needed. */ - readonly friends?: Maybe>>; - /** Information for paginating this connection */ - readonly pageInfo: PageInfo; - /** The total number of friends */ - 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']['output']; - /** The character represented by this friendship edge */ - readonly node?: Maybe; -}; - -/** A humanoid creature from the Star Wars universe */ -export type Human = Character & { - readonly __typename?: 'Human'; - /** The movies this human appears in */ - readonly appearsIn: ReadonlyArray>; - /** This human's friends, or an empty list if they have none */ - readonly friends?: Maybe>>; - /** 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; - /** The home planet of the human, or null if unknown */ - readonly homePlanet?: Maybe; - /** The ID of the human */ - readonly id: Scalars['ID']['output']; - /** Mass in kilograms, or null if unknown */ - readonly mass?: Maybe; - /** What this human calls themselves */ - 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; -}; - -/** A humanoid creature from the Star Wars universe */ -export type HumanHeightArgs = { - unit?: InputMaybe; -}; - -/** Units of height */ -export enum LengthUnit { - /** Primarily used in the United States */ - Foot = 'FOOT', - /** The standard unit around the world */ - Meter = 'METER', -} - -/** The mutation type, represents all updates we can make to our data */ -export type Mutation = { - readonly __typename?: 'Mutation'; - readonly createReview?: Maybe; -}; - -/** The mutation type, represents all updates we can make to our data */ -export type MutationCreateReviewArgs = { - episode?: InputMaybe; - review: ReviewInput; -}; - -/** Information for paginating this connection */ -export type PageInfo = { - readonly __typename?: 'PageInfo'; - readonly endCursor?: Maybe; - readonly hasNextPage: Scalars['Boolean']['output']; - readonly startCursor?: Maybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type Query = { - readonly __typename?: 'Query'; - readonly character?: Maybe; - readonly droid?: Maybe; - readonly hero?: Maybe; - readonly human?: Maybe; - readonly reviews?: Maybe>>; - readonly search?: Maybe>>; - readonly starship?: Maybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryCharacterArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryDroidArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryHeroArgs = { - episode?: InputMaybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryHumanArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryReviewsArgs = { - episode: Episode; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QuerySearchArgs = { - text?: InputMaybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryStarshipArgs = { - id: Scalars['ID']['input']; -}; - -/** Represents a review for a movie */ -export type Review = { - readonly __typename?: 'Review'; - /** Comment about the movie */ - readonly commentary?: Maybe; - /** The number of stars this review gave, 1-5 */ - 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; - /** Favorite color, optional */ - readonly favoriteColor?: InputMaybe; - /** 0-5 stars */ - readonly stars: Scalars['Int']['input']; -}; - -export type SearchResult = Droid | Human | Starship; - -export type Starship = { - readonly __typename?: 'Starship'; - /** The ID of the starship */ - readonly id: Scalars['ID']['output']; - /** Length of the starship, along the longest axis */ - readonly length?: Maybe; - /** The name of the starship */ - readonly name: Scalars['String']['output']; -}; - -export type StarshipLengthArgs = { - unit?: InputMaybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type CreateReviewForEpisodeMutationVariables = Exact<{ episode: Episode; review: ReviewInput; diff --git a/dev-test/star-wars/types.preResolveTypes.onlyOperationTypes.ts b/dev-test/star-wars/types.preResolveTypes.onlyOperationTypes.ts index d5430785c67..dabd899e390 100644 --- a/dev-test/star-wars/types.preResolveTypes.onlyOperationTypes.ts +++ b/dev-test/star-wars/types.preResolveTypes.onlyOperationTypes.ts @@ -1,54 +1,5 @@ -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** The input object sent when passing a color */ -export type ColorInput = { - blue: Scalars['Int']['input']; - green: Scalars['Int']['input']; - red: Scalars['Int']['input']; -}; - -/** The episodes in the Star Wars trilogy */ -export enum Episode { - /** Star Wars Episode V: The Empire Strikes Back, released in 1980. */ - Empire = 'EMPIRE', - /** Star Wars Episode VI: Return of the Jedi, released in 1983. */ - Jedi = 'JEDI', - /** Star Wars Episode IV: A New Hope, released in 1977. */ - Newhope = 'NEWHOPE', -} - -/** Units of height */ -export enum LengthUnit { - /** Primarily used in the United States */ - Foot = 'FOOT', - /** The standard unit around the world */ - Meter = 'METER', -} - -/** The input object sent when someone is creating a new review */ -export type ReviewInput = { - /** Comment about the movie, optional */ - commentary?: InputMaybe; - /** Favorite color, optional */ - favoriteColor?: InputMaybe; - /** 0-5 stars */ - stars: Scalars['Int']['input']; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type CreateReviewForEpisodeMutationVariables = Exact<{ episode: Episode; review: ReviewInput; diff --git a/dev-test/star-wars/types.preResolveTypes.ts b/dev-test/star-wars/types.preResolveTypes.ts index 5e82a72b7e0..dabd899e390 100644 --- a/dev-test/star-wars/types.preResolveTypes.ts +++ b/dev-test/star-wars/types.preResolveTypes.ts @@ -1,245 +1,5 @@ -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A character from the Star Wars universe */ -export type Character = { - /** The movies this character appears in */ - appearsIn: Array>; - /** The friends of the character, or an empty list if they have none */ - friends?: Maybe>>; - /** The friends of the character exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** The ID of the character */ - id: Scalars['ID']['output']; - /** The name of the character */ - name: Scalars['String']['output']; -}; - -/** A character from the Star Wars universe */ -export type CharacterFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; -}; - -/** The input object sent when passing a color */ -export type ColorInput = { - blue: Scalars['Int']['input']; - green: Scalars['Int']['input']; - red: Scalars['Int']['input']; -}; - -/** An autonomous mechanical character in the Star Wars universe */ -export type Droid = Character & { - __typename?: 'Droid'; - /** The movies this droid appears in */ - appearsIn: Array>; - /** This droid's friends, or an empty list if they have none */ - friends?: Maybe>>; - /** The friends of the droid exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** The ID of the droid */ - id: Scalars['ID']['output']; - /** What others call this droid */ - name: Scalars['String']['output']; - /** This droid's primary function */ - primaryFunction?: Maybe; -}; - -/** An autonomous mechanical character in the Star Wars universe */ -export type DroidFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; -}; - -/** The episodes in the Star Wars trilogy */ -export enum Episode { - /** Star Wars Episode V: The Empire Strikes Back, released in 1980. */ - Empire = 'EMPIRE', - /** Star Wars Episode VI: Return of the Jedi, released in 1983. */ - Jedi = 'JEDI', - /** Star Wars Episode IV: A New Hope, released in 1977. */ - Newhope = 'NEWHOPE', -} - -/** A connection object for a character's friends */ -export type FriendsConnection = { - __typename?: 'FriendsConnection'; - /** The edges for each of the character's friends. */ - edges?: Maybe>>; - /** A list of the friends, as a convenience when edges are not needed. */ - friends?: Maybe>>; - /** Information for paginating this connection */ - pageInfo: PageInfo; - /** The total number of friends */ - totalCount?: Maybe; -}; - -/** An edge object for a character's friends */ -export type FriendsEdge = { - __typename?: 'FriendsEdge'; - /** A cursor used for pagination */ - cursor: Scalars['ID']['output']; - /** The character represented by this friendship edge */ - node?: Maybe; -}; - -/** A humanoid creature from the Star Wars universe */ -export type Human = Character & { - __typename?: 'Human'; - /** The movies this human appears in */ - appearsIn: Array>; - /** This human's friends, or an empty list if they have none */ - friends?: Maybe>>; - /** The friends of the human exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** Height in the preferred unit, default is meters */ - height?: Maybe; - /** The home planet of the human, or null if unknown */ - homePlanet?: Maybe; - /** The ID of the human */ - id: Scalars['ID']['output']; - /** Mass in kilograms, or null if unknown */ - mass?: Maybe; - /** What this human calls themselves */ - 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; -}; - -/** A humanoid creature from the Star Wars universe */ -export type HumanHeightArgs = { - unit?: InputMaybe; -}; - -/** Units of height */ -export enum LengthUnit { - /** Primarily used in the United States */ - Foot = 'FOOT', - /** The standard unit around the world */ - Meter = 'METER', -} - -/** The mutation type, represents all updates we can make to our data */ -export type Mutation = { - __typename?: 'Mutation'; - createReview?: Maybe; -}; - -/** The mutation type, represents all updates we can make to our data */ -export type MutationCreateReviewArgs = { - episode?: InputMaybe; - review: ReviewInput; -}; - -/** Information for paginating this connection */ -export type PageInfo = { - __typename?: 'PageInfo'; - endCursor?: Maybe; - hasNextPage: Scalars['Boolean']['output']; - startCursor?: Maybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type Query = { - __typename?: 'Query'; - character?: Maybe; - droid?: Maybe; - hero?: Maybe; - human?: Maybe; - reviews?: Maybe>>; - search?: Maybe>>; - starship?: Maybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryCharacterArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryDroidArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryHeroArgs = { - episode?: InputMaybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryHumanArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryReviewsArgs = { - episode: Episode; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QuerySearchArgs = { - text?: InputMaybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryStarshipArgs = { - id: Scalars['ID']['input']; -}; - -/** Represents a review for a movie */ -export type Review = { - __typename?: 'Review'; - /** Comment about the movie */ - commentary?: Maybe; - /** The number of stars this review gave, 1-5 */ - 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; - /** Favorite color, optional */ - favoriteColor?: InputMaybe; - /** 0-5 stars */ - stars: Scalars['Int']['input']; -}; - -export type SearchResult = Droid | Human | Starship; - -export type Starship = { - __typename?: 'Starship'; - /** The ID of the starship */ - id: Scalars['ID']['output']; - /** Length of the starship, along the longest axis */ - length?: Maybe; - /** The name of the starship */ - name: Scalars['String']['output']; -}; - -export type StarshipLengthArgs = { - unit?: InputMaybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type CreateReviewForEpisodeMutationVariables = Exact<{ episode: Episode; review: ReviewInput; diff --git a/dev-test/star-wars/types.skipSchema.ts b/dev-test/star-wars/types.skipSchema.ts index 5e82a72b7e0..dabd899e390 100644 --- a/dev-test/star-wars/types.skipSchema.ts +++ b/dev-test/star-wars/types.skipSchema.ts @@ -1,245 +1,5 @@ -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A character from the Star Wars universe */ -export type Character = { - /** The movies this character appears in */ - appearsIn: Array>; - /** The friends of the character, or an empty list if they have none */ - friends?: Maybe>>; - /** The friends of the character exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** The ID of the character */ - id: Scalars['ID']['output']; - /** The name of the character */ - name: Scalars['String']['output']; -}; - -/** A character from the Star Wars universe */ -export type CharacterFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; -}; - -/** The input object sent when passing a color */ -export type ColorInput = { - blue: Scalars['Int']['input']; - green: Scalars['Int']['input']; - red: Scalars['Int']['input']; -}; - -/** An autonomous mechanical character in the Star Wars universe */ -export type Droid = Character & { - __typename?: 'Droid'; - /** The movies this droid appears in */ - appearsIn: Array>; - /** This droid's friends, or an empty list if they have none */ - friends?: Maybe>>; - /** The friends of the droid exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** The ID of the droid */ - id: Scalars['ID']['output']; - /** What others call this droid */ - name: Scalars['String']['output']; - /** This droid's primary function */ - primaryFunction?: Maybe; -}; - -/** An autonomous mechanical character in the Star Wars universe */ -export type DroidFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; -}; - -/** The episodes in the Star Wars trilogy */ -export enum Episode { - /** Star Wars Episode V: The Empire Strikes Back, released in 1980. */ - Empire = 'EMPIRE', - /** Star Wars Episode VI: Return of the Jedi, released in 1983. */ - Jedi = 'JEDI', - /** Star Wars Episode IV: A New Hope, released in 1977. */ - Newhope = 'NEWHOPE', -} - -/** A connection object for a character's friends */ -export type FriendsConnection = { - __typename?: 'FriendsConnection'; - /** The edges for each of the character's friends. */ - edges?: Maybe>>; - /** A list of the friends, as a convenience when edges are not needed. */ - friends?: Maybe>>; - /** Information for paginating this connection */ - pageInfo: PageInfo; - /** The total number of friends */ - totalCount?: Maybe; -}; - -/** An edge object for a character's friends */ -export type FriendsEdge = { - __typename?: 'FriendsEdge'; - /** A cursor used for pagination */ - cursor: Scalars['ID']['output']; - /** The character represented by this friendship edge */ - node?: Maybe; -}; - -/** A humanoid creature from the Star Wars universe */ -export type Human = Character & { - __typename?: 'Human'; - /** The movies this human appears in */ - appearsIn: Array>; - /** This human's friends, or an empty list if they have none */ - friends?: Maybe>>; - /** The friends of the human exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** Height in the preferred unit, default is meters */ - height?: Maybe; - /** The home planet of the human, or null if unknown */ - homePlanet?: Maybe; - /** The ID of the human */ - id: Scalars['ID']['output']; - /** Mass in kilograms, or null if unknown */ - mass?: Maybe; - /** What this human calls themselves */ - 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; -}; - -/** A humanoid creature from the Star Wars universe */ -export type HumanHeightArgs = { - unit?: InputMaybe; -}; - -/** Units of height */ -export enum LengthUnit { - /** Primarily used in the United States */ - Foot = 'FOOT', - /** The standard unit around the world */ - Meter = 'METER', -} - -/** The mutation type, represents all updates we can make to our data */ -export type Mutation = { - __typename?: 'Mutation'; - createReview?: Maybe; -}; - -/** The mutation type, represents all updates we can make to our data */ -export type MutationCreateReviewArgs = { - episode?: InputMaybe; - review: ReviewInput; -}; - -/** Information for paginating this connection */ -export type PageInfo = { - __typename?: 'PageInfo'; - endCursor?: Maybe; - hasNextPage: Scalars['Boolean']['output']; - startCursor?: Maybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type Query = { - __typename?: 'Query'; - character?: Maybe; - droid?: Maybe; - hero?: Maybe; - human?: Maybe; - reviews?: Maybe>>; - search?: Maybe>>; - starship?: Maybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryCharacterArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryDroidArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryHeroArgs = { - episode?: InputMaybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryHumanArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryReviewsArgs = { - episode: Episode; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QuerySearchArgs = { - text?: InputMaybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryStarshipArgs = { - id: Scalars['ID']['input']; -}; - -/** Represents a review for a movie */ -export type Review = { - __typename?: 'Review'; - /** Comment about the movie */ - commentary?: Maybe; - /** The number of stars this review gave, 1-5 */ - 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; - /** Favorite color, optional */ - favoriteColor?: InputMaybe; - /** 0-5 stars */ - stars: Scalars['Int']['input']; -}; - -export type SearchResult = Droid | Human | Starship; - -export type Starship = { - __typename?: 'Starship'; - /** The ID of the starship */ - id: Scalars['ID']['output']; - /** Length of the starship, along the longest axis */ - length?: Maybe; - /** The name of the starship */ - name: Scalars['String']['output']; -}; - -export type StarshipLengthArgs = { - unit?: InputMaybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type CreateReviewForEpisodeMutationVariables = Exact<{ episode: Episode; review: ReviewInput; diff --git a/dev-test/star-wars/types.ts b/dev-test/star-wars/types.ts index 5e82a72b7e0..dabd899e390 100644 --- a/dev-test/star-wars/types.ts +++ b/dev-test/star-wars/types.ts @@ -1,245 +1,5 @@ -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A character from the Star Wars universe */ -export type Character = { - /** The movies this character appears in */ - appearsIn: Array>; - /** The friends of the character, or an empty list if they have none */ - friends?: Maybe>>; - /** The friends of the character exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** The ID of the character */ - id: Scalars['ID']['output']; - /** The name of the character */ - name: Scalars['String']['output']; -}; - -/** A character from the Star Wars universe */ -export type CharacterFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; -}; - -/** The input object sent when passing a color */ -export type ColorInput = { - blue: Scalars['Int']['input']; - green: Scalars['Int']['input']; - red: Scalars['Int']['input']; -}; - -/** An autonomous mechanical character in the Star Wars universe */ -export type Droid = Character & { - __typename?: 'Droid'; - /** The movies this droid appears in */ - appearsIn: Array>; - /** This droid's friends, or an empty list if they have none */ - friends?: Maybe>>; - /** The friends of the droid exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** The ID of the droid */ - id: Scalars['ID']['output']; - /** What others call this droid */ - name: Scalars['String']['output']; - /** This droid's primary function */ - primaryFunction?: Maybe; -}; - -/** An autonomous mechanical character in the Star Wars universe */ -export type DroidFriendsConnectionArgs = { - after?: InputMaybe; - first?: InputMaybe; -}; - -/** The episodes in the Star Wars trilogy */ -export enum Episode { - /** Star Wars Episode V: The Empire Strikes Back, released in 1980. */ - Empire = 'EMPIRE', - /** Star Wars Episode VI: Return of the Jedi, released in 1983. */ - Jedi = 'JEDI', - /** Star Wars Episode IV: A New Hope, released in 1977. */ - Newhope = 'NEWHOPE', -} - -/** A connection object for a character's friends */ -export type FriendsConnection = { - __typename?: 'FriendsConnection'; - /** The edges for each of the character's friends. */ - edges?: Maybe>>; - /** A list of the friends, as a convenience when edges are not needed. */ - friends?: Maybe>>; - /** Information for paginating this connection */ - pageInfo: PageInfo; - /** The total number of friends */ - totalCount?: Maybe; -}; - -/** An edge object for a character's friends */ -export type FriendsEdge = { - __typename?: 'FriendsEdge'; - /** A cursor used for pagination */ - cursor: Scalars['ID']['output']; - /** The character represented by this friendship edge */ - node?: Maybe; -}; - -/** A humanoid creature from the Star Wars universe */ -export type Human = Character & { - __typename?: 'Human'; - /** The movies this human appears in */ - appearsIn: Array>; - /** This human's friends, or an empty list if they have none */ - friends?: Maybe>>; - /** The friends of the human exposed as a connection with edges */ - friendsConnection: FriendsConnection; - /** Height in the preferred unit, default is meters */ - height?: Maybe; - /** The home planet of the human, or null if unknown */ - homePlanet?: Maybe; - /** The ID of the human */ - id: Scalars['ID']['output']; - /** Mass in kilograms, or null if unknown */ - mass?: Maybe; - /** What this human calls themselves */ - 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; -}; - -/** A humanoid creature from the Star Wars universe */ -export type HumanHeightArgs = { - unit?: InputMaybe; -}; - -/** Units of height */ -export enum LengthUnit { - /** Primarily used in the United States */ - Foot = 'FOOT', - /** The standard unit around the world */ - Meter = 'METER', -} - -/** The mutation type, represents all updates we can make to our data */ -export type Mutation = { - __typename?: 'Mutation'; - createReview?: Maybe; -}; - -/** The mutation type, represents all updates we can make to our data */ -export type MutationCreateReviewArgs = { - episode?: InputMaybe; - review: ReviewInput; -}; - -/** Information for paginating this connection */ -export type PageInfo = { - __typename?: 'PageInfo'; - endCursor?: Maybe; - hasNextPage: Scalars['Boolean']['output']; - startCursor?: Maybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type Query = { - __typename?: 'Query'; - character?: Maybe; - droid?: Maybe; - hero?: Maybe; - human?: Maybe; - reviews?: Maybe>>; - search?: Maybe>>; - starship?: Maybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryCharacterArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryDroidArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryHeroArgs = { - episode?: InputMaybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryHumanArgs = { - id: Scalars['ID']['input']; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryReviewsArgs = { - episode: Episode; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QuerySearchArgs = { - text?: InputMaybe; -}; - -/** The query type, represents all of the entry points into our object graph */ -export type QueryStarshipArgs = { - id: Scalars['ID']['input']; -}; - -/** Represents a review for a movie */ -export type Review = { - __typename?: 'Review'; - /** Comment about the movie */ - commentary?: Maybe; - /** The number of stars this review gave, 1-5 */ - 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; - /** Favorite color, optional */ - favoriteColor?: InputMaybe; - /** 0-5 stars */ - stars: Scalars['Int']['input']; -}; - -export type SearchResult = Droid | Human | Starship; - -export type Starship = { - __typename?: 'Starship'; - /** The ID of the starship */ - id: Scalars['ID']['output']; - /** Length of the starship, along the longest axis */ - length?: Maybe; - /** The name of the starship */ - name: Scalars['String']['output']; -}; - -export type StarshipLengthArgs = { - unit?: InputMaybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type CreateReviewForEpisodeMutationVariables = Exact<{ episode: Episode; review: ReviewInput; diff --git a/dev-test/test-null-value/result.d.ts b/dev-test/test-null-value/result.d.ts index c6c21c21026..71f68e1f690 100644 --- a/dev-test/test-null-value/result.d.ts +++ b/dev-test/test-null-value/result.d.ts @@ -1,48 +1,5 @@ -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -export type BaseCartLine = { - id: Scalars['String']['output']; - quantity: Scalars['Int']['output']; -}; - -export type BaseCartLineConnection = { - id: Scalars['String']['output']; - nodes: Array; -}; - -export type Cart = { - id: Scalars['String']['output']; - lines: BaseCartLineConnection; -}; - -export type CartLine = BaseCartLine & { - id: Scalars['String']['output']; - quantity: Scalars['Int']['output']; -}; - -export type ComponentizableCartLine = BaseCartLine & { - id: Scalars['String']['output']; - quantity: Scalars['Int']['output']; -}; - -export type QueryRoot = { - cart?: Maybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type CartLineFragment = { id: string; quantity: number }; export type TestQueryVariables = Exact<{ [key: string]: never }>; diff --git a/dev-test/test-schema/types.preResolveTypes.onlyOperationTypes.ts b/dev-test/test-schema/types.preResolveTypes.onlyOperationTypes.ts index 38df285bc21..35ecb4a9c22 100644 --- a/dev-test/test-schema/types.preResolveTypes.onlyOperationTypes.ts +++ b/dev-test/test-schema/types.preResolveTypes.onlyOperationTypes.ts @@ -1,19 +1,5 @@ -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type TestQueryVariables = Exact<{ [key: string]: never }>; export type TestQuery = { diff --git a/dev-test/test-schema/types.preResolveTypes.ts b/dev-test/test-schema/types.preResolveTypes.ts index 27040b086c1..35ecb4a9c22 100644 --- a/dev-test/test-schema/types.preResolveTypes.ts +++ b/dev-test/test-schema/types.preResolveTypes.ts @@ -1,44 +1,5 @@ -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -export type Query = { - __typename?: 'Query'; - allUsers: Array>; - /** - * Generates a new answer for th - * guessing game - */ - answer: Array; - testArr1?: Maybe>>; - testArr2: Array>; - testArr3: Array; - userById?: Maybe; -}; - -export type QueryUserByIdArgs = { - id: Scalars['Int']['input']; -}; - -export type User = { - __typename?: 'User'; - email: Scalars['String']['output']; - id: Scalars['Int']['output']; - name: Scalars['String']['output']; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type TestQueryVariables = Exact<{ [key: string]: never }>; export type TestQuery = { diff --git a/dev-test/test-schema/typings.wrapped.ts b/dev-test/test-schema/typings.wrapped.ts index 48b6983b149..e23c85df7ec 100644 --- a/dev-test/test-schema/typings.wrapped.ts +++ b/dev-test/test-schema/typings.wrapped.ts @@ -5,7 +5,6 @@ declare namespace GraphQL { export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; export type MakeEmpty = { [_ in K]?: never }; export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; - type Exact = { [K in keyof T]: T[K] }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID: { input: string; output: string }; diff --git a/examples/persisted-documents-string-mode/src/gql/graphql.ts b/examples/persisted-documents-string-mode/src/gql/graphql.ts index 966f9350b6b..4d972f3ebe6 100644 --- a/examples/persisted-documents-string-mode/src/gql/graphql.ts +++ b/examples/persisted-documents-string-mode/src/gql/graphql.ts @@ -1,35 +1,7 @@ /* eslint-disable */ import { DocumentTypeDecoration } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = T | null | undefined; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -export type Mutation = { - __typename?: 'Mutation'; - echo: Scalars['String']['output']; -}; - -export type MutationEchoArgs = { - message: Scalars['String']['input']; -}; - -export type Query = { - __typename?: 'Query'; - hello: Scalars['String']['output']; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type HelloQueryQueryVariables = Exact<{ [key: string]: never }>; export type HelloQueryQuery = { __typename?: 'Query'; hello: string }; diff --git a/examples/persisted-documents/src/gql/graphql.ts b/examples/persisted-documents/src/gql/graphql.ts index 45aaf40c79a..08267b40ce5 100644 --- a/examples/persisted-documents/src/gql/graphql.ts +++ b/examples/persisted-documents/src/gql/graphql.ts @@ -1,35 +1,7 @@ /* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = T | null | undefined; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -export type Mutation = { - __typename?: 'Mutation'; - echo: Scalars['String']['output']; -}; - -export type MutationEchoArgs = { - message: Scalars['String']['input']; -}; - -export type Query = { - __typename?: 'Query'; - hello: Scalars['String']['output']; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type HelloQueryQueryVariables = Exact<{ [key: string]: never }>; export type HelloQueryQuery = { __typename?: 'Query'; hello: string }; diff --git a/examples/react/apollo-client-defer/src/gql/graphql.ts b/examples/react/apollo-client-defer/src/gql/graphql.ts index 1632915bd67..45422625476 100644 --- a/examples/react/apollo-client-defer/src/gql/graphql.ts +++ b/examples/react/apollo-client-defer/src/gql/graphql.ts @@ -1,37 +1,7 @@ /* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = T | null | undefined; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -export type Query = { - __typename?: 'Query'; - alphabet: Array; - /** A field that resolves fast. */ - fastField: Scalars['String']['output']; - /** - * A field that resolves slowly. - * Maybe you want to @defer this field ;) - */ - slowField: Scalars['String']['output']; -}; - -export type QuerySlowFieldArgs = { - waitFor?: Scalars['Int']['input']; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type SlowFieldFragmentFragment = { __typename?: 'Query'; slowField: string } & { ' $fragmentName'?: 'SlowFieldFragmentFragment'; }; diff --git a/examples/react/apollo-client/src/gql/graphql.ts b/examples/react/apollo-client/src/gql/graphql.ts index 2a6550b7fc5..839c15cecbe 100644 --- a/examples/react/apollo-client/src/gql/graphql.ts +++ b/examples/react/apollo-client/src/gql/graphql.ts @@ -1,1280 +1,7 @@ /* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = T | null | undefined; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A single film. */ -export type Film = Node & { - __typename?: 'Film'; - characterConnection?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The name of the director of this film. */ - director?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** The episode number of this film. */ - episodeID?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; - planetConnection?: Maybe; - /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; - /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; - speciesConnection?: Maybe; - starshipConnection?: Maybe; - /** The title of this film. */ - title?: Maybe; - vehicleConnection?: Maybe; -}; - -/** A single film. */ -export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type FilmCharactersConnection = { - __typename?: 'FilmCharactersConnection'; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - characters?: Maybe>>; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmCharactersEdge = { - __typename?: 'FilmCharactersEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmPlanetsConnection = { - __typename?: 'FilmPlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmPlanetsEdge = { - __typename?: 'FilmPlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmSpeciesConnection = { - __typename?: 'FilmSpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmSpeciesEdge = { - __typename?: 'FilmSpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmStarshipsConnection = { - __typename?: 'FilmStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmStarshipsEdge = { - __typename?: 'FilmStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmVehiclesConnection = { - __typename?: 'FilmVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type FilmVehiclesEdge = { - __typename?: 'FilmVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmsConnection = { - __typename?: 'FilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmsEdge = { - __typename?: 'FilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An object with an ID */ -export type Node = { - /** The id of the object. */ - id: Scalars['ID']['output']; -}; - -/** Information about pagination in a connection. */ -export type PageInfo = { - __typename?: 'PageInfo'; - /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; - /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']['output']; - /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']['output']; - /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; -}; - -/** A connection to a list of items. */ -export type PeopleConnection = { - __typename?: 'PeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PeopleEdge = { - __typename?: 'PeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type Person = Node & { - __typename?: 'Person'; - /** - * The birth year of the person, using the in-universe standard of BBY or ABY - - * 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; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - filmConnection?: Maybe; - /** - * The gender of this person. Either "Male", "Female" or "unknown", - * "n/a" if the person does not have a gender. - */ - 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; - /** The height of the person in centimeters. */ - height?: Maybe; - /** A planet that this person was born on or inhabits. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The mass of the person in kilograms. */ - mass?: Maybe; - /** The name of this person. */ - name?: Maybe; - /** The skin color of this person. */ - skinColor?: Maybe; - /** The species that this person belongs to, or null if unknown. */ - species?: Maybe; - starshipConnection?: Maybe; - vehicleConnection?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonFilmConnectionArgs = { - 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; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PersonFilmsConnection = { - __typename?: 'PersonFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonFilmsEdge = { - __typename?: 'PersonFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonStarshipsConnection = { - __typename?: 'PersonStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonStarshipsEdge = { - __typename?: 'PersonStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonVehiclesConnection = { - __typename?: 'PersonVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type PersonVehiclesEdge = { - __typename?: 'PersonVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type Planet = Node & { - __typename?: 'Planet'; - /** The climates of this planet. */ - climates?: Maybe>>; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The diameter of this planet in kilometers. */ - diameter?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The name of this planet. */ - name?: Maybe; - /** - * The number of standard days it takes for this planet to complete a single orbit - * of its local star. - */ - orbitalPeriod?: Maybe; - /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; - residentConnection?: Maybe; - /** - * The number of standard hours it takes for this planet to complete a single - * rotation on its axis. - */ - rotationPeriod?: Maybe; - /** - * The percentage of the planet surface that is naturally occurring water or bodies - * of water. - */ - surfaceWater?: Maybe; - /** The terrains of this planet. */ - terrains?: Maybe>>; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PlanetFilmsConnection = { - __typename?: 'PlanetFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetFilmsEdge = { - __typename?: 'PlanetFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetResidentsConnection = { - __typename?: 'PlanetResidentsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - residents?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetResidentsEdge = { - __typename?: 'PlanetResidentsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetsConnection = { - __typename?: 'PlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetsEdge = { - __typename?: 'PlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -export type Root = { - __typename?: 'Root'; - allFilms?: Maybe; - allPeople?: Maybe; - allPlanets?: Maybe; - allSpecies?: Maybe; - allStarships?: Maybe; - allVehicles?: Maybe; - film?: Maybe; - /** Fetches an object given its ID */ - node?: Maybe; - person?: Maybe; - planet?: Maybe; - species?: Maybe; - starship?: Maybe; - vehicle?: Maybe; -}; - -export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; -}; - -export type RootNodeArgs = { - id: Scalars['ID']['input']; -}; - -export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; -}; - -export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; -}; - -export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; -}; - -export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; -}; - -export type RootVehicleArgs = { - 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; - /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; - /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The designation of this species, such as "sentient". */ - designation?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** - * Common eye colors for this species, null if this species does not typically - * have eyes. - */ - eyeColors?: Maybe>>; - filmConnection?: Maybe; - /** - * Common hair colors for this species, null if this species does not typically - * have hair. - */ - hairColors?: Maybe>>; - /** A planet that this species originates from. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The language commonly spoken by this species. */ - language?: Maybe; - /** The name of this species. */ - name?: Maybe; - personConnection?: Maybe; - /** - * Common skin colors for this species, null if this species does not typically - * have skin. - */ - skinColors?: Maybe>>; -}; - -/** A type of person or character within the Star Wars Universe. */ -export type SpeciesFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type SpeciesConnection = { - __typename?: 'SpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesEdge = { - __typename?: 'SpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesFilmsConnection = { - __typename?: 'SpeciesFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesFilmsEdge = { - __typename?: 'SpeciesFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesPeopleConnection = { - __typename?: 'SpeciesPeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesPeopleEdge = { - __typename?: 'SpeciesPeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type Starship = Node & { - __typename?: 'Starship'; - /** - * The Maximum number of Megalights this starship can travel in a standard hour. - * A "Megalight" is a standard unit of distance and has never been defined before - * within the Star Wars universe. This figure is only really useful for measuring - * the difference in speed of starships. We can assume it is similar to AU, the - * distance between our Sun (Sol) and Earth. - */ - MGLT?: Maybe; - /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this starship can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this starship in meters. */ - length?: Maybe; - /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; - /** - * The maximum speed of this starship in atmosphere. null if this starship is - * incapable of atmosphering flight. - */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 - * Orbital Battle Station". - */ - model?: Maybe; - /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; - /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** - * The class of this starship, such as "Starfighter" or "Deep Space Mobile - * Battlestation" - */ - starshipClass?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type StarshipFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type StarshipFilmsConnection = { - __typename?: 'StarshipFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipFilmsEdge = { - __typename?: 'StarshipFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipPilotsConnection = { - __typename?: 'StarshipPilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipPilotsEdge = { - __typename?: 'StarshipPilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipsConnection = { - __typename?: 'StarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipsEdge = { - __typename?: 'StarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type Vehicle = Node & { - __typename?: 'Vehicle'; - /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this vehicle can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this vehicle in meters. */ - length?: Maybe; - /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; - /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this vehicle. Such as "All-Terrain Attack - * Transport". - */ - model?: Maybe; - /** - * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder - * bike". - */ - name?: Maybe; - /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type VehicleFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type VehicleFilmsConnection = { - __typename?: 'VehicleFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehicleFilmsEdge = { - __typename?: 'VehicleFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclePilotsConnection = { - __typename?: 'VehiclePilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehiclePilotsEdge = { - __typename?: 'VehiclePilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclesConnection = { - __typename?: 'VehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type VehiclesEdge = { - __typename?: 'VehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type AllFilmsWithVariablesQueryQueryVariables = Exact<{ first: number; }>; diff --git a/examples/react/http-executor/src/gql/graphql.ts b/examples/react/http-executor/src/gql/graphql.ts index 2a6550b7fc5..839c15cecbe 100644 --- a/examples/react/http-executor/src/gql/graphql.ts +++ b/examples/react/http-executor/src/gql/graphql.ts @@ -1,1280 +1,7 @@ /* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = T | null | undefined; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A single film. */ -export type Film = Node & { - __typename?: 'Film'; - characterConnection?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The name of the director of this film. */ - director?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** The episode number of this film. */ - episodeID?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; - planetConnection?: Maybe; - /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; - /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; - speciesConnection?: Maybe; - starshipConnection?: Maybe; - /** The title of this film. */ - title?: Maybe; - vehicleConnection?: Maybe; -}; - -/** A single film. */ -export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type FilmCharactersConnection = { - __typename?: 'FilmCharactersConnection'; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - characters?: Maybe>>; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmCharactersEdge = { - __typename?: 'FilmCharactersEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmPlanetsConnection = { - __typename?: 'FilmPlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmPlanetsEdge = { - __typename?: 'FilmPlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmSpeciesConnection = { - __typename?: 'FilmSpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmSpeciesEdge = { - __typename?: 'FilmSpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmStarshipsConnection = { - __typename?: 'FilmStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmStarshipsEdge = { - __typename?: 'FilmStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmVehiclesConnection = { - __typename?: 'FilmVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type FilmVehiclesEdge = { - __typename?: 'FilmVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmsConnection = { - __typename?: 'FilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmsEdge = { - __typename?: 'FilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An object with an ID */ -export type Node = { - /** The id of the object. */ - id: Scalars['ID']['output']; -}; - -/** Information about pagination in a connection. */ -export type PageInfo = { - __typename?: 'PageInfo'; - /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; - /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']['output']; - /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']['output']; - /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; -}; - -/** A connection to a list of items. */ -export type PeopleConnection = { - __typename?: 'PeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PeopleEdge = { - __typename?: 'PeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type Person = Node & { - __typename?: 'Person'; - /** - * The birth year of the person, using the in-universe standard of BBY or ABY - - * 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; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - filmConnection?: Maybe; - /** - * The gender of this person. Either "Male", "Female" or "unknown", - * "n/a" if the person does not have a gender. - */ - 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; - /** The height of the person in centimeters. */ - height?: Maybe; - /** A planet that this person was born on or inhabits. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The mass of the person in kilograms. */ - mass?: Maybe; - /** The name of this person. */ - name?: Maybe; - /** The skin color of this person. */ - skinColor?: Maybe; - /** The species that this person belongs to, or null if unknown. */ - species?: Maybe; - starshipConnection?: Maybe; - vehicleConnection?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonFilmConnectionArgs = { - 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; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PersonFilmsConnection = { - __typename?: 'PersonFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonFilmsEdge = { - __typename?: 'PersonFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonStarshipsConnection = { - __typename?: 'PersonStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonStarshipsEdge = { - __typename?: 'PersonStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonVehiclesConnection = { - __typename?: 'PersonVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type PersonVehiclesEdge = { - __typename?: 'PersonVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type Planet = Node & { - __typename?: 'Planet'; - /** The climates of this planet. */ - climates?: Maybe>>; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The diameter of this planet in kilometers. */ - diameter?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The name of this planet. */ - name?: Maybe; - /** - * The number of standard days it takes for this planet to complete a single orbit - * of its local star. - */ - orbitalPeriod?: Maybe; - /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; - residentConnection?: Maybe; - /** - * The number of standard hours it takes for this planet to complete a single - * rotation on its axis. - */ - rotationPeriod?: Maybe; - /** - * The percentage of the planet surface that is naturally occurring water or bodies - * of water. - */ - surfaceWater?: Maybe; - /** The terrains of this planet. */ - terrains?: Maybe>>; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PlanetFilmsConnection = { - __typename?: 'PlanetFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetFilmsEdge = { - __typename?: 'PlanetFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetResidentsConnection = { - __typename?: 'PlanetResidentsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - residents?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetResidentsEdge = { - __typename?: 'PlanetResidentsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetsConnection = { - __typename?: 'PlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetsEdge = { - __typename?: 'PlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -export type Root = { - __typename?: 'Root'; - allFilms?: Maybe; - allPeople?: Maybe; - allPlanets?: Maybe; - allSpecies?: Maybe; - allStarships?: Maybe; - allVehicles?: Maybe; - film?: Maybe; - /** Fetches an object given its ID */ - node?: Maybe; - person?: Maybe; - planet?: Maybe; - species?: Maybe; - starship?: Maybe; - vehicle?: Maybe; -}; - -export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; -}; - -export type RootNodeArgs = { - id: Scalars['ID']['input']; -}; - -export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; -}; - -export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; -}; - -export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; -}; - -export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; -}; - -export type RootVehicleArgs = { - 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; - /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; - /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The designation of this species, such as "sentient". */ - designation?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** - * Common eye colors for this species, null if this species does not typically - * have eyes. - */ - eyeColors?: Maybe>>; - filmConnection?: Maybe; - /** - * Common hair colors for this species, null if this species does not typically - * have hair. - */ - hairColors?: Maybe>>; - /** A planet that this species originates from. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The language commonly spoken by this species. */ - language?: Maybe; - /** The name of this species. */ - name?: Maybe; - personConnection?: Maybe; - /** - * Common skin colors for this species, null if this species does not typically - * have skin. - */ - skinColors?: Maybe>>; -}; - -/** A type of person or character within the Star Wars Universe. */ -export type SpeciesFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type SpeciesConnection = { - __typename?: 'SpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesEdge = { - __typename?: 'SpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesFilmsConnection = { - __typename?: 'SpeciesFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesFilmsEdge = { - __typename?: 'SpeciesFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesPeopleConnection = { - __typename?: 'SpeciesPeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesPeopleEdge = { - __typename?: 'SpeciesPeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type Starship = Node & { - __typename?: 'Starship'; - /** - * The Maximum number of Megalights this starship can travel in a standard hour. - * A "Megalight" is a standard unit of distance and has never been defined before - * within the Star Wars universe. This figure is only really useful for measuring - * the difference in speed of starships. We can assume it is similar to AU, the - * distance between our Sun (Sol) and Earth. - */ - MGLT?: Maybe; - /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this starship can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this starship in meters. */ - length?: Maybe; - /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; - /** - * The maximum speed of this starship in atmosphere. null if this starship is - * incapable of atmosphering flight. - */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 - * Orbital Battle Station". - */ - model?: Maybe; - /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; - /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** - * The class of this starship, such as "Starfighter" or "Deep Space Mobile - * Battlestation" - */ - starshipClass?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type StarshipFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type StarshipFilmsConnection = { - __typename?: 'StarshipFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipFilmsEdge = { - __typename?: 'StarshipFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipPilotsConnection = { - __typename?: 'StarshipPilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipPilotsEdge = { - __typename?: 'StarshipPilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipsConnection = { - __typename?: 'StarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipsEdge = { - __typename?: 'StarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type Vehicle = Node & { - __typename?: 'Vehicle'; - /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this vehicle can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this vehicle in meters. */ - length?: Maybe; - /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; - /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this vehicle. Such as "All-Terrain Attack - * Transport". - */ - model?: Maybe; - /** - * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder - * bike". - */ - name?: Maybe; - /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type VehicleFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type VehicleFilmsConnection = { - __typename?: 'VehicleFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehicleFilmsEdge = { - __typename?: 'VehicleFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclePilotsConnection = { - __typename?: 'VehiclePilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehiclePilotsEdge = { - __typename?: 'VehiclePilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclesConnection = { - __typename?: 'VehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type VehiclesEdge = { - __typename?: 'VehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type AllFilmsWithVariablesQueryQueryVariables = Exact<{ first: number; }>; diff --git a/examples/react/tanstack-react-query/src/gql/graphql.ts b/examples/react/tanstack-react-query/src/gql/graphql.ts index 71fa037f2f0..7b85263029b 100644 --- a/examples/react/tanstack-react-query/src/gql/graphql.ts +++ b/examples/react/tanstack-react-query/src/gql/graphql.ts @@ -1,1280 +1,7 @@ /* eslint-disable */ import { DocumentTypeDecoration } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = T | null | undefined; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A single film. */ -export type Film = Node & { - __typename?: 'Film'; - characterConnection?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The name of the director of this film. */ - director?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** The episode number of this film. */ - episodeID?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; - planetConnection?: Maybe; - /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; - /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; - speciesConnection?: Maybe; - starshipConnection?: Maybe; - /** The title of this film. */ - title?: Maybe; - vehicleConnection?: Maybe; -}; - -/** A single film. */ -export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type FilmCharactersConnection = { - __typename?: 'FilmCharactersConnection'; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - characters?: Maybe>>; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmCharactersEdge = { - __typename?: 'FilmCharactersEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmPlanetsConnection = { - __typename?: 'FilmPlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmPlanetsEdge = { - __typename?: 'FilmPlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmSpeciesConnection = { - __typename?: 'FilmSpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmSpeciesEdge = { - __typename?: 'FilmSpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmStarshipsConnection = { - __typename?: 'FilmStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmStarshipsEdge = { - __typename?: 'FilmStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmVehiclesConnection = { - __typename?: 'FilmVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type FilmVehiclesEdge = { - __typename?: 'FilmVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmsConnection = { - __typename?: 'FilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmsEdge = { - __typename?: 'FilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An object with an ID */ -export type Node = { - /** The id of the object. */ - id: Scalars['ID']['output']; -}; - -/** Information about pagination in a connection. */ -export type PageInfo = { - __typename?: 'PageInfo'; - /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; - /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']['output']; - /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']['output']; - /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; -}; - -/** A connection to a list of items. */ -export type PeopleConnection = { - __typename?: 'PeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PeopleEdge = { - __typename?: 'PeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type Person = Node & { - __typename?: 'Person'; - /** - * The birth year of the person, using the in-universe standard of BBY or ABY - - * 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; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - filmConnection?: Maybe; - /** - * The gender of this person. Either "Male", "Female" or "unknown", - * "n/a" if the person does not have a gender. - */ - 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; - /** The height of the person in centimeters. */ - height?: Maybe; - /** A planet that this person was born on or inhabits. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The mass of the person in kilograms. */ - mass?: Maybe; - /** The name of this person. */ - name?: Maybe; - /** The skin color of this person. */ - skinColor?: Maybe; - /** The species that this person belongs to, or null if unknown. */ - species?: Maybe; - starshipConnection?: Maybe; - vehicleConnection?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonFilmConnectionArgs = { - 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; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PersonFilmsConnection = { - __typename?: 'PersonFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonFilmsEdge = { - __typename?: 'PersonFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonStarshipsConnection = { - __typename?: 'PersonStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonStarshipsEdge = { - __typename?: 'PersonStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonVehiclesConnection = { - __typename?: 'PersonVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type PersonVehiclesEdge = { - __typename?: 'PersonVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type Planet = Node & { - __typename?: 'Planet'; - /** The climates of this planet. */ - climates?: Maybe>>; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The diameter of this planet in kilometers. */ - diameter?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The name of this planet. */ - name?: Maybe; - /** - * The number of standard days it takes for this planet to complete a single orbit - * of its local star. - */ - orbitalPeriod?: Maybe; - /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; - residentConnection?: Maybe; - /** - * The number of standard hours it takes for this planet to complete a single - * rotation on its axis. - */ - rotationPeriod?: Maybe; - /** - * The percentage of the planet surface that is naturally occurring water or bodies - * of water. - */ - surfaceWater?: Maybe; - /** The terrains of this planet. */ - terrains?: Maybe>>; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PlanetFilmsConnection = { - __typename?: 'PlanetFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetFilmsEdge = { - __typename?: 'PlanetFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetResidentsConnection = { - __typename?: 'PlanetResidentsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - residents?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetResidentsEdge = { - __typename?: 'PlanetResidentsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetsConnection = { - __typename?: 'PlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetsEdge = { - __typename?: 'PlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -export type Root = { - __typename?: 'Root'; - allFilms?: Maybe; - allPeople?: Maybe; - allPlanets?: Maybe; - allSpecies?: Maybe; - allStarships?: Maybe; - allVehicles?: Maybe; - film?: Maybe; - /** Fetches an object given its ID */ - node?: Maybe; - person?: Maybe; - planet?: Maybe; - species?: Maybe; - starship?: Maybe; - vehicle?: Maybe; -}; - -export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; -}; - -export type RootNodeArgs = { - id: Scalars['ID']['input']; -}; - -export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; -}; - -export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; -}; - -export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; -}; - -export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; -}; - -export type RootVehicleArgs = { - 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; - /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; - /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The designation of this species, such as "sentient". */ - designation?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** - * Common eye colors for this species, null if this species does not typically - * have eyes. - */ - eyeColors?: Maybe>>; - filmConnection?: Maybe; - /** - * Common hair colors for this species, null if this species does not typically - * have hair. - */ - hairColors?: Maybe>>; - /** A planet that this species originates from. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The language commonly spoken by this species. */ - language?: Maybe; - /** The name of this species. */ - name?: Maybe; - personConnection?: Maybe; - /** - * Common skin colors for this species, null if this species does not typically - * have skin. - */ - skinColors?: Maybe>>; -}; - -/** A type of person or character within the Star Wars Universe. */ -export type SpeciesFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type SpeciesConnection = { - __typename?: 'SpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesEdge = { - __typename?: 'SpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesFilmsConnection = { - __typename?: 'SpeciesFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesFilmsEdge = { - __typename?: 'SpeciesFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesPeopleConnection = { - __typename?: 'SpeciesPeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesPeopleEdge = { - __typename?: 'SpeciesPeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type Starship = Node & { - __typename?: 'Starship'; - /** - * The Maximum number of Megalights this starship can travel in a standard hour. - * A "Megalight" is a standard unit of distance and has never been defined before - * within the Star Wars universe. This figure is only really useful for measuring - * the difference in speed of starships. We can assume it is similar to AU, the - * distance between our Sun (Sol) and Earth. - */ - MGLT?: Maybe; - /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this starship can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this starship in meters. */ - length?: Maybe; - /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; - /** - * The maximum speed of this starship in atmosphere. null if this starship is - * incapable of atmosphering flight. - */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 - * Orbital Battle Station". - */ - model?: Maybe; - /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; - /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** - * The class of this starship, such as "Starfighter" or "Deep Space Mobile - * Battlestation" - */ - starshipClass?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type StarshipFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type StarshipFilmsConnection = { - __typename?: 'StarshipFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipFilmsEdge = { - __typename?: 'StarshipFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipPilotsConnection = { - __typename?: 'StarshipPilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipPilotsEdge = { - __typename?: 'StarshipPilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipsConnection = { - __typename?: 'StarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipsEdge = { - __typename?: 'StarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type Vehicle = Node & { - __typename?: 'Vehicle'; - /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this vehicle can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this vehicle in meters. */ - length?: Maybe; - /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; - /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this vehicle. Such as "All-Terrain Attack - * Transport". - */ - model?: Maybe; - /** - * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder - * bike". - */ - name?: Maybe; - /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type VehicleFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type VehicleFilmsConnection = { - __typename?: 'VehicleFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehicleFilmsEdge = { - __typename?: 'VehicleFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclePilotsConnection = { - __typename?: 'VehiclePilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehiclePilotsEdge = { - __typename?: 'VehiclePilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclesConnection = { - __typename?: 'VehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type VehiclesEdge = { - __typename?: 'VehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type AllFilmsWithVariablesQueryQueryVariables = Exact<{ first: number; }>; diff --git a/examples/react/urql/src/gql/graphql.ts b/examples/react/urql/src/gql/graphql.ts index 400e9d8c6b5..f080e002be3 100644 --- a/examples/react/urql/src/gql/graphql.ts +++ b/examples/react/urql/src/gql/graphql.ts @@ -1,1280 +1,7 @@ /* eslint-disable */ import { DocumentTypeDecoration } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = T | null | undefined; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A single film. */ -export type Film = Node & { - __typename?: 'Film'; - characterConnection?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The name of the director of this film. */ - director?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** The episode number of this film. */ - episodeID?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; - planetConnection?: Maybe; - /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; - /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; - speciesConnection?: Maybe; - starshipConnection?: Maybe; - /** The title of this film. */ - title?: Maybe; - vehicleConnection?: Maybe; -}; - -/** A single film. */ -export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type FilmCharactersConnection = { - __typename?: 'FilmCharactersConnection'; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - characters?: Maybe>>; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmCharactersEdge = { - __typename?: 'FilmCharactersEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmPlanetsConnection = { - __typename?: 'FilmPlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmPlanetsEdge = { - __typename?: 'FilmPlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmSpeciesConnection = { - __typename?: 'FilmSpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmSpeciesEdge = { - __typename?: 'FilmSpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmStarshipsConnection = { - __typename?: 'FilmStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmStarshipsEdge = { - __typename?: 'FilmStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmVehiclesConnection = { - __typename?: 'FilmVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type FilmVehiclesEdge = { - __typename?: 'FilmVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmsConnection = { - __typename?: 'FilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmsEdge = { - __typename?: 'FilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An object with an ID */ -export type Node = { - /** The id of the object. */ - id: Scalars['ID']['output']; -}; - -/** Information about pagination in a connection. */ -export type PageInfo = { - __typename?: 'PageInfo'; - /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; - /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']['output']; - /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']['output']; - /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; -}; - -/** A connection to a list of items. */ -export type PeopleConnection = { - __typename?: 'PeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PeopleEdge = { - __typename?: 'PeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type Person = Node & { - __typename?: 'Person'; - /** - * The birth year of the person, using the in-universe standard of BBY or ABY - - * 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; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - filmConnection?: Maybe; - /** - * The gender of this person. Either "Male", "Female" or "unknown", - * "n/a" if the person does not have a gender. - */ - 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; - /** The height of the person in centimeters. */ - height?: Maybe; - /** A planet that this person was born on or inhabits. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The mass of the person in kilograms. */ - mass?: Maybe; - /** The name of this person. */ - name?: Maybe; - /** The skin color of this person. */ - skinColor?: Maybe; - /** The species that this person belongs to, or null if unknown. */ - species?: Maybe; - starshipConnection?: Maybe; - vehicleConnection?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonFilmConnectionArgs = { - 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; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PersonFilmsConnection = { - __typename?: 'PersonFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonFilmsEdge = { - __typename?: 'PersonFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonStarshipsConnection = { - __typename?: 'PersonStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonStarshipsEdge = { - __typename?: 'PersonStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonVehiclesConnection = { - __typename?: 'PersonVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type PersonVehiclesEdge = { - __typename?: 'PersonVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type Planet = Node & { - __typename?: 'Planet'; - /** The climates of this planet. */ - climates?: Maybe>>; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The diameter of this planet in kilometers. */ - diameter?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The name of this planet. */ - name?: Maybe; - /** - * The number of standard days it takes for this planet to complete a single orbit - * of its local star. - */ - orbitalPeriod?: Maybe; - /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; - residentConnection?: Maybe; - /** - * The number of standard hours it takes for this planet to complete a single - * rotation on its axis. - */ - rotationPeriod?: Maybe; - /** - * The percentage of the planet surface that is naturally occurring water or bodies - * of water. - */ - surfaceWater?: Maybe; - /** The terrains of this planet. */ - terrains?: Maybe>>; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PlanetFilmsConnection = { - __typename?: 'PlanetFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetFilmsEdge = { - __typename?: 'PlanetFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetResidentsConnection = { - __typename?: 'PlanetResidentsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - residents?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetResidentsEdge = { - __typename?: 'PlanetResidentsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetsConnection = { - __typename?: 'PlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetsEdge = { - __typename?: 'PlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -export type Root = { - __typename?: 'Root'; - allFilms?: Maybe; - allPeople?: Maybe; - allPlanets?: Maybe; - allSpecies?: Maybe; - allStarships?: Maybe; - allVehicles?: Maybe; - film?: Maybe; - /** Fetches an object given its ID */ - node?: Maybe; - person?: Maybe; - planet?: Maybe; - species?: Maybe; - starship?: Maybe; - vehicle?: Maybe; -}; - -export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; -}; - -export type RootNodeArgs = { - id: Scalars['ID']['input']; -}; - -export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; -}; - -export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; -}; - -export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; -}; - -export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; -}; - -export type RootVehicleArgs = { - 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; - /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; - /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The designation of this species, such as "sentient". */ - designation?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** - * Common eye colors for this species, null if this species does not typically - * have eyes. - */ - eyeColors?: Maybe>>; - filmConnection?: Maybe; - /** - * Common hair colors for this species, null if this species does not typically - * have hair. - */ - hairColors?: Maybe>>; - /** A planet that this species originates from. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The language commonly spoken by this species. */ - language?: Maybe; - /** The name of this species. */ - name?: Maybe; - personConnection?: Maybe; - /** - * Common skin colors for this species, null if this species does not typically - * have skin. - */ - skinColors?: Maybe>>; -}; - -/** A type of person or character within the Star Wars Universe. */ -export type SpeciesFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type SpeciesConnection = { - __typename?: 'SpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesEdge = { - __typename?: 'SpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesFilmsConnection = { - __typename?: 'SpeciesFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesFilmsEdge = { - __typename?: 'SpeciesFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesPeopleConnection = { - __typename?: 'SpeciesPeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesPeopleEdge = { - __typename?: 'SpeciesPeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type Starship = Node & { - __typename?: 'Starship'; - /** - * The Maximum number of Megalights this starship can travel in a standard hour. - * A "Megalight" is a standard unit of distance and has never been defined before - * within the Star Wars universe. This figure is only really useful for measuring - * the difference in speed of starships. We can assume it is similar to AU, the - * distance between our Sun (Sol) and Earth. - */ - MGLT?: Maybe; - /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this starship can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this starship in meters. */ - length?: Maybe; - /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; - /** - * The maximum speed of this starship in atmosphere. null if this starship is - * incapable of atmosphering flight. - */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 - * Orbital Battle Station". - */ - model?: Maybe; - /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; - /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** - * The class of this starship, such as "Starfighter" or "Deep Space Mobile - * Battlestation" - */ - starshipClass?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type StarshipFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type StarshipFilmsConnection = { - __typename?: 'StarshipFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipFilmsEdge = { - __typename?: 'StarshipFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipPilotsConnection = { - __typename?: 'StarshipPilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipPilotsEdge = { - __typename?: 'StarshipPilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipsConnection = { - __typename?: 'StarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipsEdge = { - __typename?: 'StarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type Vehicle = Node & { - __typename?: 'Vehicle'; - /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this vehicle can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this vehicle in meters. */ - length?: Maybe; - /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; - /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this vehicle. Such as "All-Terrain Attack - * Transport". - */ - model?: Maybe; - /** - * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder - * bike". - */ - name?: Maybe; - /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type VehicleFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type VehicleFilmsConnection = { - __typename?: 'VehicleFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehicleFilmsEdge = { - __typename?: 'VehicleFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclePilotsConnection = { - __typename?: 'VehiclePilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehiclePilotsEdge = { - __typename?: 'VehiclePilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclesConnection = { - __typename?: 'VehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type VehiclesEdge = { - __typename?: 'VehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type AllFilmsWithVariablesQuery199QueryVariables = Exact<{ first: number; }>; diff --git a/examples/typescript-esm/src/gql/graphql.ts b/examples/typescript-esm/src/gql/graphql.ts index 909cb6ea52c..e0a6513a6ce 100644 --- a/examples/typescript-esm/src/gql/graphql.ts +++ b/examples/typescript-esm/src/gql/graphql.ts @@ -1,1280 +1,7 @@ /* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = T | null | undefined; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A single film. */ -export type Film = Node & { - __typename?: 'Film'; - characterConnection?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The name of the director of this film. */ - director?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** The episode number of this film. */ - episodeID?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; - planetConnection?: Maybe; - /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; - /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; - speciesConnection?: Maybe; - starshipConnection?: Maybe; - /** The title of this film. */ - title?: Maybe; - vehicleConnection?: Maybe; -}; - -/** A single film. */ -export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type FilmCharactersConnection = { - __typename?: 'FilmCharactersConnection'; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - characters?: Maybe>>; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmCharactersEdge = { - __typename?: 'FilmCharactersEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmPlanetsConnection = { - __typename?: 'FilmPlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmPlanetsEdge = { - __typename?: 'FilmPlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmSpeciesConnection = { - __typename?: 'FilmSpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmSpeciesEdge = { - __typename?: 'FilmSpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmStarshipsConnection = { - __typename?: 'FilmStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmStarshipsEdge = { - __typename?: 'FilmStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmVehiclesConnection = { - __typename?: 'FilmVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type FilmVehiclesEdge = { - __typename?: 'FilmVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmsConnection = { - __typename?: 'FilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmsEdge = { - __typename?: 'FilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An object with an ID */ -export type Node = { - /** The id of the object. */ - id: Scalars['ID']['output']; -}; - -/** Information about pagination in a connection. */ -export type PageInfo = { - __typename?: 'PageInfo'; - /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; - /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']['output']; - /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']['output']; - /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; -}; - -/** A connection to a list of items. */ -export type PeopleConnection = { - __typename?: 'PeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PeopleEdge = { - __typename?: 'PeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type Person = Node & { - __typename?: 'Person'; - /** - * The birth year of the person, using the in-universe standard of BBY or ABY - - * 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; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - filmConnection?: Maybe; - /** - * The gender of this person. Either "Male", "Female" or "unknown", - * "n/a" if the person does not have a gender. - */ - 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; - /** The height of the person in centimeters. */ - height?: Maybe; - /** A planet that this person was born on or inhabits. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The mass of the person in kilograms. */ - mass?: Maybe; - /** The name of this person. */ - name?: Maybe; - /** The skin color of this person. */ - skinColor?: Maybe; - /** The species that this person belongs to, or null if unknown. */ - species?: Maybe; - starshipConnection?: Maybe; - vehicleConnection?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonFilmConnectionArgs = { - 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; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PersonFilmsConnection = { - __typename?: 'PersonFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonFilmsEdge = { - __typename?: 'PersonFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonStarshipsConnection = { - __typename?: 'PersonStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonStarshipsEdge = { - __typename?: 'PersonStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonVehiclesConnection = { - __typename?: 'PersonVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type PersonVehiclesEdge = { - __typename?: 'PersonVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type Planet = Node & { - __typename?: 'Planet'; - /** The climates of this planet. */ - climates?: Maybe>>; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The diameter of this planet in kilometers. */ - diameter?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The name of this planet. */ - name?: Maybe; - /** - * The number of standard days it takes for this planet to complete a single orbit - * of its local star. - */ - orbitalPeriod?: Maybe; - /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; - residentConnection?: Maybe; - /** - * The number of standard hours it takes for this planet to complete a single - * rotation on its axis. - */ - rotationPeriod?: Maybe; - /** - * The percentage of the planet surface that is naturally occurring water or bodies - * of water. - */ - surfaceWater?: Maybe; - /** The terrains of this planet. */ - terrains?: Maybe>>; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PlanetFilmsConnection = { - __typename?: 'PlanetFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetFilmsEdge = { - __typename?: 'PlanetFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetResidentsConnection = { - __typename?: 'PlanetResidentsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - residents?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetResidentsEdge = { - __typename?: 'PlanetResidentsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetsConnection = { - __typename?: 'PlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetsEdge = { - __typename?: 'PlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -export type Root = { - __typename?: 'Root'; - allFilms?: Maybe; - allPeople?: Maybe; - allPlanets?: Maybe; - allSpecies?: Maybe; - allStarships?: Maybe; - allVehicles?: Maybe; - film?: Maybe; - /** Fetches an object given its ID */ - node?: Maybe; - person?: Maybe; - planet?: Maybe; - species?: Maybe; - starship?: Maybe; - vehicle?: Maybe; -}; - -export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; -}; - -export type RootNodeArgs = { - id: Scalars['ID']['input']; -}; - -export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; -}; - -export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; -}; - -export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; -}; - -export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; -}; - -export type RootVehicleArgs = { - 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; - /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; - /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The designation of this species, such as "sentient". */ - designation?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** - * Common eye colors for this species, null if this species does not typically - * have eyes. - */ - eyeColors?: Maybe>>; - filmConnection?: Maybe; - /** - * Common hair colors for this species, null if this species does not typically - * have hair. - */ - hairColors?: Maybe>>; - /** A planet that this species originates from. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The language commonly spoken by this species. */ - language?: Maybe; - /** The name of this species. */ - name?: Maybe; - personConnection?: Maybe; - /** - * Common skin colors for this species, null if this species does not typically - * have skin. - */ - skinColors?: Maybe>>; -}; - -/** A type of person or character within the Star Wars Universe. */ -export type SpeciesFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type SpeciesConnection = { - __typename?: 'SpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesEdge = { - __typename?: 'SpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesFilmsConnection = { - __typename?: 'SpeciesFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesFilmsEdge = { - __typename?: 'SpeciesFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesPeopleConnection = { - __typename?: 'SpeciesPeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesPeopleEdge = { - __typename?: 'SpeciesPeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type Starship = Node & { - __typename?: 'Starship'; - /** - * The Maximum number of Megalights this starship can travel in a standard hour. - * A "Megalight" is a standard unit of distance and has never been defined before - * within the Star Wars universe. This figure is only really useful for measuring - * the difference in speed of starships. We can assume it is similar to AU, the - * distance between our Sun (Sol) and Earth. - */ - MGLT?: Maybe; - /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this starship can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this starship in meters. */ - length?: Maybe; - /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; - /** - * The maximum speed of this starship in atmosphere. null if this starship is - * incapable of atmosphering flight. - */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 - * Orbital Battle Station". - */ - model?: Maybe; - /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; - /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** - * The class of this starship, such as "Starfighter" or "Deep Space Mobile - * Battlestation" - */ - starshipClass?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type StarshipFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type StarshipFilmsConnection = { - __typename?: 'StarshipFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipFilmsEdge = { - __typename?: 'StarshipFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipPilotsConnection = { - __typename?: 'StarshipPilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipPilotsEdge = { - __typename?: 'StarshipPilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipsConnection = { - __typename?: 'StarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipsEdge = { - __typename?: 'StarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type Vehicle = Node & { - __typename?: 'Vehicle'; - /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this vehicle can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this vehicle in meters. */ - length?: Maybe; - /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; - /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this vehicle. Such as "All-Terrain Attack - * Transport". - */ - model?: Maybe; - /** - * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder - * bike". - */ - name?: Maybe; - /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type VehicleFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type VehicleFilmsConnection = { - __typename?: 'VehicleFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehicleFilmsEdge = { - __typename?: 'VehicleFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclePilotsConnection = { - __typename?: 'VehiclePilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehiclePilotsEdge = { - __typename?: 'VehiclePilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclesConnection = { - __typename?: 'VehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type VehiclesEdge = { - __typename?: 'VehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type AllPeopleQueryQueryVariables = Exact<{ [key: string]: never }>; export type AllPeopleQueryQuery = { diff --git a/examples/typescript-graphql-request/src/gql/graphql.ts b/examples/typescript-graphql-request/src/gql/graphql.ts index 2c77fcf5102..173dcd437e5 100644 --- a/examples/typescript-graphql-request/src/gql/graphql.ts +++ b/examples/typescript-graphql-request/src/gql/graphql.ts @@ -1,1280 +1,7 @@ /* eslint-disable */ import { DocumentTypeDecoration } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = T | null | undefined; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A single film. */ -export type Film = Node & { - __typename?: 'Film'; - characterConnection?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The name of the director of this film. */ - director?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** The episode number of this film. */ - episodeID?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; - planetConnection?: Maybe; - /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; - /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; - speciesConnection?: Maybe; - starshipConnection?: Maybe; - /** The title of this film. */ - title?: Maybe; - vehicleConnection?: Maybe; -}; - -/** A single film. */ -export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type FilmCharactersConnection = { - __typename?: 'FilmCharactersConnection'; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - characters?: Maybe>>; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmCharactersEdge = { - __typename?: 'FilmCharactersEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmPlanetsConnection = { - __typename?: 'FilmPlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmPlanetsEdge = { - __typename?: 'FilmPlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmSpeciesConnection = { - __typename?: 'FilmSpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmSpeciesEdge = { - __typename?: 'FilmSpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmStarshipsConnection = { - __typename?: 'FilmStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmStarshipsEdge = { - __typename?: 'FilmStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmVehiclesConnection = { - __typename?: 'FilmVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type FilmVehiclesEdge = { - __typename?: 'FilmVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmsConnection = { - __typename?: 'FilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmsEdge = { - __typename?: 'FilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An object with an ID */ -export type Node = { - /** The id of the object. */ - id: Scalars['ID']['output']; -}; - -/** Information about pagination in a connection. */ -export type PageInfo = { - __typename?: 'PageInfo'; - /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; - /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']['output']; - /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']['output']; - /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; -}; - -/** A connection to a list of items. */ -export type PeopleConnection = { - __typename?: 'PeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PeopleEdge = { - __typename?: 'PeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type Person = Node & { - __typename?: 'Person'; - /** - * The birth year of the person, using the in-universe standard of BBY or ABY - - * 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; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - filmConnection?: Maybe; - /** - * The gender of this person. Either "Male", "Female" or "unknown", - * "n/a" if the person does not have a gender. - */ - 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; - /** The height of the person in centimeters. */ - height?: Maybe; - /** A planet that this person was born on or inhabits. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The mass of the person in kilograms. */ - mass?: Maybe; - /** The name of this person. */ - name?: Maybe; - /** The skin color of this person. */ - skinColor?: Maybe; - /** The species that this person belongs to, or null if unknown. */ - species?: Maybe; - starshipConnection?: Maybe; - vehicleConnection?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonFilmConnectionArgs = { - 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; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PersonFilmsConnection = { - __typename?: 'PersonFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonFilmsEdge = { - __typename?: 'PersonFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonStarshipsConnection = { - __typename?: 'PersonStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonStarshipsEdge = { - __typename?: 'PersonStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonVehiclesConnection = { - __typename?: 'PersonVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type PersonVehiclesEdge = { - __typename?: 'PersonVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type Planet = Node & { - __typename?: 'Planet'; - /** The climates of this planet. */ - climates?: Maybe>>; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The diameter of this planet in kilometers. */ - diameter?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The name of this planet. */ - name?: Maybe; - /** - * The number of standard days it takes for this planet to complete a single orbit - * of its local star. - */ - orbitalPeriod?: Maybe; - /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; - residentConnection?: Maybe; - /** - * The number of standard hours it takes for this planet to complete a single - * rotation on its axis. - */ - rotationPeriod?: Maybe; - /** - * The percentage of the planet surface that is naturally occurring water or bodies - * of water. - */ - surfaceWater?: Maybe; - /** The terrains of this planet. */ - terrains?: Maybe>>; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PlanetFilmsConnection = { - __typename?: 'PlanetFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetFilmsEdge = { - __typename?: 'PlanetFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetResidentsConnection = { - __typename?: 'PlanetResidentsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - residents?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetResidentsEdge = { - __typename?: 'PlanetResidentsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetsConnection = { - __typename?: 'PlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetsEdge = { - __typename?: 'PlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -export type Root = { - __typename?: 'Root'; - allFilms?: Maybe; - allPeople?: Maybe; - allPlanets?: Maybe; - allSpecies?: Maybe; - allStarships?: Maybe; - allVehicles?: Maybe; - film?: Maybe; - /** Fetches an object given its ID */ - node?: Maybe; - person?: Maybe; - planet?: Maybe; - species?: Maybe; - starship?: Maybe; - vehicle?: Maybe; -}; - -export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; -}; - -export type RootNodeArgs = { - id: Scalars['ID']['input']; -}; - -export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; -}; - -export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; -}; - -export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; -}; - -export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; -}; - -export type RootVehicleArgs = { - 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; - /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; - /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The designation of this species, such as "sentient". */ - designation?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** - * Common eye colors for this species, null if this species does not typically - * have eyes. - */ - eyeColors?: Maybe>>; - filmConnection?: Maybe; - /** - * Common hair colors for this species, null if this species does not typically - * have hair. - */ - hairColors?: Maybe>>; - /** A planet that this species originates from. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The language commonly spoken by this species. */ - language?: Maybe; - /** The name of this species. */ - name?: Maybe; - personConnection?: Maybe; - /** - * Common skin colors for this species, null if this species does not typically - * have skin. - */ - skinColors?: Maybe>>; -}; - -/** A type of person or character within the Star Wars Universe. */ -export type SpeciesFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type SpeciesConnection = { - __typename?: 'SpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesEdge = { - __typename?: 'SpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesFilmsConnection = { - __typename?: 'SpeciesFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesFilmsEdge = { - __typename?: 'SpeciesFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesPeopleConnection = { - __typename?: 'SpeciesPeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesPeopleEdge = { - __typename?: 'SpeciesPeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type Starship = Node & { - __typename?: 'Starship'; - /** - * The Maximum number of Megalights this starship can travel in a standard hour. - * A "Megalight" is a standard unit of distance and has never been defined before - * within the Star Wars universe. This figure is only really useful for measuring - * the difference in speed of starships. We can assume it is similar to AU, the - * distance between our Sun (Sol) and Earth. - */ - MGLT?: Maybe; - /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this starship can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this starship in meters. */ - length?: Maybe; - /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; - /** - * The maximum speed of this starship in atmosphere. null if this starship is - * incapable of atmosphering flight. - */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 - * Orbital Battle Station". - */ - model?: Maybe; - /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; - /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** - * The class of this starship, such as "Starfighter" or "Deep Space Mobile - * Battlestation" - */ - starshipClass?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type StarshipFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type StarshipFilmsConnection = { - __typename?: 'StarshipFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipFilmsEdge = { - __typename?: 'StarshipFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipPilotsConnection = { - __typename?: 'StarshipPilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipPilotsEdge = { - __typename?: 'StarshipPilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipsConnection = { - __typename?: 'StarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipsEdge = { - __typename?: 'StarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type Vehicle = Node & { - __typename?: 'Vehicle'; - /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this vehicle can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this vehicle in meters. */ - length?: Maybe; - /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; - /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this vehicle. Such as "All-Terrain Attack - * Transport". - */ - model?: Maybe; - /** - * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder - * bike". - */ - name?: Maybe; - /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type VehicleFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type VehicleFilmsConnection = { - __typename?: 'VehicleFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehicleFilmsEdge = { - __typename?: 'VehicleFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclePilotsConnection = { - __typename?: 'VehiclePilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehiclePilotsEdge = { - __typename?: 'VehiclePilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclesConnection = { - __typename?: 'VehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type VehiclesEdge = { - __typename?: 'VehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type AllPeopleQueryQueryVariables = Exact<{ [key: string]: never }>; export type AllPeopleQueryQuery = { diff --git a/examples/vite/vite-react-cts/src/gql/graphql.ts b/examples/vite/vite-react-cts/src/gql/graphql.ts index 4f2cce74c7c..47f6fdc00b2 100644 --- a/examples/vite/vite-react-cts/src/gql/graphql.ts +++ b/examples/vite/vite-react-cts/src/gql/graphql.ts @@ -1,1280 +1,7 @@ /* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = T | null | undefined; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A single film. */ -export type Film = Node & { - __typename?: 'Film'; - characterConnection?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The name of the director of this film. */ - director?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** The episode number of this film. */ - episodeID?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; - planetConnection?: Maybe; - /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; - /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; - speciesConnection?: Maybe; - starshipConnection?: Maybe; - /** The title of this film. */ - title?: Maybe; - vehicleConnection?: Maybe; -}; - -/** A single film. */ -export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type FilmCharactersConnection = { - __typename?: 'FilmCharactersConnection'; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - characters?: Maybe>>; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmCharactersEdge = { - __typename?: 'FilmCharactersEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmPlanetsConnection = { - __typename?: 'FilmPlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmPlanetsEdge = { - __typename?: 'FilmPlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmSpeciesConnection = { - __typename?: 'FilmSpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmSpeciesEdge = { - __typename?: 'FilmSpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmStarshipsConnection = { - __typename?: 'FilmStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmStarshipsEdge = { - __typename?: 'FilmStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmVehiclesConnection = { - __typename?: 'FilmVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type FilmVehiclesEdge = { - __typename?: 'FilmVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmsConnection = { - __typename?: 'FilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmsEdge = { - __typename?: 'FilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An object with an ID */ -export type Node = { - /** The id of the object. */ - id: Scalars['ID']['output']; -}; - -/** Information about pagination in a connection. */ -export type PageInfo = { - __typename?: 'PageInfo'; - /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; - /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']['output']; - /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']['output']; - /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; -}; - -/** A connection to a list of items. */ -export type PeopleConnection = { - __typename?: 'PeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PeopleEdge = { - __typename?: 'PeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type Person = Node & { - __typename?: 'Person'; - /** - * The birth year of the person, using the in-universe standard of BBY or ABY - - * 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; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - filmConnection?: Maybe; - /** - * The gender of this person. Either "Male", "Female" or "unknown", - * "n/a" if the person does not have a gender. - */ - 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; - /** The height of the person in centimeters. */ - height?: Maybe; - /** A planet that this person was born on or inhabits. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The mass of the person in kilograms. */ - mass?: Maybe; - /** The name of this person. */ - name?: Maybe; - /** The skin color of this person. */ - skinColor?: Maybe; - /** The species that this person belongs to, or null if unknown. */ - species?: Maybe; - starshipConnection?: Maybe; - vehicleConnection?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonFilmConnectionArgs = { - 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; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PersonFilmsConnection = { - __typename?: 'PersonFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonFilmsEdge = { - __typename?: 'PersonFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonStarshipsConnection = { - __typename?: 'PersonStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonStarshipsEdge = { - __typename?: 'PersonStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonVehiclesConnection = { - __typename?: 'PersonVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type PersonVehiclesEdge = { - __typename?: 'PersonVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type Planet = Node & { - __typename?: 'Planet'; - /** The climates of this planet. */ - climates?: Maybe>>; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The diameter of this planet in kilometers. */ - diameter?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The name of this planet. */ - name?: Maybe; - /** - * The number of standard days it takes for this planet to complete a single orbit - * of its local star. - */ - orbitalPeriod?: Maybe; - /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; - residentConnection?: Maybe; - /** - * The number of standard hours it takes for this planet to complete a single - * rotation on its axis. - */ - rotationPeriod?: Maybe; - /** - * The percentage of the planet surface that is naturally occurring water or bodies - * of water. - */ - surfaceWater?: Maybe; - /** The terrains of this planet. */ - terrains?: Maybe>>; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PlanetFilmsConnection = { - __typename?: 'PlanetFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetFilmsEdge = { - __typename?: 'PlanetFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetResidentsConnection = { - __typename?: 'PlanetResidentsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - residents?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetResidentsEdge = { - __typename?: 'PlanetResidentsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetsConnection = { - __typename?: 'PlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetsEdge = { - __typename?: 'PlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -export type Root = { - __typename?: 'Root'; - allFilms?: Maybe; - allPeople?: Maybe; - allPlanets?: Maybe; - allSpecies?: Maybe; - allStarships?: Maybe; - allVehicles?: Maybe; - film?: Maybe; - /** Fetches an object given its ID */ - node?: Maybe; - person?: Maybe; - planet?: Maybe; - species?: Maybe; - starship?: Maybe; - vehicle?: Maybe; -}; - -export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; -}; - -export type RootNodeArgs = { - id: Scalars['ID']['input']; -}; - -export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; -}; - -export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; -}; - -export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; -}; - -export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; -}; - -export type RootVehicleArgs = { - 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; - /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; - /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The designation of this species, such as "sentient". */ - designation?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** - * Common eye colors for this species, null if this species does not typically - * have eyes. - */ - eyeColors?: Maybe>>; - filmConnection?: Maybe; - /** - * Common hair colors for this species, null if this species does not typically - * have hair. - */ - hairColors?: Maybe>>; - /** A planet that this species originates from. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The language commonly spoken by this species. */ - language?: Maybe; - /** The name of this species. */ - name?: Maybe; - personConnection?: Maybe; - /** - * Common skin colors for this species, null if this species does not typically - * have skin. - */ - skinColors?: Maybe>>; -}; - -/** A type of person or character within the Star Wars Universe. */ -export type SpeciesFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type SpeciesConnection = { - __typename?: 'SpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesEdge = { - __typename?: 'SpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesFilmsConnection = { - __typename?: 'SpeciesFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesFilmsEdge = { - __typename?: 'SpeciesFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesPeopleConnection = { - __typename?: 'SpeciesPeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesPeopleEdge = { - __typename?: 'SpeciesPeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type Starship = Node & { - __typename?: 'Starship'; - /** - * The Maximum number of Megalights this starship can travel in a standard hour. - * A "Megalight" is a standard unit of distance and has never been defined before - * within the Star Wars universe. This figure is only really useful for measuring - * the difference in speed of starships. We can assume it is similar to AU, the - * distance between our Sun (Sol) and Earth. - */ - MGLT?: Maybe; - /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this starship can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this starship in meters. */ - length?: Maybe; - /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; - /** - * The maximum speed of this starship in atmosphere. null if this starship is - * incapable of atmosphering flight. - */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 - * Orbital Battle Station". - */ - model?: Maybe; - /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; - /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** - * The class of this starship, such as "Starfighter" or "Deep Space Mobile - * Battlestation" - */ - starshipClass?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type StarshipFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type StarshipFilmsConnection = { - __typename?: 'StarshipFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipFilmsEdge = { - __typename?: 'StarshipFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipPilotsConnection = { - __typename?: 'StarshipPilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipPilotsEdge = { - __typename?: 'StarshipPilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipsConnection = { - __typename?: 'StarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipsEdge = { - __typename?: 'StarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type Vehicle = Node & { - __typename?: 'Vehicle'; - /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this vehicle can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this vehicle in meters. */ - length?: Maybe; - /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; - /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this vehicle. Such as "All-Terrain Attack - * Transport". - */ - model?: Maybe; - /** - * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder - * bike". - */ - name?: Maybe; - /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type VehicleFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type VehicleFilmsConnection = { - __typename?: 'VehicleFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehicleFilmsEdge = { - __typename?: 'VehicleFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclePilotsConnection = { - __typename?: 'VehiclePilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehiclePilotsEdge = { - __typename?: 'VehiclePilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclesConnection = { - __typename?: 'VehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type VehiclesEdge = { - __typename?: 'VehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type FilmItemFragment = { __typename?: 'Film'; id: string; diff --git a/examples/vite/vite-react-mts/src/gql/graphql.ts b/examples/vite/vite-react-mts/src/gql/graphql.ts index 4f2cce74c7c..47f6fdc00b2 100644 --- a/examples/vite/vite-react-mts/src/gql/graphql.ts +++ b/examples/vite/vite-react-mts/src/gql/graphql.ts @@ -1,1280 +1,7 @@ /* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = T | null | undefined; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A single film. */ -export type Film = Node & { - __typename?: 'Film'; - characterConnection?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The name of the director of this film. */ - director?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** The episode number of this film. */ - episodeID?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; - planetConnection?: Maybe; - /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; - /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; - speciesConnection?: Maybe; - starshipConnection?: Maybe; - /** The title of this film. */ - title?: Maybe; - vehicleConnection?: Maybe; -}; - -/** A single film. */ -export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type FilmCharactersConnection = { - __typename?: 'FilmCharactersConnection'; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - characters?: Maybe>>; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmCharactersEdge = { - __typename?: 'FilmCharactersEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmPlanetsConnection = { - __typename?: 'FilmPlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmPlanetsEdge = { - __typename?: 'FilmPlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmSpeciesConnection = { - __typename?: 'FilmSpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmSpeciesEdge = { - __typename?: 'FilmSpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmStarshipsConnection = { - __typename?: 'FilmStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmStarshipsEdge = { - __typename?: 'FilmStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmVehiclesConnection = { - __typename?: 'FilmVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type FilmVehiclesEdge = { - __typename?: 'FilmVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmsConnection = { - __typename?: 'FilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmsEdge = { - __typename?: 'FilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An object with an ID */ -export type Node = { - /** The id of the object. */ - id: Scalars['ID']['output']; -}; - -/** Information about pagination in a connection. */ -export type PageInfo = { - __typename?: 'PageInfo'; - /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; - /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']['output']; - /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']['output']; - /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; -}; - -/** A connection to a list of items. */ -export type PeopleConnection = { - __typename?: 'PeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PeopleEdge = { - __typename?: 'PeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type Person = Node & { - __typename?: 'Person'; - /** - * The birth year of the person, using the in-universe standard of BBY or ABY - - * 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; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - filmConnection?: Maybe; - /** - * The gender of this person. Either "Male", "Female" or "unknown", - * "n/a" if the person does not have a gender. - */ - 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; - /** The height of the person in centimeters. */ - height?: Maybe; - /** A planet that this person was born on or inhabits. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The mass of the person in kilograms. */ - mass?: Maybe; - /** The name of this person. */ - name?: Maybe; - /** The skin color of this person. */ - skinColor?: Maybe; - /** The species that this person belongs to, or null if unknown. */ - species?: Maybe; - starshipConnection?: Maybe; - vehicleConnection?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonFilmConnectionArgs = { - 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; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PersonFilmsConnection = { - __typename?: 'PersonFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonFilmsEdge = { - __typename?: 'PersonFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonStarshipsConnection = { - __typename?: 'PersonStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonStarshipsEdge = { - __typename?: 'PersonStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonVehiclesConnection = { - __typename?: 'PersonVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type PersonVehiclesEdge = { - __typename?: 'PersonVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type Planet = Node & { - __typename?: 'Planet'; - /** The climates of this planet. */ - climates?: Maybe>>; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The diameter of this planet in kilometers. */ - diameter?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The name of this planet. */ - name?: Maybe; - /** - * The number of standard days it takes for this planet to complete a single orbit - * of its local star. - */ - orbitalPeriod?: Maybe; - /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; - residentConnection?: Maybe; - /** - * The number of standard hours it takes for this planet to complete a single - * rotation on its axis. - */ - rotationPeriod?: Maybe; - /** - * The percentage of the planet surface that is naturally occurring water or bodies - * of water. - */ - surfaceWater?: Maybe; - /** The terrains of this planet. */ - terrains?: Maybe>>; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PlanetFilmsConnection = { - __typename?: 'PlanetFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetFilmsEdge = { - __typename?: 'PlanetFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetResidentsConnection = { - __typename?: 'PlanetResidentsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - residents?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetResidentsEdge = { - __typename?: 'PlanetResidentsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetsConnection = { - __typename?: 'PlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetsEdge = { - __typename?: 'PlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -export type Root = { - __typename?: 'Root'; - allFilms?: Maybe; - allPeople?: Maybe; - allPlanets?: Maybe; - allSpecies?: Maybe; - allStarships?: Maybe; - allVehicles?: Maybe; - film?: Maybe; - /** Fetches an object given its ID */ - node?: Maybe; - person?: Maybe; - planet?: Maybe; - species?: Maybe; - starship?: Maybe; - vehicle?: Maybe; -}; - -export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; -}; - -export type RootNodeArgs = { - id: Scalars['ID']['input']; -}; - -export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; -}; - -export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; -}; - -export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; -}; - -export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; -}; - -export type RootVehicleArgs = { - 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; - /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; - /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The designation of this species, such as "sentient". */ - designation?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** - * Common eye colors for this species, null if this species does not typically - * have eyes. - */ - eyeColors?: Maybe>>; - filmConnection?: Maybe; - /** - * Common hair colors for this species, null if this species does not typically - * have hair. - */ - hairColors?: Maybe>>; - /** A planet that this species originates from. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The language commonly spoken by this species. */ - language?: Maybe; - /** The name of this species. */ - name?: Maybe; - personConnection?: Maybe; - /** - * Common skin colors for this species, null if this species does not typically - * have skin. - */ - skinColors?: Maybe>>; -}; - -/** A type of person or character within the Star Wars Universe. */ -export type SpeciesFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type SpeciesConnection = { - __typename?: 'SpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesEdge = { - __typename?: 'SpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesFilmsConnection = { - __typename?: 'SpeciesFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesFilmsEdge = { - __typename?: 'SpeciesFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesPeopleConnection = { - __typename?: 'SpeciesPeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesPeopleEdge = { - __typename?: 'SpeciesPeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type Starship = Node & { - __typename?: 'Starship'; - /** - * The Maximum number of Megalights this starship can travel in a standard hour. - * A "Megalight" is a standard unit of distance and has never been defined before - * within the Star Wars universe. This figure is only really useful for measuring - * the difference in speed of starships. We can assume it is similar to AU, the - * distance between our Sun (Sol) and Earth. - */ - MGLT?: Maybe; - /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this starship can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this starship in meters. */ - length?: Maybe; - /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; - /** - * The maximum speed of this starship in atmosphere. null if this starship is - * incapable of atmosphering flight. - */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 - * Orbital Battle Station". - */ - model?: Maybe; - /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; - /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** - * The class of this starship, such as "Starfighter" or "Deep Space Mobile - * Battlestation" - */ - starshipClass?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type StarshipFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type StarshipFilmsConnection = { - __typename?: 'StarshipFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipFilmsEdge = { - __typename?: 'StarshipFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipPilotsConnection = { - __typename?: 'StarshipPilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipPilotsEdge = { - __typename?: 'StarshipPilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipsConnection = { - __typename?: 'StarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipsEdge = { - __typename?: 'StarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type Vehicle = Node & { - __typename?: 'Vehicle'; - /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this vehicle can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this vehicle in meters. */ - length?: Maybe; - /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; - /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this vehicle. Such as "All-Terrain Attack - * Transport". - */ - model?: Maybe; - /** - * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder - * bike". - */ - name?: Maybe; - /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type VehicleFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type VehicleFilmsConnection = { - __typename?: 'VehicleFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehicleFilmsEdge = { - __typename?: 'VehicleFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclePilotsConnection = { - __typename?: 'VehiclePilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehiclePilotsEdge = { - __typename?: 'VehiclePilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclesConnection = { - __typename?: 'VehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type VehiclesEdge = { - __typename?: 'VehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type FilmItemFragment = { __typename?: 'Film'; id: string; diff --git a/examples/vite/vite-react-ts/src/gql/graphql.ts b/examples/vite/vite-react-ts/src/gql/graphql.ts index 4f2cce74c7c..47f6fdc00b2 100644 --- a/examples/vite/vite-react-ts/src/gql/graphql.ts +++ b/examples/vite/vite-react-ts/src/gql/graphql.ts @@ -1,1280 +1,7 @@ /* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = T | null | undefined; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A single film. */ -export type Film = Node & { - __typename?: 'Film'; - characterConnection?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The name of the director of this film. */ - director?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** The episode number of this film. */ - episodeID?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; - planetConnection?: Maybe; - /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; - /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; - speciesConnection?: Maybe; - starshipConnection?: Maybe; - /** The title of this film. */ - title?: Maybe; - vehicleConnection?: Maybe; -}; - -/** A single film. */ -export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type FilmCharactersConnection = { - __typename?: 'FilmCharactersConnection'; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - characters?: Maybe>>; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmCharactersEdge = { - __typename?: 'FilmCharactersEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmPlanetsConnection = { - __typename?: 'FilmPlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmPlanetsEdge = { - __typename?: 'FilmPlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmSpeciesConnection = { - __typename?: 'FilmSpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmSpeciesEdge = { - __typename?: 'FilmSpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmStarshipsConnection = { - __typename?: 'FilmStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmStarshipsEdge = { - __typename?: 'FilmStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmVehiclesConnection = { - __typename?: 'FilmVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type FilmVehiclesEdge = { - __typename?: 'FilmVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmsConnection = { - __typename?: 'FilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmsEdge = { - __typename?: 'FilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An object with an ID */ -export type Node = { - /** The id of the object. */ - id: Scalars['ID']['output']; -}; - -/** Information about pagination in a connection. */ -export type PageInfo = { - __typename?: 'PageInfo'; - /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; - /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']['output']; - /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']['output']; - /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; -}; - -/** A connection to a list of items. */ -export type PeopleConnection = { - __typename?: 'PeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PeopleEdge = { - __typename?: 'PeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type Person = Node & { - __typename?: 'Person'; - /** - * The birth year of the person, using the in-universe standard of BBY or ABY - - * 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; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - filmConnection?: Maybe; - /** - * The gender of this person. Either "Male", "Female" or "unknown", - * "n/a" if the person does not have a gender. - */ - 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; - /** The height of the person in centimeters. */ - height?: Maybe; - /** A planet that this person was born on or inhabits. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The mass of the person in kilograms. */ - mass?: Maybe; - /** The name of this person. */ - name?: Maybe; - /** The skin color of this person. */ - skinColor?: Maybe; - /** The species that this person belongs to, or null if unknown. */ - species?: Maybe; - starshipConnection?: Maybe; - vehicleConnection?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonFilmConnectionArgs = { - 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; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PersonFilmsConnection = { - __typename?: 'PersonFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonFilmsEdge = { - __typename?: 'PersonFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonStarshipsConnection = { - __typename?: 'PersonStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonStarshipsEdge = { - __typename?: 'PersonStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonVehiclesConnection = { - __typename?: 'PersonVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type PersonVehiclesEdge = { - __typename?: 'PersonVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type Planet = Node & { - __typename?: 'Planet'; - /** The climates of this planet. */ - climates?: Maybe>>; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The diameter of this planet in kilometers. */ - diameter?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The name of this planet. */ - name?: Maybe; - /** - * The number of standard days it takes for this planet to complete a single orbit - * of its local star. - */ - orbitalPeriod?: Maybe; - /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; - residentConnection?: Maybe; - /** - * The number of standard hours it takes for this planet to complete a single - * rotation on its axis. - */ - rotationPeriod?: Maybe; - /** - * The percentage of the planet surface that is naturally occurring water or bodies - * of water. - */ - surfaceWater?: Maybe; - /** The terrains of this planet. */ - terrains?: Maybe>>; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PlanetFilmsConnection = { - __typename?: 'PlanetFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetFilmsEdge = { - __typename?: 'PlanetFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetResidentsConnection = { - __typename?: 'PlanetResidentsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - residents?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetResidentsEdge = { - __typename?: 'PlanetResidentsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetsConnection = { - __typename?: 'PlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetsEdge = { - __typename?: 'PlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -export type Root = { - __typename?: 'Root'; - allFilms?: Maybe; - allPeople?: Maybe; - allPlanets?: Maybe; - allSpecies?: Maybe; - allStarships?: Maybe; - allVehicles?: Maybe; - film?: Maybe; - /** Fetches an object given its ID */ - node?: Maybe; - person?: Maybe; - planet?: Maybe; - species?: Maybe; - starship?: Maybe; - vehicle?: Maybe; -}; - -export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; -}; - -export type RootNodeArgs = { - id: Scalars['ID']['input']; -}; - -export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; -}; - -export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; -}; - -export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; -}; - -export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; -}; - -export type RootVehicleArgs = { - 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; - /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; - /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The designation of this species, such as "sentient". */ - designation?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** - * Common eye colors for this species, null if this species does not typically - * have eyes. - */ - eyeColors?: Maybe>>; - filmConnection?: Maybe; - /** - * Common hair colors for this species, null if this species does not typically - * have hair. - */ - hairColors?: Maybe>>; - /** A planet that this species originates from. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The language commonly spoken by this species. */ - language?: Maybe; - /** The name of this species. */ - name?: Maybe; - personConnection?: Maybe; - /** - * Common skin colors for this species, null if this species does not typically - * have skin. - */ - skinColors?: Maybe>>; -}; - -/** A type of person or character within the Star Wars Universe. */ -export type SpeciesFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type SpeciesConnection = { - __typename?: 'SpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesEdge = { - __typename?: 'SpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesFilmsConnection = { - __typename?: 'SpeciesFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesFilmsEdge = { - __typename?: 'SpeciesFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesPeopleConnection = { - __typename?: 'SpeciesPeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesPeopleEdge = { - __typename?: 'SpeciesPeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type Starship = Node & { - __typename?: 'Starship'; - /** - * The Maximum number of Megalights this starship can travel in a standard hour. - * A "Megalight" is a standard unit of distance and has never been defined before - * within the Star Wars universe. This figure is only really useful for measuring - * the difference in speed of starships. We can assume it is similar to AU, the - * distance between our Sun (Sol) and Earth. - */ - MGLT?: Maybe; - /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this starship can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this starship in meters. */ - length?: Maybe; - /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; - /** - * The maximum speed of this starship in atmosphere. null if this starship is - * incapable of atmosphering flight. - */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 - * Orbital Battle Station". - */ - model?: Maybe; - /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; - /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** - * The class of this starship, such as "Starfighter" or "Deep Space Mobile - * Battlestation" - */ - starshipClass?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type StarshipFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type StarshipFilmsConnection = { - __typename?: 'StarshipFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipFilmsEdge = { - __typename?: 'StarshipFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipPilotsConnection = { - __typename?: 'StarshipPilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipPilotsEdge = { - __typename?: 'StarshipPilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipsConnection = { - __typename?: 'StarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipsEdge = { - __typename?: 'StarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type Vehicle = Node & { - __typename?: 'Vehicle'; - /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this vehicle can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this vehicle in meters. */ - length?: Maybe; - /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; - /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this vehicle. Such as "All-Terrain Attack - * Transport". - */ - model?: Maybe; - /** - * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder - * bike". - */ - name?: Maybe; - /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type VehicleFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type VehicleFilmsConnection = { - __typename?: 'VehicleFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehicleFilmsEdge = { - __typename?: 'VehicleFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclePilotsConnection = { - __typename?: 'VehiclePilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehiclePilotsEdge = { - __typename?: 'VehiclePilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclesConnection = { - __typename?: 'VehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type VehiclesEdge = { - __typename?: 'VehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type FilmItemFragment = { __typename?: 'Film'; id: string; diff --git a/examples/vue/apollo-composable/src/gql/graphql.ts b/examples/vue/apollo-composable/src/gql/graphql.ts index 9c6cddf063c..043c8a95f3a 100644 --- a/examples/vue/apollo-composable/src/gql/graphql.ts +++ b/examples/vue/apollo-composable/src/gql/graphql.ts @@ -1,1280 +1,7 @@ /* eslint-disable */ import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = T | null | undefined; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A single film. */ -export type Film = Node & { - __typename?: 'Film'; - characterConnection?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The name of the director of this film. */ - director?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** The episode number of this film. */ - episodeID?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; - planetConnection?: Maybe; - /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; - /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; - speciesConnection?: Maybe; - starshipConnection?: Maybe; - /** The title of this film. */ - title?: Maybe; - vehicleConnection?: Maybe; -}; - -/** A single film. */ -export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type FilmCharactersConnection = { - __typename?: 'FilmCharactersConnection'; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - characters?: Maybe>>; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmCharactersEdge = { - __typename?: 'FilmCharactersEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmPlanetsConnection = { - __typename?: 'FilmPlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmPlanetsEdge = { - __typename?: 'FilmPlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmSpeciesConnection = { - __typename?: 'FilmSpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmSpeciesEdge = { - __typename?: 'FilmSpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmStarshipsConnection = { - __typename?: 'FilmStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmStarshipsEdge = { - __typename?: 'FilmStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmVehiclesConnection = { - __typename?: 'FilmVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type FilmVehiclesEdge = { - __typename?: 'FilmVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmsConnection = { - __typename?: 'FilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmsEdge = { - __typename?: 'FilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An object with an ID */ -export type Node = { - /** The id of the object. */ - id: Scalars['ID']['output']; -}; - -/** Information about pagination in a connection. */ -export type PageInfo = { - __typename?: 'PageInfo'; - /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; - /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']['output']; - /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']['output']; - /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; -}; - -/** A connection to a list of items. */ -export type PeopleConnection = { - __typename?: 'PeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PeopleEdge = { - __typename?: 'PeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type Person = Node & { - __typename?: 'Person'; - /** - * The birth year of the person, using the in-universe standard of BBY or ABY - - * 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; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - filmConnection?: Maybe; - /** - * The gender of this person. Either "Male", "Female" or "unknown", - * "n/a" if the person does not have a gender. - */ - 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; - /** The height of the person in centimeters. */ - height?: Maybe; - /** A planet that this person was born on or inhabits. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The mass of the person in kilograms. */ - mass?: Maybe; - /** The name of this person. */ - name?: Maybe; - /** The skin color of this person. */ - skinColor?: Maybe; - /** The species that this person belongs to, or null if unknown. */ - species?: Maybe; - starshipConnection?: Maybe; - vehicleConnection?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonFilmConnectionArgs = { - 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; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PersonFilmsConnection = { - __typename?: 'PersonFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonFilmsEdge = { - __typename?: 'PersonFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonStarshipsConnection = { - __typename?: 'PersonStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonStarshipsEdge = { - __typename?: 'PersonStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonVehiclesConnection = { - __typename?: 'PersonVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type PersonVehiclesEdge = { - __typename?: 'PersonVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type Planet = Node & { - __typename?: 'Planet'; - /** The climates of this planet. */ - climates?: Maybe>>; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The diameter of this planet in kilometers. */ - diameter?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The name of this planet. */ - name?: Maybe; - /** - * The number of standard days it takes for this planet to complete a single orbit - * of its local star. - */ - orbitalPeriod?: Maybe; - /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; - residentConnection?: Maybe; - /** - * The number of standard hours it takes for this planet to complete a single - * rotation on its axis. - */ - rotationPeriod?: Maybe; - /** - * The percentage of the planet surface that is naturally occurring water or bodies - * of water. - */ - surfaceWater?: Maybe; - /** The terrains of this planet. */ - terrains?: Maybe>>; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PlanetFilmsConnection = { - __typename?: 'PlanetFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetFilmsEdge = { - __typename?: 'PlanetFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetResidentsConnection = { - __typename?: 'PlanetResidentsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - residents?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetResidentsEdge = { - __typename?: 'PlanetResidentsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetsConnection = { - __typename?: 'PlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetsEdge = { - __typename?: 'PlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -export type Root = { - __typename?: 'Root'; - allFilms?: Maybe; - allPeople?: Maybe; - allPlanets?: Maybe; - allSpecies?: Maybe; - allStarships?: Maybe; - allVehicles?: Maybe; - film?: Maybe; - /** Fetches an object given its ID */ - node?: Maybe; - person?: Maybe; - planet?: Maybe; - species?: Maybe; - starship?: Maybe; - vehicle?: Maybe; -}; - -export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; -}; - -export type RootNodeArgs = { - id: Scalars['ID']['input']; -}; - -export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; -}; - -export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; -}; - -export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; -}; - -export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; -}; - -export type RootVehicleArgs = { - 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; - /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; - /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The designation of this species, such as "sentient". */ - designation?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** - * Common eye colors for this species, null if this species does not typically - * have eyes. - */ - eyeColors?: Maybe>>; - filmConnection?: Maybe; - /** - * Common hair colors for this species, null if this species does not typically - * have hair. - */ - hairColors?: Maybe>>; - /** A planet that this species originates from. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The language commonly spoken by this species. */ - language?: Maybe; - /** The name of this species. */ - name?: Maybe; - personConnection?: Maybe; - /** - * Common skin colors for this species, null if this species does not typically - * have skin. - */ - skinColors?: Maybe>>; -}; - -/** A type of person or character within the Star Wars Universe. */ -export type SpeciesFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type SpeciesConnection = { - __typename?: 'SpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesEdge = { - __typename?: 'SpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesFilmsConnection = { - __typename?: 'SpeciesFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesFilmsEdge = { - __typename?: 'SpeciesFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesPeopleConnection = { - __typename?: 'SpeciesPeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesPeopleEdge = { - __typename?: 'SpeciesPeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type Starship = Node & { - __typename?: 'Starship'; - /** - * The Maximum number of Megalights this starship can travel in a standard hour. - * A "Megalight" is a standard unit of distance and has never been defined before - * within the Star Wars universe. This figure is only really useful for measuring - * the difference in speed of starships. We can assume it is similar to AU, the - * distance between our Sun (Sol) and Earth. - */ - MGLT?: Maybe; - /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this starship can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this starship in meters. */ - length?: Maybe; - /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; - /** - * The maximum speed of this starship in atmosphere. null if this starship is - * incapable of atmosphering flight. - */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 - * Orbital Battle Station". - */ - model?: Maybe; - /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; - /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** - * The class of this starship, such as "Starfighter" or "Deep Space Mobile - * Battlestation" - */ - starshipClass?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type StarshipFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type StarshipFilmsConnection = { - __typename?: 'StarshipFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipFilmsEdge = { - __typename?: 'StarshipFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipPilotsConnection = { - __typename?: 'StarshipPilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipPilotsEdge = { - __typename?: 'StarshipPilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipsConnection = { - __typename?: 'StarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipsEdge = { - __typename?: 'StarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type Vehicle = Node & { - __typename?: 'Vehicle'; - /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this vehicle can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this vehicle in meters. */ - length?: Maybe; - /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; - /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this vehicle. Such as "All-Terrain Attack - * Transport". - */ - model?: Maybe; - /** - * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder - * bike". - */ - name?: Maybe; - /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type VehicleFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type VehicleFilmsConnection = { - __typename?: 'VehicleFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehicleFilmsEdge = { - __typename?: 'VehicleFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclePilotsConnection = { - __typename?: 'VehiclePilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehiclePilotsEdge = { - __typename?: 'VehiclePilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclesConnection = { - __typename?: 'VehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type VehiclesEdge = { - __typename?: 'VehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type AllFilmsWithVariablesQueryQueryVariables = Exact<{ first: number; }>; diff --git a/examples/vue/urql/src/gql/graphql.ts b/examples/vue/urql/src/gql/graphql.ts index 9c6cddf063c..043c8a95f3a 100644 --- a/examples/vue/urql/src/gql/graphql.ts +++ b/examples/vue/urql/src/gql/graphql.ts @@ -1,1280 +1,7 @@ /* eslint-disable */ import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = T | null | undefined; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A single film. */ -export type Film = Node & { - __typename?: 'Film'; - characterConnection?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The name of the director of this film. */ - director?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** The episode number of this film. */ - episodeID?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; - planetConnection?: Maybe; - /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; - /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; - speciesConnection?: Maybe; - starshipConnection?: Maybe; - /** The title of this film. */ - title?: Maybe; - vehicleConnection?: Maybe; -}; - -/** A single film. */ -export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type FilmCharactersConnection = { - __typename?: 'FilmCharactersConnection'; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - characters?: Maybe>>; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmCharactersEdge = { - __typename?: 'FilmCharactersEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmPlanetsConnection = { - __typename?: 'FilmPlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmPlanetsEdge = { - __typename?: 'FilmPlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmSpeciesConnection = { - __typename?: 'FilmSpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmSpeciesEdge = { - __typename?: 'FilmSpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmStarshipsConnection = { - __typename?: 'FilmStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmStarshipsEdge = { - __typename?: 'FilmStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmVehiclesConnection = { - __typename?: 'FilmVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type FilmVehiclesEdge = { - __typename?: 'FilmVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmsConnection = { - __typename?: 'FilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmsEdge = { - __typename?: 'FilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An object with an ID */ -export type Node = { - /** The id of the object. */ - id: Scalars['ID']['output']; -}; - -/** Information about pagination in a connection. */ -export type PageInfo = { - __typename?: 'PageInfo'; - /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; - /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']['output']; - /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']['output']; - /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; -}; - -/** A connection to a list of items. */ -export type PeopleConnection = { - __typename?: 'PeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PeopleEdge = { - __typename?: 'PeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type Person = Node & { - __typename?: 'Person'; - /** - * The birth year of the person, using the in-universe standard of BBY or ABY - - * 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; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - filmConnection?: Maybe; - /** - * The gender of this person. Either "Male", "Female" or "unknown", - * "n/a" if the person does not have a gender. - */ - 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; - /** The height of the person in centimeters. */ - height?: Maybe; - /** A planet that this person was born on or inhabits. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The mass of the person in kilograms. */ - mass?: Maybe; - /** The name of this person. */ - name?: Maybe; - /** The skin color of this person. */ - skinColor?: Maybe; - /** The species that this person belongs to, or null if unknown. */ - species?: Maybe; - starshipConnection?: Maybe; - vehicleConnection?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonFilmConnectionArgs = { - 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; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PersonFilmsConnection = { - __typename?: 'PersonFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonFilmsEdge = { - __typename?: 'PersonFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonStarshipsConnection = { - __typename?: 'PersonStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonStarshipsEdge = { - __typename?: 'PersonStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonVehiclesConnection = { - __typename?: 'PersonVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type PersonVehiclesEdge = { - __typename?: 'PersonVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type Planet = Node & { - __typename?: 'Planet'; - /** The climates of this planet. */ - climates?: Maybe>>; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The diameter of this planet in kilometers. */ - diameter?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The name of this planet. */ - name?: Maybe; - /** - * The number of standard days it takes for this planet to complete a single orbit - * of its local star. - */ - orbitalPeriod?: Maybe; - /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; - residentConnection?: Maybe; - /** - * The number of standard hours it takes for this planet to complete a single - * rotation on its axis. - */ - rotationPeriod?: Maybe; - /** - * The percentage of the planet surface that is naturally occurring water or bodies - * of water. - */ - surfaceWater?: Maybe; - /** The terrains of this planet. */ - terrains?: Maybe>>; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PlanetFilmsConnection = { - __typename?: 'PlanetFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetFilmsEdge = { - __typename?: 'PlanetFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetResidentsConnection = { - __typename?: 'PlanetResidentsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - residents?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetResidentsEdge = { - __typename?: 'PlanetResidentsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetsConnection = { - __typename?: 'PlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetsEdge = { - __typename?: 'PlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -export type Root = { - __typename?: 'Root'; - allFilms?: Maybe; - allPeople?: Maybe; - allPlanets?: Maybe; - allSpecies?: Maybe; - allStarships?: Maybe; - allVehicles?: Maybe; - film?: Maybe; - /** Fetches an object given its ID */ - node?: Maybe; - person?: Maybe; - planet?: Maybe; - species?: Maybe; - starship?: Maybe; - vehicle?: Maybe; -}; - -export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; -}; - -export type RootNodeArgs = { - id: Scalars['ID']['input']; -}; - -export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; -}; - -export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; -}; - -export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; -}; - -export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; -}; - -export type RootVehicleArgs = { - 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; - /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; - /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The designation of this species, such as "sentient". */ - designation?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** - * Common eye colors for this species, null if this species does not typically - * have eyes. - */ - eyeColors?: Maybe>>; - filmConnection?: Maybe; - /** - * Common hair colors for this species, null if this species does not typically - * have hair. - */ - hairColors?: Maybe>>; - /** A planet that this species originates from. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The language commonly spoken by this species. */ - language?: Maybe; - /** The name of this species. */ - name?: Maybe; - personConnection?: Maybe; - /** - * Common skin colors for this species, null if this species does not typically - * have skin. - */ - skinColors?: Maybe>>; -}; - -/** A type of person or character within the Star Wars Universe. */ -export type SpeciesFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type SpeciesConnection = { - __typename?: 'SpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesEdge = { - __typename?: 'SpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesFilmsConnection = { - __typename?: 'SpeciesFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesFilmsEdge = { - __typename?: 'SpeciesFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesPeopleConnection = { - __typename?: 'SpeciesPeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesPeopleEdge = { - __typename?: 'SpeciesPeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type Starship = Node & { - __typename?: 'Starship'; - /** - * The Maximum number of Megalights this starship can travel in a standard hour. - * A "Megalight" is a standard unit of distance and has never been defined before - * within the Star Wars universe. This figure is only really useful for measuring - * the difference in speed of starships. We can assume it is similar to AU, the - * distance between our Sun (Sol) and Earth. - */ - MGLT?: Maybe; - /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this starship can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this starship in meters. */ - length?: Maybe; - /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; - /** - * The maximum speed of this starship in atmosphere. null if this starship is - * incapable of atmosphering flight. - */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 - * Orbital Battle Station". - */ - model?: Maybe; - /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; - /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** - * The class of this starship, such as "Starfighter" or "Deep Space Mobile - * Battlestation" - */ - starshipClass?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type StarshipFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type StarshipFilmsConnection = { - __typename?: 'StarshipFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipFilmsEdge = { - __typename?: 'StarshipFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipPilotsConnection = { - __typename?: 'StarshipPilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipPilotsEdge = { - __typename?: 'StarshipPilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipsConnection = { - __typename?: 'StarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipsEdge = { - __typename?: 'StarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type Vehicle = Node & { - __typename?: 'Vehicle'; - /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this vehicle can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this vehicle in meters. */ - length?: Maybe; - /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; - /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this vehicle. Such as "All-Terrain Attack - * Transport". - */ - model?: Maybe; - /** - * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder - * bike". - */ - name?: Maybe; - /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type VehicleFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type VehicleFilmsConnection = { - __typename?: 'VehicleFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehicleFilmsEdge = { - __typename?: 'VehicleFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclePilotsConnection = { - __typename?: 'VehiclePilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehiclePilotsEdge = { - __typename?: 'VehiclePilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclesConnection = { - __typename?: 'VehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type VehiclesEdge = { - __typename?: 'VehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type AllFilmsWithVariablesQueryQueryVariables = Exact<{ first: number; }>; diff --git a/examples/vue/villus/src/gql/graphql.ts b/examples/vue/villus/src/gql/graphql.ts index 9c6cddf063c..043c8a95f3a 100644 --- a/examples/vue/villus/src/gql/graphql.ts +++ b/examples/vue/villus/src/gql/graphql.ts @@ -1,1280 +1,7 @@ /* eslint-disable */ import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = T | null | undefined; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -/** A single film. */ -export type Film = Node & { - __typename?: 'Film'; - characterConnection?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The name of the director of this film. */ - director?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** The episode number of this film. */ - episodeID?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The opening paragraphs at the beginning of this film. */ - openingCrawl?: Maybe; - planetConnection?: Maybe; - /** The name(s) of the producer(s) of this film. */ - producers?: Maybe>>; - /** The ISO 8601 date format of film release at original creator country. */ - releaseDate?: Maybe; - speciesConnection?: Maybe; - starshipConnection?: Maybe; - /** The title of this film. */ - title?: Maybe; - vehicleConnection?: Maybe; -}; - -/** A single film. */ -export type FilmCharacterConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmPlanetConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmSpeciesConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmStarshipConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A single film. */ -export type FilmVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type FilmCharactersConnection = { - __typename?: 'FilmCharactersConnection'; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - characters?: Maybe>>; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmCharactersEdge = { - __typename?: 'FilmCharactersEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmPlanetsConnection = { - __typename?: 'FilmPlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmPlanetsEdge = { - __typename?: 'FilmPlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmSpeciesConnection = { - __typename?: 'FilmSpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmSpeciesEdge = { - __typename?: 'FilmSpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmStarshipsConnection = { - __typename?: 'FilmStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmStarshipsEdge = { - __typename?: 'FilmStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmVehiclesConnection = { - __typename?: 'FilmVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type FilmVehiclesEdge = { - __typename?: 'FilmVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type FilmsConnection = { - __typename?: 'FilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type FilmsEdge = { - __typename?: 'FilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An object with an ID */ -export type Node = { - /** The id of the object. */ - id: Scalars['ID']['output']; -}; - -/** Information about pagination in a connection. */ -export type PageInfo = { - __typename?: 'PageInfo'; - /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; - /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']['output']; - /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']['output']; - /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; -}; - -/** A connection to a list of items. */ -export type PeopleConnection = { - __typename?: 'PeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PeopleEdge = { - __typename?: 'PeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type Person = Node & { - __typename?: 'Person'; - /** - * The birth year of the person, using the in-universe standard of BBY or ABY - - * 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; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - filmConnection?: Maybe; - /** - * The gender of this person. Either "Male", "Female" or "unknown", - * "n/a" if the person does not have a gender. - */ - 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; - /** The height of the person in centimeters. */ - height?: Maybe; - /** A planet that this person was born on or inhabits. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The mass of the person in kilograms. */ - mass?: Maybe; - /** The name of this person. */ - name?: Maybe; - /** The skin color of this person. */ - skinColor?: Maybe; - /** The species that this person belongs to, or null if unknown. */ - species?: Maybe; - starshipConnection?: Maybe; - vehicleConnection?: Maybe; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonFilmConnectionArgs = { - 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; -}; - -/** An individual person or character within the Star Wars universe. */ -export type PersonVehicleConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PersonFilmsConnection = { - __typename?: 'PersonFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonFilmsEdge = { - __typename?: 'PersonFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonStarshipsConnection = { - __typename?: 'PersonStarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PersonStarshipsEdge = { - __typename?: 'PersonStarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PersonVehiclesConnection = { - __typename?: 'PersonVehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type PersonVehiclesEdge = { - __typename?: 'PersonVehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type Planet = Node & { - __typename?: 'Planet'; - /** The climates of this planet. */ - climates?: Maybe>>; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The diameter of this planet in kilometers. */ - diameter?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - 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; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The name of this planet. */ - name?: Maybe; - /** - * The number of standard days it takes for this planet to complete a single orbit - * of its local star. - */ - orbitalPeriod?: Maybe; - /** The average population of sentient beings inhabiting this planet. */ - population?: Maybe; - residentConnection?: Maybe; - /** - * The number of standard hours it takes for this planet to complete a single - * rotation on its axis. - */ - rotationPeriod?: Maybe; - /** - * The percentage of the planet surface that is naturally occurring water or bodies - * of water. - */ - surfaceWater?: Maybe; - /** The terrains of this planet. */ - terrains?: Maybe>>; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetFilmConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** - * A large mass, planet or planetoid in the Star Wars Universe, at the time of - * 0 ABY. - */ -export type PlanetResidentConnectionArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A connection to a list of items. */ -export type PlanetFilmsConnection = { - __typename?: 'PlanetFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetFilmsEdge = { - __typename?: 'PlanetFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetResidentsConnection = { - __typename?: 'PlanetResidentsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - residents?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetResidentsEdge = { - __typename?: 'PlanetResidentsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type PlanetsConnection = { - __typename?: 'PlanetsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - planets?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type PlanetsEdge = { - __typename?: 'PlanetsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -export type Root = { - __typename?: 'Root'; - allFilms?: Maybe; - allPeople?: Maybe; - allPlanets?: Maybe; - allSpecies?: Maybe; - allStarships?: Maybe; - allVehicles?: Maybe; - film?: Maybe; - /** Fetches an object given its ID */ - node?: Maybe; - person?: Maybe; - planet?: Maybe; - species?: Maybe; - starship?: Maybe; - vehicle?: Maybe; -}; - -export type RootAllFilmsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPeopleArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllPlanetsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllSpeciesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllStarshipsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootAllVehiclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -export type RootFilmArgs = { - filmID?: InputMaybe; - id?: InputMaybe; -}; - -export type RootNodeArgs = { - id: Scalars['ID']['input']; -}; - -export type RootPersonArgs = { - id?: InputMaybe; - personID?: InputMaybe; -}; - -export type RootPlanetArgs = { - id?: InputMaybe; - planetID?: InputMaybe; -}; - -export type RootSpeciesArgs = { - id?: InputMaybe; - speciesID?: InputMaybe; -}; - -export type RootStarshipArgs = { - id?: InputMaybe; - starshipID?: InputMaybe; -}; - -export type RootVehicleArgs = { - 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; - /** The average lifespan of this species in years, null if unknown. */ - averageLifespan?: Maybe; - /** The classification of this species, such as "mammal" or "reptile". */ - classification?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The designation of this species, such as "sentient". */ - designation?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - /** - * Common eye colors for this species, null if this species does not typically - * have eyes. - */ - eyeColors?: Maybe>>; - filmConnection?: Maybe; - /** - * Common hair colors for this species, null if this species does not typically - * have hair. - */ - hairColors?: Maybe>>; - /** A planet that this species originates from. */ - homeworld?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The language commonly spoken by this species. */ - language?: Maybe; - /** The name of this species. */ - name?: Maybe; - personConnection?: Maybe; - /** - * Common skin colors for this species, null if this species does not typically - * have skin. - */ - skinColors?: Maybe>>; -}; - -/** A type of person or character within the Star Wars Universe. */ -export type SpeciesFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type SpeciesConnection = { - __typename?: 'SpeciesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - species?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesEdge = { - __typename?: 'SpeciesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesFilmsConnection = { - __typename?: 'SpeciesFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesFilmsEdge = { - __typename?: 'SpeciesFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type SpeciesPeopleConnection = { - __typename?: 'SpeciesPeopleConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - people?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type SpeciesPeopleEdge = { - __typename?: 'SpeciesPeopleEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type Starship = Node & { - __typename?: 'Starship'; - /** - * The Maximum number of Megalights this starship can travel in a standard hour. - * A "Megalight" is a standard unit of distance and has never been defined before - * within the Star Wars universe. This figure is only really useful for measuring - * the difference in speed of starships. We can assume it is similar to AU, the - * distance between our Sun (Sol) and Earth. - */ - MGLT?: Maybe; - /** The maximum number of kilograms that this starship can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this starship can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this starship new, in galactic credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this starship. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The class of this starships hyperdrive. */ - hyperdriveRating?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this starship in meters. */ - length?: Maybe; - /** The manufacturers of this starship. */ - manufacturers?: Maybe>>; - /** - * The maximum speed of this starship in atmosphere. null if this starship is - * incapable of atmosphering flight. - */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this starship. Such as "T-65 X-wing" or "DS-1 - * Orbital Battle Station". - */ - model?: Maybe; - /** The name of this starship. The common name, such as "Death Star". */ - name?: Maybe; - /** The number of non-essential people this starship can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** - * The class of this starship, such as "Starfighter" or "Deep Space Mobile - * Battlestation" - */ - starshipClass?: Maybe; -}; - -/** A single transport craft that has hyperdrive capability. */ -export type StarshipFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type StarshipFilmsConnection = { - __typename?: 'StarshipFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipFilmsEdge = { - __typename?: 'StarshipFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipPilotsConnection = { - __typename?: 'StarshipPilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipPilotsEdge = { - __typename?: 'StarshipPilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type StarshipsConnection = { - __typename?: 'StarshipsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - starships?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type StarshipsEdge = { - __typename?: 'StarshipsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type Vehicle = Node & { - __typename?: 'Vehicle'; - /** The maximum number of kilograms that this vehicle can transport. */ - cargoCapacity?: Maybe; - /** - * The maximum length of time that this vehicle can provide consumables for its - * entire crew without having to resupply. - */ - consumables?: Maybe; - /** The cost of this vehicle new, in Galactic Credits. */ - costInCredits?: Maybe; - /** The ISO 8601 date format of the time that this resource was created. */ - created?: Maybe; - /** The number of personnel needed to run or pilot this vehicle. */ - crew?: Maybe; - /** The ISO 8601 date format of the time that this resource was edited. */ - edited?: Maybe; - filmConnection?: Maybe; - /** The ID of an object */ - id: Scalars['ID']['output']; - /** The length of this vehicle in meters. */ - length?: Maybe; - /** The manufacturers of this vehicle. */ - manufacturers?: Maybe>>; - /** The maximum speed of this vehicle in atmosphere. */ - maxAtmospheringSpeed?: Maybe; - /** - * The model or official name of this vehicle. Such as "All-Terrain Attack - * Transport". - */ - model?: Maybe; - /** - * The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder - * bike". - */ - name?: Maybe; - /** The number of non-essential people this vehicle can transport. */ - passengers?: Maybe; - pilotConnection?: Maybe; - /** The class of this vehicle, such as "Wheeled" or "Repulsorcraft". */ - vehicleClass?: Maybe; -}; - -/** A single transport craft that does not have hyperdrive capability */ -export type VehicleFilmConnectionArgs = { - 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; -}; - -/** A connection to a list of items. */ -export type VehicleFilmsConnection = { - __typename?: 'VehicleFilmsConnection'; - /** A list of edges. */ - edges?: 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - films?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehicleFilmsEdge = { - __typename?: 'VehicleFilmsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclePilotsConnection = { - __typename?: 'VehiclePilotsConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - pilots?: Maybe>>; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - totalCount?: Maybe; -}; - -/** An edge in a connection. */ -export type VehiclePilotsEdge = { - __typename?: 'VehiclePilotsEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - -/** A connection to a list of items. */ -export type VehiclesConnection = { - __typename?: 'VehiclesConnection'; - /** A list of edges. */ - edges?: Maybe>>; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** - * A count of the total number of objects in this connection, ignoring pagination. - * This allows a client to fetch the first five objects by passing "5" as the - * argument to "first", then fetch the total count so it could display "5 of 83", - * for example. - */ - 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 - * "{ edges { node } }" when no edge data is needed, this field can be be used - * instead. Note that when clients like Relay need to fetch the "cursor" field on - * the edge to enable efficient pagination, this shortcut cannot be used, and the - * full "{ edges { node } }" version should be used instead. - */ - vehicles?: Maybe>>; -}; - -/** An edge in a connection. */ -export type VehiclesEdge = { - __typename?: 'VehiclesEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node?: Maybe; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type AllFilmsWithVariablesQueryQueryVariables = Exact<{ first: number; }>; diff --git a/examples/yoga-tests/src/gql/graphql.ts b/examples/yoga-tests/src/gql/graphql.ts index 556903779f4..4792ff68737 100644 --- a/examples/yoga-tests/src/gql/graphql.ts +++ b/examples/yoga-tests/src/gql/graphql.ts @@ -1,35 +1,7 @@ /* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = T | null | undefined; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; -}; - -export type Mutation = { - __typename?: 'Mutation'; - echo: Scalars['String']['output']; -}; - -export type MutationEchoArgs = { - message: Scalars['String']['input']; -}; - -export type Query = { - __typename?: 'Query'; - hello: Scalars['String']['output']; -}; - +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type HelloQueryQueryVariables = Exact<{ [key: string]: never }>; export type HelloQueryQuery = { __typename?: 'Query'; hello: string }; diff --git a/packages/plugins/typescript/operations/src/index.ts b/packages/plugins/typescript/operations/src/index.ts index b7823699af2..95775dae386 100644 --- a/packages/plugins/typescript/operations/src/index.ts +++ b/packages/plugins/typescript/operations/src/index.ts @@ -68,6 +68,7 @@ export const plugin: PluginFunction = { [K in keyof T]: T[K] };'; } + + getIncrementalUtilityType(): string | null { + if (!this.config.generatesOperationTypes) { + return null; + } + + // Note: `export` here is important for 2 reasons + // 1. It is not always used in the rest of the file, so this is a safe way to avoid lint rules (in tsconfig or eslint) complaining it's not used in the current file. + // 2. In Client Preset, it is used by fragment-masking.ts, so it needs `export` + return "export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };"; + } } diff --git a/packages/plugins/typescript/operations/tests/ts-documents.standalone.enum.spec.ts b/packages/plugins/typescript/operations/tests/ts-documents.standalone.enum.spec.ts index d058165b47e..4ed7a7f371c 100644 --- a/packages/plugins/typescript/operations/tests/ts-documents.standalone.enum.spec.ts +++ b/packages/plugins/typescript/operations/tests/ts-documents.standalone.enum.spec.ts @@ -36,6 +36,7 @@ describe('TypeScript Operations Plugin - Enum', () => { expect(result).toMatchInlineSnapshot(` "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type MeQueryVariables = Exact<{ [key: string]: never; }>; @@ -80,6 +81,7 @@ describe('TypeScript Operations Plugin - Enum', () => { expect(result).toMatchInlineSnapshot(` "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export enum UserRole { Admin = 0, Customer = 1 @@ -132,6 +134,7 @@ describe('TypeScript Operations Plugin - Enum', () => { expect(result).toMatchInlineSnapshot(` "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export const UserRole = { ABC: 'A_B_C', XYZ: 'X_Y_Z', @@ -190,6 +193,7 @@ describe('TypeScript Operations Plugin - Enum', () => { expect(result).toMatchInlineSnapshot(` "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; /** Multiline comment test */ export const enum UserRole { Admin = 'ADMIN', @@ -241,6 +245,7 @@ describe('TypeScript Operations Plugin - Enum', () => { expect(result).toMatchInlineSnapshot(` "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export enum UserRole { Admin = 'ADMIN', Customer = 'CUSTOMER' @@ -309,6 +314,7 @@ describe('TypeScript Operations Plugin - Enum', () => { expect(result).toMatchInlineSnapshot(` "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type UserRole = | 0 | 'Foo' @@ -378,6 +384,7 @@ describe('TypeScript Operations Plugin - Enum', () => { expect(result).toMatchInlineSnapshot(` "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export const UserRole = { ABC: 0, XYZ: 'Foo', @@ -445,6 +452,7 @@ describe('TypeScript Operations Plugin - Enum', () => { expect(result).toMatchInlineSnapshot(` "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export enum UserRole { Admin = 0, Customer = 'test' @@ -507,6 +515,7 @@ describe('TypeScript Operations Plugin - Enum', () => { expect(result).toMatchInlineSnapshot(` "import { MyEnum as UserRole } from './my-file'; type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export { UserRole }; export type MeQueryVariables = Exact<{ @@ -521,6 +530,61 @@ describe('TypeScript Operations Plugin - Enum', () => { validateTs(result, undefined, undefined, undefined, undefined, true); }); + it('does not import or export `enumValues` (as file import) if enum is not used', async () => { + const schema = buildSchema(/* GraphQL */ ` + type Query { + me: User + } + + type User { + id: ID! + name: String! + role: UserRole! + createdAt: DateTime! + } + + enum UserRole { + ADMIN + CUSTOMER + } + + scalar DateTime + `); + + const document = parse(/* GraphQL */ ` + query { + me { + id + } + } + `); + + const result = mergeOutputs([ + await plugin( + schema, + [{ document }], + { + enumValues: { + UserRole: './my-file#MyEnum', + }, + }, + { outputFile: '' } + ), + ]); + + expect(result).toMatchInlineSnapshot(` + "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; + export type Unnamed_1_QueryVariables = Exact<{ [key: string]: never; }>; + + + export type Unnamed_1_Query = { __typename?: 'Query', me?: { __typename?: 'User', id: string } | null }; + " + `); + + validateTs(result, undefined, undefined, undefined, undefined, true); + }); + it('handles `enumValues` with custom imported enum from namespace with different name', async () => { const schema = buildSchema(/* GraphQL */ ` type Query { @@ -567,6 +631,7 @@ describe('TypeScript Operations Plugin - Enum', () => { "import { NS } from './my-file'; import UserRole = NS.ETest; type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export { UserRole }; export type MeQueryVariables = Exact<{ @@ -627,6 +692,7 @@ describe('TypeScript Operations Plugin - Enum', () => { "import { NS } from './my-file'; import UserRole = NS.UserRole; type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export { UserRole }; export type MeQueryVariables = Exact<{ @@ -691,6 +757,7 @@ describe('TypeScript Operations Plugin - Enum', () => { "import { UserRole } from './my-file'; import { UserStatus } from './my-file'; type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export { UserRole }; export { UserStatus }; @@ -758,6 +825,7 @@ describe('TypeScript Operations Plugin - Enum', () => { "import { UserRole } from './my-file'; import { UserStatus2X as UserStatus } from './my-file'; type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export { UserRole }; export { UserStatus }; @@ -810,6 +878,7 @@ describe('TypeScript Operations Plugin - Enum', () => { expect(result).toMatchInlineSnapshot(` "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export enum UserRole { ABC = 'A_B_C', XYZ = 'X_Y_Z', @@ -863,6 +932,7 @@ describe('TypeScript Operations Plugin - Enum', () => { expect(result).toMatchInlineSnapshot(` "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export enum UserRole { _ = '_', __ = '__', @@ -915,6 +985,7 @@ describe('TypeScript Operations Plugin - Enum', () => { ]); expect(result).toMatchInlineSnapshot(` "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type IUserRole = | 'ADMIN' | 'CUSTOMER'; @@ -965,6 +1036,7 @@ describe('TypeScript Operations Plugin - Enum', () => { ]); expect(result).toMatchInlineSnapshot(` "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type UserRole = | 'ADMIN' | 'CUSTOMER'; @@ -1015,6 +1087,7 @@ describe('TypeScript Operations Plugin - Enum', () => { ]); expect(result).toMatchInlineSnapshot(` "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type UserRoleZ = | 'ADMIN' | 'CUSTOMER'; @@ -1065,6 +1138,7 @@ describe('TypeScript Operations Plugin - Enum', () => { ]); expect(result).toMatchInlineSnapshot(` "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type UserRole = | 'ADMIN' | 'CUSTOMER'; @@ -1125,6 +1199,7 @@ describe('TypeScript Operations Plugin - Enum', () => { ]); expect(result).toMatchInlineSnapshot(` "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type userrole = | 'ADMIN' | 'CUSTOMER'; @@ -1186,6 +1261,7 @@ describe('TypeScript Operations Plugin - Enum', () => { ]); expect(result).toMatchInlineSnapshot(` "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export enum UserRole { admin = 'ADMIN', customer = 'CUSTOMER' @@ -1244,6 +1320,7 @@ describe('TypeScript Operations Plugin - Enum', () => { ]); expect(result).toMatchInlineSnapshot(` "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type UserRole = | 'ADMIN' | 'CUSTOMER'; @@ -1307,6 +1384,7 @@ describe('TypeScript Operations Plugin - Enum', () => { expect(result).toMatchInlineSnapshot(` "import UserRole from './files'; type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export { UserRole }; export type IMeQueryVariables = Exact<{ @@ -1353,6 +1431,7 @@ describe('TypeScript Operations Plugin - Enum', () => { expect(result).toMatchInlineSnapshot(` "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export enum UserRole { Axb = 'AXB', '1X2' = '_1X2', @@ -1403,6 +1482,7 @@ describe('TypeScript Operations Plugin - Enum `%future added value`', () => { expect(result).toMatchInlineSnapshot(` "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type UserRole = | 'ADMIN' | 'CUSTOMER' diff --git a/packages/plugins/typescript/operations/tests/ts-documents.standalone.import-types.spec.ts b/packages/plugins/typescript/operations/tests/ts-documents.standalone.import-types.spec.ts index af820bf713a..de0af9bda02 100644 --- a/packages/plugins/typescript/operations/tests/ts-documents.standalone.import-types.spec.ts +++ b/packages/plugins/typescript/operations/tests/ts-documents.standalone.import-types.spec.ts @@ -106,6 +106,7 @@ describe('TypeScript Operations Plugin - Import Types', () => { "import type * as TypeImport from './path-to-other-file.generated'; type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type UserQueryVariables = Exact<{ id: string; }>; @@ -240,6 +241,7 @@ describe('TypeScript Operations Plugin - Import Types', () => { "import type * as TypeImport from '@my-company/package/types'; type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type UserQueryVariables = Exact<{ id: string; }>; @@ -353,6 +355,7 @@ describe('TypeScript Operations Plugin - Import Types', () => { expect(result).toMatchInlineSnapshot(` "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type UserQueryVariables = Exact<{ id?: string | null; name?: string | null; diff --git a/packages/plugins/typescript/operations/tests/ts-documents.standalone.spec.ts b/packages/plugins/typescript/operations/tests/ts-documents.standalone.spec.ts index 00ea9a5ca42..e466993c245 100644 --- a/packages/plugins/typescript/operations/tests/ts-documents.standalone.spec.ts +++ b/packages/plugins/typescript/operations/tests/ts-documents.standalone.spec.ts @@ -94,6 +94,7 @@ describe('TypeScript Operations Plugin - Standalone', () => { expect(result).toMatchInlineSnapshot(` "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; /** UserRole Description */ export type UserRole = /** UserRole ADMIN */ @@ -162,6 +163,7 @@ describe('TypeScript Operations Plugin - Standalone', () => { expect(result).toMatchInlineSnapshot(` "type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type UserQueryVariables = Exact<{ id: string | number | boolean; }>; @@ -289,6 +291,7 @@ describe('TypeScript Operations Plugin - Standalone', () => { expect(result).toMatchInlineSnapshot(` " + /** UserRole Description */ export type UserRole = /** UserRole ADMIN */ @@ -373,6 +376,7 @@ describe('TypeScript Operations Plugin - Standalone', () => { expect(result).toMatchInlineSnapshot(` " + " `); diff --git a/packages/presets/client/src/index.ts b/packages/presets/client/src/index.ts index 73ee7dac239..2957241af8a 100644 --- a/packages/presets/client/src/index.ts +++ b/packages/presets/client/src/index.ts @@ -2,7 +2,6 @@ import * as addPlugin from '@graphql-codegen/add'; import * as gqlTagPlugin from '@graphql-codegen/gql-tag-operations'; import type { PluginFunction, Types } from '@graphql-codegen/plugin-helpers'; import * as typedDocumentNodePlugin from '@graphql-codegen/typed-document-node'; -import * as typescriptPlugin from '@graphql-codegen/typescript'; import * as typescriptOperationPlugin from '@graphql-codegen/typescript-operations'; import { ClientSideBaseVisitor, DocumentMode } from '@graphql-codegen/visitor-plugin-common'; import { parse, printSchema, type DocumentNode, type GraphQLSchema } from 'graphql'; @@ -130,16 +129,13 @@ export const preset: Types.OutputPreset = { useTypeImports: options.config.useTypeImports, skipTypename: options.config.skipTypename, arrayInputCoercion: options.config.arrayInputCoercion, - enumsAsTypes: options.config.enumsAsTypes, - enumsAsConst: options.config.enumsAsConst, + enumType: options.config.enumType, enumValues: options.config.enumValues, futureProofEnums: options.config.futureProofEnums, nonOptionalTypename: options.config.nonOptionalTypename, avoidOptionals: options.config.avoidOptionals, documentMode: options.config.documentMode, skipTypeNameForRoot: options.config.skipTypeNameForRoot, - onlyOperationTypes: options.config.onlyOperationTypes, - onlyEnums: options.config.onlyEnums, customDirectives: options.config.customDirectives, immutableTypes: options.config.immutableTypes, }; @@ -187,7 +183,6 @@ export const preset: Types.OutputPreset = { const pluginMap = { ...options.pluginMap, [`add`]: addPlugin, - [`typescript`]: typescriptPlugin, [`typescript-operations`]: typescriptOperationPlugin, [`typed-document-node`]: { ...typedDocumentNodePlugin, @@ -221,11 +216,6 @@ export const preset: Types.OutputPreset = { const plugins: Array = [ { [`add`]: { content: `/* eslint-disable */` } }, - { - [`typescript`]: { - inputMaybeValue: 'T | null | undefined', - }, - }, { [`typescript-operations`]: {} }, { [`typed-document-node`]: { diff --git a/packages/presets/client/tests/client-preset.enum.spec.ts b/packages/presets/client/tests/client-preset.enum.spec.ts new file mode 100644 index 00000000000..89267a0f05d --- /dev/null +++ b/packages/presets/client/tests/client-preset.enum.spec.ts @@ -0,0 +1,208 @@ +import { executeCodegen } from '@graphql-codegen/cli'; +import { preset } from '../src/index.js'; + +describe('client-preset - Enum', () => { + it('does not generate enum if not used in operations', async () => { + const { result } = await executeCodegen({ + schema: [ + /* GraphQL */ ` + enum Color { + RED + BLUE + } + `, + ], + + generates: { + 'out1/': { + preset, + }, + }, + }); + + const graphqlFile = result.find(file => file.filename === 'out1/graphql.ts'); + expect(graphqlFile.content).toMatchInlineSnapshot(` + "/* eslint-disable */ + type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };" + `); + }); + + it('generates enum if used in operation Variables', async () => { + const { result } = await executeCodegen({ + schema: [ + /* GraphQL */ ` + type Query { + shape(shape: Shape): ShapeObj! + } + + enum Color { + RED + BLUE + } + + enum Shape { + ROUND + SQUARE + } + + type ShapeObj { + id: ID! + shape: Shape! + } + `, + ], + documents: /* GraphQL */ ` + query Shape($shape: Shape) { + shape(shape: $shape) { + id + } + } + `, + + generates: { + 'out1/': { + preset, + }, + }, + }); + + const graphqlFile = result.find(file => file.filename === 'out1/graphql.ts'); + expect(graphqlFile.content).toMatchInlineSnapshot(` + "/* eslint-disable */ + import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; + type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; + export type Shape = + | 'ROUND' + | 'SQUARE'; + + export type ShapeQueryVariables = Exact<{ + shape?: Shape | null; + }>; + + + export type ShapeQuery = { __typename?: 'Query', shape: { __typename?: 'ShapeObj', id: string } }; + + + export const ShapeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Shape"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"shape"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Shape"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"shape"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"shape"},"value":{"kind":"Variable","name":{"kind":"Name","value":"shape"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode;" + `); + }); + + it('generates enum if used in operation Result', async () => { + const { result } = await executeCodegen({ + schema: [ + /* GraphQL */ ` + type Query { + shape(shape: Shape): ShapeObj! + } + + enum Color { + RED + BLUE + } + + enum Shape { + ROUND + SQUARE + } + + type ShapeObj { + id: ID! + shape: Shape! + } + `, + ], + documents: /* GraphQL */ ` + query Shape { + shape { + id + shape + } + } + `, + + generates: { + 'out1/': { + preset, + }, + }, + }); + + const graphqlFile = result.find(file => file.filename === 'out1/graphql.ts'); + expect(graphqlFile.content).toMatchInlineSnapshot(` + "/* eslint-disable */ + import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; + type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; + export type ShapeQueryVariables = Exact<{ [key: string]: never; }>; + + + export type ShapeQuery = { __typename?: 'Query', shape: { __typename?: 'ShapeObj', id: string, shape: Shape } }; + + + export const ShapeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Shape"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"shape"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"shape"}}]}}]}}]} as unknown as DocumentNode;" + `); + }); + + it('supports config.enumType=const', async () => { + const { result } = await executeCodegen({ + schema: [ + /* GraphQL */ ` + type Query { + shape(shape: Shape): ShapeObj! + } + + enum Shape { + ROUND + SQUARE + } + + type ShapeObj { + id: ID! + shape: Shape! + } + `, + ], + documents: /* GraphQL */ ` + query Shape($shape: Shape) { + shape(shape: $shape) { + id + } + } + `, + + generates: { + 'out1/': { + preset, + config: { + enumType: 'const', + }, + }, + }, + }); + + const graphqlFile = result.find(file => file.filename === 'out1/graphql.ts'); + expect(graphqlFile.content).toMatchInlineSnapshot(` + "/* eslint-disable */ + import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; + type Exact = { [K in keyof T]: T[K] }; + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; + export const Shape = { + Round: 'ROUND', + Square: 'SQUARE' + } as const; + + export type Shape = typeof Shape[keyof typeof Shape]; + export type ShapeQueryVariables = Exact<{ + shape?: Shape | null; + }>; + + + export type ShapeQuery = { __typename?: 'Query', shape: { __typename?: 'ShapeObj', id: string } }; + + + export const ShapeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Shape"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"shape"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Shape"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"shape"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"shape"},"value":{"kind":"Variable","name":{"kind":"Name","value":"shape"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode;" + `); + }); +}); diff --git a/packages/presets/client/tests/client-preset.spec.ts b/packages/presets/client/tests/client-preset.spec.ts index 911eb3d2981..7213fc3dee0 100644 --- a/packages/presets/client/tests/client-preset.spec.ts +++ b/packages/presets/client/tests/client-preset.spec.ts @@ -363,29 +363,8 @@ export * from "./gql";`); expect(graphqlFile.content).toMatchInlineSnapshot(` "/* eslint-disable */ import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export type Query = { - __typename?: 'Query'; - a?: Maybe; - b?: Maybe; - c?: Maybe; - }; - + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type AQueryVariables = Exact<{ [key: string]: never; }>; @@ -499,29 +478,8 @@ export * from "./gql";`); expect(graphqlFile.content).toMatchInlineSnapshot(` "/* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export type Query = { - __typename: 'Query'; - a?: Maybe; - b?: Maybe; - c?: Maybe; - }; - + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type AQueryVariables = Exact<{ [key: string]: never; }>; @@ -538,8 +496,6 @@ export * from "./gql";`); export const ADocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"A"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"a"}}]}}]} as unknown as DocumentNode; export const BDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"B"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"b"}}]}}]} as unknown as DocumentNode;" `); - - expect(graphqlFile.content).toContain("__typename: 'Query';"); }); it('supports Apollo fragment masking', async () => { @@ -588,34 +544,8 @@ export * from "./gql";`); expect(graphqlFile.content).toMatchInlineSnapshot(` "/* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export type Query = { - __typename?: 'Query'; - me?: Maybe; - }; - - export type User = { - __typename?: 'User'; - age: Scalars['Int']['output']; - id: Scalars['ID']['output']; - name: Scalars['String']['output']; - }; - + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type MeQueryVariables = Exact<{ [key: string]: never; }>; @@ -705,27 +635,8 @@ export * from "./gql";`); expect(graphqlFile.content).toMatchInlineSnapshot(` "/* eslint-disable */ import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export type Query = { - __typename?: 'Query'; - a?: Maybe; - }; - + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type AQueryVariables = Exact<{ [key: string]: never; }>; @@ -1411,29 +1322,8 @@ export * from "./gql.js";`); expect(graphqlFile.content).toMatchInlineSnapshot(` "/* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export type Query = { - __typename?: 'Query'; - a?: Maybe; - b?: Maybe; - c?: Maybe; - }; - + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type BbbQueryVariables = Exact<{ [key: string]: never; }>; @@ -1489,29 +1379,8 @@ export * from "./gql.js";`); expect(graphqlFile.content).toMatchInlineSnapshot(` "/* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export type Query = { - __typename?: 'Query'; - a?: Maybe; - b?: Maybe; - c?: Maybe; - }; - + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type AQueryVariables = Exact<{ [key: string]: never; }>; @@ -1570,29 +1439,8 @@ export * from "./gql.js";`); expect(graphqlFile.content).toMatchInlineSnapshot(` "/* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export type Query = { - __typename?: 'Query'; - a?: Maybe; - b?: Maybe; - c?: Maybe; - }; - + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type AQueryVariables = Exact<{ [key: string]: never; }>; @@ -1651,29 +1499,8 @@ export * from "./gql.js";`); expect(graphqlFile.content).toMatchInlineSnapshot(` "/* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export type Query = { - __typename?: 'Query'; - a?: Maybe; - b?: Maybe; - c?: Maybe; - }; - + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type AQueryVariables = Exact<{ [key: string]: never; }>; @@ -1734,29 +1561,8 @@ export * from "./gql.js";`); expect(graphqlFile.content).toMatchInlineSnapshot(` "/* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export type Query = { - __typename?: 'Query'; - a?: Maybe; - b?: Maybe; - c?: Maybe; - }; - + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type AaaQueryVariables = Exact<{ [key: string]: never; }>; @@ -1813,29 +1619,8 @@ export * from "./gql.js";`); expect(graphqlFile.content).toMatchInlineSnapshot(` "/* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export type Query = { - __typename?: 'Query'; - a?: Maybe; - b?: Maybe; - c?: Maybe; - }; - + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type AQueryVariables = Exact<{ [key: string]: never; }>; @@ -1898,29 +1683,8 @@ export * from "./gql.js";`); expect(graphqlFile.content).toMatchInlineSnapshot(` "/* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export type Query = { - __typename?: 'Query'; - a?: Maybe; - b?: Maybe; - c?: Maybe; - }; - + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type AQueryVariables = Exact<{ [key: string]: never; }>; @@ -1984,29 +1748,8 @@ export * from "./gql.js";`); expect(graphqlFile.content).toMatchInlineSnapshot(` "/* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export type Query = { - __typename?: 'Query'; - a?: Maybe; - b?: Maybe; - c?: Maybe; - }; - + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type AQueryVariables = Exact<{ [key: string]: never; }>; @@ -2070,29 +1813,8 @@ export * from "./gql.js";`); expect(graphqlFile.content).toMatchInlineSnapshot(` "/* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export type Query = { - __typename?: 'Query'; - a?: Maybe; - b?: Maybe; - c?: Maybe; - }; - + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type AQueryVariables = Exact<{ [key: string]: never; }>; @@ -2162,33 +1884,8 @@ export * from "./gql.js";`); expect(graphqlFile.content).toMatchInlineSnapshot(` "/* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export type A = { - __typename?: 'A'; - a: A; - b: Scalars['String']['output']; - }; - - export type Query = { - __typename?: 'Query'; - a: A; - }; - + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type AbFragment = ( { __typename?: 'A', b: string } & { ' $fragmentRefs'?: { 'AcFragment': AcFragment;'AaFragment': AaFragment } } @@ -2241,34 +1938,8 @@ export * from "./gql.js";`); expect(graphqlFile.content).toMatchInlineSnapshot(` "/* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export type Foo = { - __typename?: 'Foo'; - id?: Maybe; - value?: Maybe; - }; - - export type Query = { - __typename?: 'Query'; - foo?: Maybe; - foos?: Maybe>>; - }; - + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type FooQueryVariables = Exact<{ [key: string]: never; }>; @@ -2332,34 +2003,8 @@ export * from "./gql.js";`); expect(graphqlFile.content).toMatchInlineSnapshot(` "/* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export type Foo = { - __typename?: 'Foo'; - id?: Maybe; - value?: Maybe; - }; - - export type Query = { - __typename?: 'Query'; - foo?: Maybe; - foos?: Maybe>>; - }; - + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type FooQueryVariables = Exact<{ [key: string]: never; }>; @@ -2423,34 +2068,8 @@ export * from "./gql.js";`); expect(graphqlFile.content).toMatchInlineSnapshot(` "/* eslint-disable */ import { DocumentTypeDecoration } from '@graphql-typed-document-node/core'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export type Foo = { - __typename?: 'Foo'; - id?: Maybe; - value?: Maybe; - }; - - export type Query = { - __typename?: 'Query'; - foo?: Maybe; - foos?: Maybe>>; - }; - + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type FooQueryVariables = Exact<{ [key: string]: never; }>; @@ -2587,34 +2206,8 @@ export * from "./gql.js";`); expect(graphqlFile.content).toMatchInlineSnapshot(` "/* eslint-disable */ import { DocumentTypeDecoration } from '@graphql-typed-document-node/core'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export type Foo = { - __typename?: 'Foo'; - id?: Maybe; - value?: Maybe; - }; - - export type Query = { - __typename?: 'Query'; - foo?: Maybe; - foos?: Maybe>>; - }; - + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type FooQueryVariables = Exact<{ [key: string]: never; }>; @@ -2749,33 +2342,8 @@ export * from "./gql.js";`); expect(graphqlFile.content).toMatchInlineSnapshot(` "/* eslint-disable */ import { DocumentTypeDecoration } from '@graphql-typed-document-node/core'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export type Foo = { - __typename?: 'Foo'; - value?: Maybe; - }; - - export type Query = { - __typename?: 'Query'; - foo?: Maybe; - foos?: Maybe>>; - }; - + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type FooQueryVariables = Exact<{ [key: string]: never; }>; @@ -3043,51 +2611,11 @@ export * from "./gql.js";`); }); const graphqlFile = result.find(file => file.filename === 'out1/graphql.ts'); - expect(graphqlFile.content).toBeSimilarStringTo(` - /* eslint-disable */ + expect(graphqlFile.content).toMatchInlineSnapshot(` + "/* eslint-disable */ import { DocumentTypeDecoration } from '@graphql-typed-document-node/core'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export type Mutation = { - __typename?: 'Mutation'; - createRegion?: Maybe; - }; - - - export type MutationCreateRegionArgs = { - regionDescription: Scalars['String']['input']; - }; - - export type Query = { - __typename?: 'Query'; - regions?: Maybe>>; - }; - - export type Region = { - __typename?: 'Region'; - regionDescription: Scalars['String']['output']; - regionId: Scalars['Int']['output']; - }; - - export type Subscription = { - __typename?: 'Subscription'; - onRegionCreated: Region; - }; - + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type OnRegionCreatedSubscriptionVariables = Exact<{ [key: string]: never; }>; @@ -3120,127 +2648,11 @@ export * from "./gql.js";`); regionDescription } } - \`) as unknown as TypedDocumentString; + \`) as unknown as TypedDocumentString;" `); }); }); - it('support enumsAsConst option', async () => { - const { result } = await executeCodegen({ - schema: [ - /* GraphQL */ ` - type Query { - thing: Thing - } - type Thing { - color: Color! - } - enum Color { - RED - BLUE - } - `, - ], - documents: path.join(__dirname, 'fixtures/enum.ts'), - generates: { - 'out1/': { - preset, - config: { - enumsAsConst: true, - }, - }, - }, - }); - const graphqlFile = result.find(file => file.filename === 'out1/graphql.ts'); - expect(graphqlFile.content).toBeSimilarStringTo(` - /* eslint-disable */ - import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; - type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export const Color = { - Blue: 'BLUE', - Red: 'RED' - } as const; - - export type Color = typeof Color[keyof typeof Color]; - export type Query = { - __typename?: 'Query'; - thing?: Maybe; - }; - - export type Thing = { - __typename?: 'Thing'; - color: Color; - }; - - export type FavoriteColorQueryVariables = Exact<{ [key: string]: never; }>; - - - export type FavoriteColorQuery = { __typename?: 'Query', thing?: { __typename?: 'Thing', color: Color } | null }; - - - export const FavoriteColorDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FavoriteColor"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"thing"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"color"}}]}}]}}]} as unknown as DocumentNode; - `); - }); - - it('support enumValues option', async () => { - const { result } = await executeCodegen({ - schema: [ - /* GraphQL */ ` - enum Color { - RED - BLUE - } - `, - ], - generates: { - 'out1/': { - preset, - config: { - enumValues: { - Color: './fixtures/with-enum-values#MyColor', - }, - }, - }, - }, - }); - - const graphqlFile = result.find(file => file.filename === 'out1/graphql.ts'); - expect(graphqlFile.content).toBeSimilarStringTo(`/* eslint-disable */ - import { MyColor as Color } from './fixtures/with-enum-values'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; - type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export { Color };`); - }); - it('supports immutableTypes', async () => { const { result } = await executeCodegen({ schema: [ @@ -3279,39 +2691,8 @@ export * from "./gql.js";`); expect(graphqlFile.content).toMatchInlineSnapshot(` "/* eslint-disable */ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - export type Maybe = T | null; - export type InputMaybe = T | null | undefined; - export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; - export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; - export type MakeEmpty = { [_ in K]?: never }; - export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; type Exact = { [K in keyof T]: T[K] }; - /** All built-in and custom scalars, mapped to their actual values */ - export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - }; - - export type Query = { - readonly __typename?: 'Query'; - readonly user?: Maybe; - }; - - - export type QueryUserArgs = { - id: Scalars['ID']['input']; - }; - - export type User = { - readonly __typename?: 'User'; - readonly friends: ReadonlyArray; - readonly id: Scalars['ID']['output']; - readonly name: Scalars['String']['output']; - }; - + export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type Test_UserQueryVariables = Exact<{ [key: string]: never; }>;