From 8d1dd94014c1f76f9ccdff5be8ac8771529c9d67 Mon Sep 17 00:00:00 2001 From: Phil Pluckthun Date: Mon, 22 Jan 2024 17:30:44 +0000 Subject: [PATCH] example: Upgrade @0no-co/graphqlsp --- examples/example-pokemon-api/package.json | 2 +- .../schema/graphql-env.d.ts | 715 +++++++++--------- pnpm-lock.yaml | 8 +- 3 files changed, 364 insertions(+), 361 deletions(-) diff --git a/examples/example-pokemon-api/package.json b/examples/example-pokemon-api/package.json index c8cdc0f8..ea352aea 100644 --- a/examples/example-pokemon-api/package.json +++ b/examples/example-pokemon-api/package.json @@ -13,7 +13,7 @@ "urql": "^4.0.6" }, "devDependencies": { - "@0no-co/graphqlsp": "^1.0.5", + "@0no-co/graphqlsp": "^1.1.2", "@types/react": "^18.2.47", "@types/react-dom": "^18.2.18", "@vitejs/plugin-react": "^4.2.1", diff --git a/examples/example-pokemon-api/schema/graphql-env.d.ts b/examples/example-pokemon-api/schema/graphql-env.d.ts index 4b799e00..8d524386 100644 --- a/examples/example-pokemon-api/schema/graphql-env.d.ts +++ b/examples/example-pokemon-api/schema/graphql-env.d.ts @@ -1,3 +1,6 @@ +/* eslint-disable */ +/* prettier-ignore */ + /** An IntrospectionQuery representation of your schema. * * @remarks @@ -7,428 +10,428 @@ * instead save to a .ts instead of a .d.ts file. */ export type introspection = { - __schema: { - queryType: { - name: 'Query'; - }; - mutationType: null; - subscriptionType: null; - types: [ + "__schema": { + "queryType": { + "name": "Query" + }, + "mutationType": null, + "subscriptionType": null, + "types": [ { - kind: 'OBJECT'; - name: 'Attack'; - fields: [ - { - name: 'damage'; - type: { - kind: 'SCALAR'; - name: 'Int'; - ofType: null; - }; - args: []; - }, - { - name: 'name'; - type: { - kind: 'SCALAR'; - name: 'String'; - ofType: null; - }; - args: []; - }, - { - name: 'type'; - type: { - kind: 'ENUM'; - name: 'PokemonType'; - ofType: null; - }; - args: []; - }, - ]; - interfaces: []; + "kind": "OBJECT", + "name": "Attack", + "fields": [ + { + "name": "damage", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "args": [] + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "args": [] + }, + { + "name": "type", + "type": { + "kind": "ENUM", + "name": "PokemonType", + "ofType": null + }, + "args": [] + } + ], + "interfaces": [] }, { - kind: 'SCALAR'; - name: 'Int'; + "kind": "SCALAR", + "name": "Int" }, { - kind: 'SCALAR'; - name: 'String'; + "kind": "SCALAR", + "name": "String" }, { - kind: 'OBJECT'; - name: 'AttacksConnection'; - fields: [ - { - name: 'fast'; - type: { - kind: 'LIST'; - ofType: { - kind: 'OBJECT'; - name: 'Attack'; - ofType: null; - }; - }; - args: []; - }, - { - name: 'special'; - type: { - kind: 'LIST'; - ofType: { - kind: 'OBJECT'; - name: 'Attack'; - ofType: null; - }; - }; - args: []; - }, - ]; - interfaces: []; + "kind": "OBJECT", + "name": "AttacksConnection", + "fields": [ + { + "name": "fast", + "type": { + "kind": "LIST", + "ofType": { + "kind": "OBJECT", + "name": "Attack", + "ofType": null + } + }, + "args": [] + }, + { + "name": "special", + "type": { + "kind": "LIST", + "ofType": { + "kind": "OBJECT", + "name": "Attack", + "ofType": null + } + }, + "args": [] + } + ], + "interfaces": [] }, { - kind: 'OBJECT'; - name: 'EvolutionRequirement'; - fields: [ - { - name: 'amount'; - type: { - kind: 'SCALAR'; - name: 'Int'; - ofType: null; - }; - args: []; - }, - { - name: 'name'; - type: { - kind: 'SCALAR'; - name: 'String'; - ofType: null; - }; - args: []; - }, - ]; - interfaces: []; + "kind": "OBJECT", + "name": "EvolutionRequirement", + "fields": [ + { + "name": "amount", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "args": [] + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "args": [] + } + ], + "interfaces": [] }, { - kind: 'OBJECT'; - name: 'Pokemon'; - fields: [ - { - name: 'attacks'; - type: { - kind: 'OBJECT'; - name: 'AttacksConnection'; - ofType: null; - }; - args: []; - }, - { - name: 'classification'; - type: { - kind: 'SCALAR'; - name: 'String'; - ofType: null; - }; - args: []; - }, - { - name: 'evolutionRequirements'; - type: { - kind: 'LIST'; - ofType: { - kind: 'OBJECT'; - name: 'EvolutionRequirement'; - ofType: null; - }; - }; - args: []; - }, - { - name: 'evolutions'; - type: { - kind: 'LIST'; - ofType: { - kind: 'OBJECT'; - name: 'Pokemon'; - ofType: null; - }; - }; - args: []; - }, - { - name: 'fleeRate'; - type: { - kind: 'SCALAR'; - name: 'Float'; - ofType: null; - }; - args: []; - }, - { - name: 'height'; - type: { - kind: 'OBJECT'; - name: 'PokemonDimension'; - ofType: null; - }; - args: []; - }, - { - name: 'id'; - type: { - kind: 'NON_NULL'; - ofType: { - kind: 'SCALAR'; - name: 'ID'; - ofType: null; - }; - }; - args: []; - }, - { - name: 'maxCP'; - type: { - kind: 'SCALAR'; - name: 'Int'; - ofType: null; - }; - args: []; - }, - { - name: 'maxHP'; - type: { - kind: 'SCALAR'; - name: 'Int'; - ofType: null; - }; - args: []; - }, - { - name: 'name'; - type: { - kind: 'NON_NULL'; - ofType: { - kind: 'SCALAR'; - name: 'String'; - ofType: null; - }; - }; - args: []; - }, - { - name: 'resistant'; - type: { - kind: 'LIST'; - ofType: { - kind: 'ENUM'; - name: 'PokemonType'; - ofType: null; - }; - }; - args: []; - }, - { - name: 'types'; - type: { - kind: 'LIST'; - ofType: { - kind: 'ENUM'; - name: 'PokemonType'; - ofType: null; - }; - }; - args: []; - }, - { - name: 'weaknesses'; - type: { - kind: 'LIST'; - ofType: { - kind: 'ENUM'; - name: 'PokemonType'; - ofType: null; - }; - }; - args: []; - }, - { - name: 'weight'; - type: { - kind: 'OBJECT'; - name: 'PokemonDimension'; - ofType: null; - }; - args: []; - }, - ]; - interfaces: []; + "kind": "OBJECT", + "name": "Pokemon", + "fields": [ + { + "name": "attacks", + "type": { + "kind": "OBJECT", + "name": "AttacksConnection", + "ofType": null + }, + "args": [] + }, + { + "name": "classification", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "args": [] + }, + { + "name": "evolutionRequirements", + "type": { + "kind": "LIST", + "ofType": { + "kind": "OBJECT", + "name": "EvolutionRequirement", + "ofType": null + } + }, + "args": [] + }, + { + "name": "evolutions", + "type": { + "kind": "LIST", + "ofType": { + "kind": "OBJECT", + "name": "Pokemon", + "ofType": null + } + }, + "args": [] + }, + { + "name": "fleeRate", + "type": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + }, + "args": [] + }, + { + "name": "height", + "type": { + "kind": "OBJECT", + "name": "PokemonDimension", + "ofType": null + }, + "args": [] + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "args": [] + }, + { + "name": "maxCP", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "args": [] + }, + { + "name": "maxHP", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "args": [] + }, + { + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "args": [] + }, + { + "name": "resistant", + "type": { + "kind": "LIST", + "ofType": { + "kind": "ENUM", + "name": "PokemonType", + "ofType": null + } + }, + "args": [] + }, + { + "name": "types", + "type": { + "kind": "LIST", + "ofType": { + "kind": "ENUM", + "name": "PokemonType", + "ofType": null + } + }, + "args": [] + }, + { + "name": "weaknesses", + "type": { + "kind": "LIST", + "ofType": { + "kind": "ENUM", + "name": "PokemonType", + "ofType": null + } + }, + "args": [] + }, + { + "name": "weight", + "type": { + "kind": "OBJECT", + "name": "PokemonDimension", + "ofType": null + }, + "args": [] + } + ], + "interfaces": [] }, { - kind: 'SCALAR'; - name: 'Float'; + "kind": "SCALAR", + "name": "Float" }, { - kind: 'SCALAR'; - name: 'ID'; + "kind": "SCALAR", + "name": "ID" }, { - kind: 'OBJECT'; - name: 'PokemonDimension'; - fields: [ - { - name: 'maximum'; - type: { - kind: 'SCALAR'; - name: 'String'; - ofType: null; - }; - args: []; - }, - { - name: 'minimum'; - type: { - kind: 'SCALAR'; - name: 'String'; - ofType: null; - }; - args: []; - }, - ]; - interfaces: []; + "kind": "OBJECT", + "name": "PokemonDimension", + "fields": [ + { + "name": "maximum", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "args": [] + }, + { + "name": "minimum", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "args": [] + } + ], + "interfaces": [] }, { - kind: 'ENUM'; - name: 'PokemonType'; - enumValues: [ + "kind": "ENUM", + "name": "PokemonType", + "enumValues": [ { - name: 'Bug'; + "name": "Bug" }, { - name: 'Dark'; + "name": "Dark" }, { - name: 'Dragon'; + "name": "Dragon" }, { - name: 'Electric'; + "name": "Electric" }, { - name: 'Fairy'; + "name": "Fairy" }, { - name: 'Fighting'; + "name": "Fighting" }, { - name: 'Fire'; + "name": "Fire" }, { - name: 'Flying'; + "name": "Flying" }, { - name: 'Ghost'; + "name": "Ghost" }, { - name: 'Grass'; + "name": "Grass" }, { - name: 'Ground'; + "name": "Ground" }, { - name: 'Ice'; + "name": "Ice" }, { - name: 'Normal'; + "name": "Normal" }, { - name: 'Poison'; + "name": "Poison" }, { - name: 'Psychic'; + "name": "Psychic" }, { - name: 'Rock'; + "name": "Rock" }, { - name: 'Steel'; + "name": "Steel" }, { - name: 'Water'; - }, - ]; + "name": "Water" + } + ] }, { - kind: 'OBJECT'; - name: 'Query'; - fields: [ - { - name: 'pokemon'; - type: { - kind: 'OBJECT'; - name: 'Pokemon'; - ofType: null; - }; - args: [ + "kind": "OBJECT", + "name": "Query", + "fields": [ + { + "name": "pokemon", + "type": { + "kind": "OBJECT", + "name": "Pokemon", + "ofType": null + }, + "args": [ { - name: 'id'; - type: { - kind: 'NON_NULL'; - ofType: { - kind: 'SCALAR'; - name: 'ID'; - ofType: null; - }; - }; - }, - ]; - }, - { - name: 'pokemons'; - type: { - kind: 'LIST'; - ofType: { - kind: 'OBJECT'; - name: 'Pokemon'; - ofType: null; - }; - }; - args: [ + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + } + ] + }, + { + "name": "pokemons", + "type": { + "kind": "LIST", + "ofType": { + "kind": "OBJECT", + "name": "Pokemon", + "ofType": null + } + }, + "args": [ { - name: 'limit'; - type: { - kind: 'SCALAR'; - name: 'Int'; - ofType: null; - }; + "name": "limit", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } }, { - name: 'skip'; - type: { - kind: 'SCALAR'; - name: 'Int'; - ofType: null; - }; - }, - ]; - }, - ]; - interfaces: []; + "name": "skip", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + } + ] + } + ], + "interfaces": [] }, { - kind: 'SCALAR'; - name: 'Boolean'; - }, - ]; - directives: []; - }; + "kind": "SCALAR", + "name": "Boolean" + } + ], + "directives": [] + } }; import * as gqlTada from 'gql.tada'; declare module 'gql.tada' { interface setupSchema { - introspection: introspection; + introspection: introspection } -} +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 13940ce4..fd12a3ad 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -123,8 +123,8 @@ importers: version: 4.0.6(graphql@16.8.1)(react@18.2.0) devDependencies: '@0no-co/graphqlsp': - specifier: ^1.0.5 - version: 1.0.5 + specifier: ^1.1.2 + version: 1.1.2 '@types/react': specifier: ^18.2.47 version: 18.2.47 @@ -188,8 +188,8 @@ packages: graphql: 16.8.1 dev: false - /@0no-co/graphqlsp@1.0.5: - resolution: {integrity: sha512-R3INEWZlBDpCqDPreyVtC7sDgWydkz/3wUxB7KWXRCqkGEgcoDskfwOJnAyXXFcN9UQCypzkUvb1piRXAC1GdQ==} + /@0no-co/graphqlsp@1.1.2: + resolution: {integrity: sha512-qSRcMVBByfv06gpHeb0tuNb3ZNuqQZEpsQojoGDuOOJlXifBWPLbwNC2NwIvOUZN2zaSSuHrts7By0gVkiznfQ==} dependencies: node-fetch: 2.7.0 transitivePeerDependencies: