···11+---
22+"@0no-co/graphqlsp": minor
33+---
44+55+only run the `typescript` plugin once to generate a set of types that we'll reference from our
66+`typescript-operations`, this to reduce lengthy generated files.
+105
packages/example/__generated__/baseGraphQLSP.ts
···11+export type Maybe<T> = T | null;
22+export type InputMaybe<T> = Maybe<T>;
33+export type Exact<T extends { [key: string]: unknown }> = {
44+ [K in keyof T]: T[K];
55+};
66+export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
77+ [SubKey in K]?: Maybe<T[SubKey]>;
88+};
99+export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
1010+ [SubKey in K]: Maybe<T[SubKey]>;
1111+};
1212+/** All built-in and custom scalars, mapped to their actual values */
1313+export type Scalars = {
1414+ ID: string;
1515+ String: string;
1616+ Boolean: boolean;
1717+ Int: number;
1818+ Float: number;
1919+};
2020+2121+/** Elemental property associated with either a Pokémon or one of their moves. */
2222+export type PokemonType =
2323+ | 'Grass'
2424+ | 'Poison'
2525+ | 'Fire'
2626+ | 'Flying'
2727+ | 'Water'
2828+ | 'Bug'
2929+ | 'Normal'
3030+ | 'Electric'
3131+ | 'Ground'
3232+ | 'Fairy'
3333+ | 'Fighting'
3434+ | 'Psychic'
3535+ | 'Rock'
3636+ | 'Steel'
3737+ | 'Ice'
3838+ | 'Ghost'
3939+ | 'Dragon'
4040+ | 'Dark';
4141+4242+/** Move a Pokémon can perform with the associated damage and type. */
4343+export type Attack = {
4444+ __typename?: 'Attack';
4545+ name?: Maybe<Scalars['String']>;
4646+ type?: Maybe<PokemonType>;
4747+ damage?: Maybe<Scalars['Int']>;
4848+};
4949+5050+/** Requirement that prevents an evolution through regular means of levelling up. */
5151+export type EvolutionRequirement = {
5252+ __typename?: 'EvolutionRequirement';
5353+ amount?: Maybe<Scalars['Int']>;
5454+ name?: Maybe<Scalars['String']>;
5555+};
5656+5757+export type PokemonDimension = {
5858+ __typename?: 'PokemonDimension';
5959+ minimum?: Maybe<Scalars['String']>;
6060+ maximum?: Maybe<Scalars['String']>;
6161+};
6262+6363+export type AttacksConnection = {
6464+ __typename?: 'AttacksConnection';
6565+ fast?: Maybe<Array<Maybe<Attack>>>;
6666+ special?: Maybe<Array<Maybe<Attack>>>;
6767+};
6868+6969+export type Pokemon = {
7070+ __typename?: 'Pokemon';
7171+ id: Scalars['ID'];
7272+ name: Scalars['String'];
7373+ classification?: Maybe<Scalars['String']>;
7474+ types?: Maybe<Array<Maybe<PokemonType>>>;
7575+ resistant?: Maybe<Array<Maybe<PokemonType>>>;
7676+ weaknesses?: Maybe<Array<Maybe<PokemonType>>>;
7777+ evolutionRequirements?: Maybe<Array<Maybe<EvolutionRequirement>>>;
7878+ weight?: Maybe<PokemonDimension>;
7979+ height?: Maybe<PokemonDimension>;
8080+ attacks?: Maybe<AttacksConnection>;
8181+ /** Likelihood of an attempt to catch a Pokémon to fail. */
8282+ fleeRate?: Maybe<Scalars['Float']>;
8383+ /** Maximum combat power a Pokémon may achieve at max level. */
8484+ maxCP?: Maybe<Scalars['Int']>;
8585+ /** Maximum health points a Pokémon may achieve at max level. */
8686+ maxHP?: Maybe<Scalars['Int']>;
8787+ evolutions?: Maybe<Array<Maybe<Pokemon>>>;
8888+};
8989+9090+export type Query = {
9191+ __typename?: 'Query';
9292+ /** List out all Pokémon, optionally in pages */
9393+ pokemons?: Maybe<Array<Maybe<Pokemon>>>;
9494+ /** Get a single Pokémon by its ID, a three character long identifier padded with zeroes */
9595+ pokemon?: Maybe<Pokemon>;
9696+};
9797+9898+export type QueryPokemonsArgs = {
9999+ limit?: InputMaybe<Scalars['Int']>;
100100+ skip?: InputMaybe<Scalars['Int']>;
101101+};
102102+103103+export type QueryPokemonArgs = {
104104+ id: Scalars['ID'];
105105+};
+1-106
packages/example/src/Pokemon.generated.ts
···11+import * as Types from '../__generated__/baseGraphQLSP';
12import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
22-export type Maybe<T> = T | null;
33-export type InputMaybe<T> = Maybe<T>;
44-export type Exact<T extends { [key: string]: unknown }> = {
55- [K in keyof T]: T[K];
66-};
77-export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
88- [SubKey in K]?: Maybe<T[SubKey]>;
99-};
1010-export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
1111- [SubKey in K]: Maybe<T[SubKey]>;
1212-};
1313-/** All built-in and custom scalars, mapped to their actual values */
1414-export type Scalars = {
1515- ID: string;
1616- String: string;
1717- Boolean: boolean;
1818- Int: number;
1919- Float: number;
2020-};
2121-2222-/** Elemental property associated with either a Pokémon or one of their moves. */
2323-export type PokemonType =
2424- | 'Grass'
2525- | 'Poison'
2626- | 'Fire'
2727- | 'Flying'
2828- | 'Water'
2929- | 'Bug'
3030- | 'Normal'
3131- | 'Electric'
3232- | 'Ground'
3333- | 'Fairy'
3434- | 'Fighting'
3535- | 'Psychic'
3636- | 'Rock'
3737- | 'Steel'
3838- | 'Ice'
3939- | 'Ghost'
4040- | 'Dragon'
4141- | 'Dark';
4242-4343-/** Move a Pokémon can perform with the associated damage and type. */
4444-export type Attack = {
4545- __typename?: 'Attack';
4646- name?: Maybe<Scalars['String']>;
4747- type?: Maybe<PokemonType>;
4848- damage?: Maybe<Scalars['Int']>;
4949-};
5050-5151-/** Requirement that prevents an evolution through regular means of levelling up. */
5252-export type EvolutionRequirement = {
5353- __typename?: 'EvolutionRequirement';
5454- amount?: Maybe<Scalars['Int']>;
5555- name?: Maybe<Scalars['String']>;
5656-};
5757-5858-export type PokemonDimension = {
5959- __typename?: 'PokemonDimension';
6060- minimum?: Maybe<Scalars['String']>;
6161- maximum?: Maybe<Scalars['String']>;
6262-};
6363-6464-export type AttacksConnection = {
6565- __typename?: 'AttacksConnection';
6666- fast?: Maybe<Array<Maybe<Attack>>>;
6767- special?: Maybe<Array<Maybe<Attack>>>;
6868-};
6969-7070-export type Pokemon = {
7171- __typename?: 'Pokemon';
7272- id: Scalars['ID'];
7373- name: Scalars['String'];
7474- classification?: Maybe<Scalars['String']>;
7575- types?: Maybe<Array<Maybe<PokemonType>>>;
7676- resistant?: Maybe<Array<Maybe<PokemonType>>>;
7777- weaknesses?: Maybe<Array<Maybe<PokemonType>>>;
7878- evolutionRequirements?: Maybe<Array<Maybe<EvolutionRequirement>>>;
7979- weight?: Maybe<PokemonDimension>;
8080- height?: Maybe<PokemonDimension>;
8181- attacks?: Maybe<AttacksConnection>;
8282- /** Likelihood of an attempt to catch a Pokémon to fail. */
8383- fleeRate?: Maybe<Scalars['Float']>;
8484- /** Maximum combat power a Pokémon may achieve at max level. */
8585- maxCP?: Maybe<Scalars['Int']>;
8686- /** Maximum health points a Pokémon may achieve at max level. */
8787- maxHP?: Maybe<Scalars['Int']>;
8888- evolutions?: Maybe<Array<Maybe<Pokemon>>>;
8989-};
9090-9191-export type Query = {
9292- __typename?: 'Query';
9393- /** List out all Pokémon, optionally in pages */
9494- pokemons?: Maybe<Array<Maybe<Pokemon>>>;
9595- /** Get a single Pokémon by its ID, a three character long identifier padded with zeroes */
9696- pokemon?: Maybe<Pokemon>;
9797-};
9898-9999-export type QueryPokemonsArgs = {
100100- limit?: InputMaybe<Scalars['Int']>;
101101- skip?: InputMaybe<Scalars['Int']>;
102102-};
103103-104104-export type QueryPokemonArgs = {
105105- id: Scalars['ID'];
106106-};
107107-1083export type FieldsFragment = {
1094 __typename?: 'Pokemon';
1105 classification?: string | null;
+4-109
packages/example/src/index.generated.ts
···11+import * as Types from '../__generated__/baseGraphQLSP';
12import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
22-export type Maybe<T> = T | null;
33-export type InputMaybe<T> = Maybe<T>;
44-export type Exact<T extends { [key: string]: unknown }> = {
55- [K in keyof T]: T[K];
66-};
77-export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
88- [SubKey in K]?: Maybe<T[SubKey]>;
99-};
1010-export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
1111- [SubKey in K]: Maybe<T[SubKey]>;
1212-};
1313-/** All built-in and custom scalars, mapped to their actual values */
1414-export type Scalars = {
1515- ID: string;
1616- String: string;
1717- Boolean: boolean;
1818- Int: number;
1919- Float: number;
2020-};
2121-2222-/** Elemental property associated with either a Pokémon or one of their moves. */
2323-export type PokemonType =
2424- | 'Grass'
2525- | 'Poison'
2626- | 'Fire'
2727- | 'Flying'
2828- | 'Water'
2929- | 'Bug'
3030- | 'Normal'
3131- | 'Electric'
3232- | 'Ground'
3333- | 'Fairy'
3434- | 'Fighting'
3535- | 'Psychic'
3636- | 'Rock'
3737- | 'Steel'
3838- | 'Ice'
3939- | 'Ghost'
4040- | 'Dragon'
4141- | 'Dark';
4242-4343-/** Move a Pokémon can perform with the associated damage and type. */
4444-export type Attack = {
4545- __typename?: 'Attack';
4646- name?: Maybe<Scalars['String']>;
4747- type?: Maybe<PokemonType>;
4848- damage?: Maybe<Scalars['Int']>;
4949-};
5050-5151-/** Requirement that prevents an evolution through regular means of levelling up. */
5252-export type EvolutionRequirement = {
5353- __typename?: 'EvolutionRequirement';
5454- amount?: Maybe<Scalars['Int']>;
5555- name?: Maybe<Scalars['String']>;
5656-};
5757-5858-export type PokemonDimension = {
5959- __typename?: 'PokemonDimension';
6060- minimum?: Maybe<Scalars['String']>;
6161- maximum?: Maybe<Scalars['String']>;
6262-};
6363-6464-export type AttacksConnection = {
6565- __typename?: 'AttacksConnection';
6666- fast?: Maybe<Array<Maybe<Attack>>>;
6767- special?: Maybe<Array<Maybe<Attack>>>;
6868-};
6969-7070-export type Pokemon = {
7171- __typename?: 'Pokemon';
7272- id: Scalars['ID'];
7373- name: Scalars['String'];
7474- classification?: Maybe<Scalars['String']>;
7575- types?: Maybe<Array<Maybe<PokemonType>>>;
7676- resistant?: Maybe<Array<Maybe<PokemonType>>>;
7777- weaknesses?: Maybe<Array<Maybe<PokemonType>>>;
7878- evolutionRequirements?: Maybe<Array<Maybe<EvolutionRequirement>>>;
7979- weight?: Maybe<PokemonDimension>;
8080- height?: Maybe<PokemonDimension>;
8181- attacks?: Maybe<AttacksConnection>;
8282- /** Likelihood of an attempt to catch a Pokémon to fail. */
8383- fleeRate?: Maybe<Scalars['Float']>;
8484- /** Maximum combat power a Pokémon may achieve at max level. */
8585- maxCP?: Maybe<Scalars['Int']>;
8686- /** Maximum health points a Pokémon may achieve at max level. */
8787- maxHP?: Maybe<Scalars['Int']>;
8888- evolutions?: Maybe<Array<Maybe<Pokemon>>>;
8989-};
9090-9191-export type Query = {
9292- __typename?: 'Query';
9393- /** List out all Pokémon, optionally in pages */
9494- pokemons?: Maybe<Array<Maybe<Pokemon>>>;
9595- /** Get a single Pokémon by its ID, a three character long identifier padded with zeroes */
9696- pokemon?: Maybe<Pokemon>;
9797-};
9898-9999-export type QueryPokemonsArgs = {
100100- limit?: InputMaybe<Scalars['Int']>;
101101- skip?: InputMaybe<Scalars['Int']>;
102102-};
103103-104104-export type QueryPokemonArgs = {
105105- id: Scalars['ID'];
106106-};
107107-108108-export type PokemonsQueryVariables = Exact<{ [key: string]: never }>;
33+export type PokemonsQueryVariables = Types.Exact<{ [key: string]: never }>;
10941105export type PokemonsQuery = {
1116 __typename?: 'Query';
···12318 name: string;
12419};
12520126126-export type PokemonQueryVariables = Exact<{
127127- id: Scalars['ID'];
2121+export type PokemonQueryVariables = Types.Exact<{
2222+ id: Types.Scalars['ID'];
12823}>;
1292413025export type PokemonQuery = {