Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.

fix(core,graphcache): Update optional graphql types with TS 5.5 compatible switch (#3730)

Co-authored-by: Phil Pluckthun <phil@kitten.sh>

authored by

Woky
Phil Pluckthun
and committed by
GitHub
92f5c477 48f433a4

+22 -15
+6
.changeset/old-ears-hunt.md
··· 1 + --- 2 + '@urql/exchange-graphcache': patch 3 + '@urql/core': patch 4 + --- 5 + 6 + Fix compatibility with Typescript >5.5 (See: https://github.com/0no-co/graphql.web/pull/49)
+1 -1
exchanges/graphcache/package.json
··· 66 66 "@urql/core": "^5.0.0" 67 67 }, 68 68 "dependencies": { 69 - "@0no-co/graphql.web": "^1.0.5", 69 + "@0no-co/graphql.web": "^1.0.13", 70 70 "@urql/core": "workspace:^5.1.1", 71 71 "wonka": "^6.3.2" 72 72 },
+1 -1
exchanges/graphcache/src/ast/graphql.ts
··· 1 1 import type * as GraphQL from 'graphql'; 2 2 3 - type OrNever<T> = 0 extends 1 & T ? never : T; 3 + type OrNever<T> = void extends T ? never : T; 4 4 5 5 export type IntrospectionQuery = 6 6 | {
+2 -1
exchanges/graphcache/src/operations/shared.ts
··· 3 3 import type { 4 4 InlineFragmentNode, 5 5 FragmentDefinitionNode, 6 + FieldNode, 6 7 } from '@0no-co/graphql.web'; 7 8 import { Kind } from '@0no-co/graphql.web'; 8 9 ··· 211 212 ]; 212 213 } 213 214 214 - next() { 215 + next(): FormattedNode<FieldNode> | undefined { 215 216 while (this.stack.length > 0) { 216 217 let state = this.stack[this.stack.length - 1]; 217 218 while (state.index < state.selectionSet.length) {
+1 -1
package.json
··· 49 49 } 50 50 }, 51 51 "devDependencies": { 52 - "@0no-co/graphql.web": "^1.0.8", 52 + "@0no-co/graphql.web": "^1.0.13", 53 53 "@actions/artifact": "^2.0.0", 54 54 "@actions/core": "^1.10.1", 55 55 "@babel/core": "^7.25.2",
+1 -1
packages/core/package.json
··· 55 55 "jsr": "jsr publish" 56 56 }, 57 57 "dependencies": { 58 - "@0no-co/graphql.web": "^1.0.5", 58 + "@0no-co/graphql.web": "^1.0.13", 59 59 "wonka": "^6.3.2" 60 60 }, 61 61 "publishConfig": {
+1 -1
packages/core/src/utils/graphql.ts
··· 1 1 import type * as GraphQLWeb from '@0no-co/graphql.web'; 2 2 import type * as GraphQL from 'graphql'; 3 3 4 - type OrNever<T> = 0 extends 1 & T ? never : T; 4 + type OrNever<T> = void extends T ? never : T; 5 5 6 6 export type GraphQLError = 7 7 | GraphQLWeb.GraphQLError
+9 -9
pnpm-lock.yaml
··· 21 21 version: 3.3.2 22 22 devDependencies: 23 23 '@0no-co/graphql.web': 24 - specifier: ^1.0.8 25 - version: 1.0.8(graphql@16.9.0) 24 + specifier: ^1.0.13 25 + version: 1.0.13(graphql@16.9.0) 26 26 '@actions/artifact': 27 27 specifier: ^2.0.0 28 28 version: 2.1.9(encoding@0.1.13) ··· 219 219 exchanges/graphcache: 220 220 dependencies: 221 221 '@0no-co/graphql.web': 222 - specifier: ^1.0.5 223 - version: 1.0.8(graphql@16.9.0) 222 + specifier: ^1.0.13 223 + version: 1.0.13(graphql@16.9.0) 224 224 '@urql/core': 225 225 specifier: workspace:^5.1.1 226 226 version: link:../../packages/core ··· 340 340 packages/core: 341 341 dependencies: 342 342 '@0no-co/graphql.web': 343 - specifier: ^1.0.5 344 - version: 1.0.8(graphql@16.9.0) 343 + specifier: ^1.0.13 344 + version: 1.0.13(graphql@16.9.0) 345 345 wonka: 346 346 specifier: ^6.3.2 347 347 version: 6.3.2 ··· 624 624 625 625 packages: 626 626 627 - '@0no-co/graphql.web@1.0.8': 628 - resolution: {integrity: sha512-8BG6woLtDMvXB9Ajb/uE+Zr/U7y4qJ3upXi0JQHZmsKUJa7HjF/gFvmL2f3/mSmfZoQGRr9VoY97LCX2uaFMzA==} 627 + '@0no-co/graphql.web@1.0.13': 628 + resolution: {integrity: sha512-jqYxOevheVTU1S36ZdzAkJIdvRp2m3OYIG5SEoKDw5NI8eVwkoI0D/Q3DYNGmXCxkA6CQuoa7zvMiDPTLqUNuw==} 629 629 peerDependencies: 630 630 graphql: ^16.6.0 631 631 peerDependenciesMeta: ··· 9885 9885 9886 9886 snapshots: 9887 9887 9888 - '@0no-co/graphql.web@1.0.8(graphql@16.9.0)': 9888 + '@0no-co/graphql.web@1.0.13(graphql@16.9.0)': 9889 9889 optionalDependencies: 9890 9890 graphql: 16.9.0 9891 9891