Skip to content
This repository has been archived by the owner on Jul 6, 2020. It is now read-only.

Upgrade to urql 1.7.0 and use urql/core #132

Merged
merged 1 commit into from
Dec 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
},
"peerDependencies": {
"graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0",
"urql": ">= 1.6.0"
"urql": ">= 1.7.0"
},
"devDependencies": {
"@ampproject/rollup-plugin-closure-compiler": "^0.13.0",
Expand Down Expand Up @@ -131,6 +131,6 @@
"terser": "^4.4.2",
"ts-jest": "^24.2.0",
"typescript": "^3.7.3",
"urql": "^1.6.3"
"urql": "^1.7.0"
}
}
7 changes: 6 additions & 1 deletion src/cacheExchange.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import gql from 'graphql-tag';
import { createClient, ExchangeIO, Operation, OperationResult } from 'urql';
import {
createClient,
ExchangeIO,
Operation,
OperationResult,
} from 'urql/core';
import { pipe, map, makeSubject, tap, publish, delay } from 'wonka';
import { cacheExchange } from './cacheExchange';

Expand Down
2 changes: 1 addition & 1 deletion src/cacheExchange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
OperationResult,
RequestPolicy,
CacheOutcome,
} from 'urql';
} from 'urql/core';

import { IntrospectionQuery } from 'graphql';
import { filter, map, merge, pipe, share, tap } from 'wonka';
Expand Down
2 changes: 1 addition & 1 deletion src/extras/relayPagination.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { stringifyVariables } from 'urql';
import { stringifyVariables } from 'urql/core';
import { Cache, Resolver, Variables, NullArray } from '../types';

export type MergeMode = 'outwards' | 'inwards';
Expand Down
2 changes: 1 addition & 1 deletion src/extras/simplePagination.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { stringifyVariables } from 'urql';
import { stringifyVariables } from 'urql/core';
import { Resolver, Variables, NullArray } from '../types';

export interface PaginationParams {
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/keys.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { stringifyVariables } from 'urql';
import { stringifyVariables } from 'urql/core';
import { Variables, FieldInfo } from '../types';

export const keyOfField = (fieldName: string, args?: null | Variables) =>
Expand Down
2 changes: 1 addition & 1 deletion src/populateExchange.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {

import gql from 'graphql-tag';
import { fromValue, pipe, fromArray, toArray } from 'wonka';
import { Client, Operation } from 'urql';
import { Client, Operation } from 'urql/core';

import { populateExchange } from './populateExchange';

Expand Down
2 changes: 1 addition & 1 deletion src/populateExchange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
} from 'graphql';

import { pipe, tap, map } from 'wonka';
import { Exchange, Operation } from 'urql';
import { Exchange, Operation } from 'urql/core';

import { getName, getSelectionSet, unwrapType } from './ast';
import { invariant, warn } from './helpers/help';
Expand Down
2 changes: 1 addition & 1 deletion src/store.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DocumentNode } from 'graphql';
import { createRequest } from 'urql';
import { createRequest } from 'urql/core';

import {
Cache,
Expand Down
24 changes: 6 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3759,20 +3759,13 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0:
dependencies:
js-tokens "^3.0.0 || ^4.0.0"

[email protected]:
[email protected], magic-string@^0.25.2, magic-string@^0.25.3:
version "0.25.4"
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.4.tgz#325b8a0a79fc423db109b77fd5a19183b7ba5143"
integrity sha512-oycWO9nEVAP2RVPbIoDoA4Y7LFIJ3xRYov93gAyJhZkET1tNuB0u7uWkZS2LpBWTJUWnmau/To8ECWRC+jKNfw==
dependencies:
sourcemap-codec "^1.4.4"

magic-string@^0.25.2, magic-string@^0.25.3:
version "0.25.3"
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.3.tgz#34b8d2a2c7fec9d9bdf9929a3fd81d271ef35be9"
integrity sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA==
dependencies:
sourcemap-codec "^1.4.4"

make-dir@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5"
Expand Down Expand Up @@ -4581,16 +4574,11 @@ pretty-format@^24.9.0:
ansi-styles "^3.2.0"
react-is "^16.8.4"

process-nextick-args@^2.0.0:
process-nextick-args@^2.0.0, process-nextick-args@~2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==

process-nextick-args@~2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"
integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==

progress@^2.0.0:
version "2.0.3"
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
Expand Down Expand Up @@ -5907,10 +5895,10 @@ urlgrey@^0.4.4:
resolved "https://registry.yarnpkg.com/urlgrey/-/urlgrey-0.4.4.tgz#892fe95960805e85519f1cd4389f2cb4cbb7652f"
integrity sha1-iS/pWWCAXoVRnxzUOJ8stMu3ZS8=

urql@^1.6.3:
version "1.6.3"
resolved "https://registry.yarnpkg.com/urql/-/urql-1.6.3.tgz#0484a90a01d6fc8d0a6fb96bb4b2b2146a612c0d"
integrity sha512-KX8qHTGo8deSg41rrQEk9JhJTz6w/LBCdWhYutYjbCUrkoAF4lEiCkgOEiO0fEf+hpDg0nQTTkHTpRbgQ0yh1g==
urql@^1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/urql/-/urql-1.7.0.tgz#3b5d53451e9b45163288618f2bad6fe0afc02e0e"
integrity sha512-mw9gZhq3u33FzT6nLIQGzTF/cVkl3+pM1Jr2mya9pyTQfRBMugurGpZTyIFZKZQK1zjSnO8LbI2gzelydctq3A==
dependencies:
react-wonka "^1.0.3"
wonka "^3.2.1"
Expand Down