Skip to content

Commit d6b11e2

Browse files
Merge pull request #108 from FormidableLabs/JoviDeCroock-patch-1
2 parents de595df + 73e0cdd commit d6b11e2

File tree

4 files changed

+32
-21
lines changed

4 files changed

+32
-21
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"@types/node": "^12.12.39",
6464
"@typescript-eslint/eslint-plugin": "^2.34.0",
6565
"@typescript-eslint/parser": "^2.34.0",
66-
"@urql/core": "^1.11.8",
66+
"@urql/core": "^1.15.0",
6767
"babel-plugin-closure-elimination": "^1.3.1",
6868
"babel-plugin-transform-async-to-promises": "^0.8.15",
6969
"eslint": "^7.1.0",
@@ -86,7 +86,7 @@
8686
"wonka": ">= 4.0.9"
8787
},
8888
"peerDependencies": {
89-
"@urql/core": ">= 1.11.0",
89+
"@urql/core": ">= 1.14.0",
9090
"graphql": ">= 0.11.0"
9191
}
9292
}

src/exchange.test.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ let forward: any;
2828
beforeEach(() => {
2929
client = {
3030
url: 'url_stub',
31-
createRequestOperation: jest.fn((operationName, data, meta) => ({
32-
operationName,
31+
createRequestOperation: jest.fn((kind, data, meta) => ({
32+
kind,
3333
...data,
3434
context: {
3535
meta,
@@ -97,7 +97,7 @@ describe('on operation', () => {
9797
describe('on execute', () => {
9898
it('dispatches debug "update" event', () => {
9999
const operation = {
100-
operationName: 'query',
100+
kind: 'query',
101101
};
102102

103103
const { source, next } = makeSubject<any>();
@@ -117,7 +117,7 @@ describe('on operation', () => {
117117
},
118118
"message": "The client has received an execute command.",
119119
"operation": Object {
120-
"operationName": "query",
120+
"kind": "query",
121121
},
122122
"source": "devtoolsExchange",
123123
"timestamp": 1234,
@@ -134,7 +134,7 @@ describe('on operation', () => {
134134
describe('on teardown', () => {
135135
it('dispatches debug "teardown" event', () => {
136136
const operation = {
137-
operationName: 'teardown',
137+
kind: 'teardown',
138138
};
139139

140140
const { source, next } = makeSubject<any>();
@@ -152,7 +152,7 @@ describe('on operation', () => {
152152
"data": undefined,
153153
"message": "The operation has been torn down",
154154
"operation": Object {
155-
"operationName": "teardown",
155+
"kind": "teardown",
156156
},
157157
"source": "devtoolsExchange",
158158
"timestamp": 1234,
@@ -168,7 +168,7 @@ describe('on operation', () => {
168168

169169
it('forwards operations', () => {
170170
const operation = {
171-
operationName: 'query',
171+
kind: 'query',
172172
key: 1,
173173
};
174174

@@ -198,7 +198,7 @@ describe('on operation response', () => {
198198
describe('on data', () => {
199199
it('dispatches update event', () => {
200200
const operation = {
201-
operationName: 'mutation',
201+
kind: 'mutation',
202202
};
203203
forward.mockImplementation((o) =>
204204
map((operation) => ({
@@ -228,7 +228,7 @@ describe('on operation response', () => {
228228
},
229229
"message": "The operation has returned a new response.",
230230
"operation": Object {
231-
"operationName": "mutation",
231+
"kind": "mutation",
232232
},
233233
"source": "devtoolsExchange",
234234
"timestamp": 1234,
@@ -245,7 +245,7 @@ describe('on operation response', () => {
245245
describe('on error', () => {
246246
it('dispatches update event', () => {
247247
const operation = {
248-
operationName: 'mutation',
248+
kind: 'mutation',
249249
};
250250
forward.mockImplementation((o) =>
251251
map((operation) => ({
@@ -274,7 +274,7 @@ describe('on operation response', () => {
274274
},
275275
"message": "The operation has returned a new error.",
276276
"operation": Object {
277-
"operationName": "mutation",
277+
"kind": "mutation",
278278
},
279279
"source": "devtoolsExchange",
280280
"timestamp": 1234,
@@ -322,7 +322,7 @@ describe('on request message', () => {
322322
},
323323
},
324324
"key": 1063934861,
325-
"operationName": "query",
325+
"kind": "query",
326326
"query": Object {
327327
"definitions": Array [
328328
Object {

src/exchange.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ interface HandlerArgs {
5656
const handleOperation = ({ sendMessage }: HandlerArgs) => (
5757
operation: Operation
5858
) => {
59-
if (operation.operationName === 'teardown') {
59+
if (operation.kind === 'teardown') {
6060
const msg = createDebugMessage({
6161
type: 'teardown',
6262
message: 'The operation has been torn down',

yarn.lock

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,11 @@
459459
exec-sh "^0.3.2"
460460
minimist "^1.2.0"
461461

462+
"@graphql-typed-document-node/core@^3.1.0":
463+
version "3.1.0"
464+
resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.1.0.tgz#0eee6373e11418bfe0b5638f654df7a4ca6a3950"
465+
integrity sha512-wYn6r8zVZyQJ6rQaALBEln5B1pzxb9shV5Ef97kTvn6yVGrqyXVnDqnU24MXnFubR+rZjBY9NWuxX3FB2sTsjg==
466+
462467
"@istanbuljs/load-nyc-config@^1.0.0":
463468
version "1.0.0"
464469
resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.0.0.tgz#10602de5570baea82f8afbfa2630b24e7a8cfe5b"
@@ -909,12 +914,13 @@
909914
semver "^7.3.2"
910915
tsutils "^3.17.1"
911916

912-
"@urql/core@^1.11.8":
913-
version "1.11.8"
914-
resolved "https://registry.yarnpkg.com/@urql/core/-/core-1.11.8.tgz#6a3186ac84d6b08752585f42e8ec81539338d7a9"
915-
integrity sha512-lBlCjw3sLlblGIzRVg583IdsONUIt04f/LHI0oiEgNlPViZcRR3B31LCKyOChba/klIqSaDivaqCfzg5wyTPoQ==
917+
"@urql/core@^1.15.0":
918+
version "1.15.1"
919+
resolved "https://registry.yarnpkg.com/@urql/core/-/core-1.15.1.tgz#fa49909f2841d092796dd540cef6e9df89222560"
920+
integrity sha512-a05ablx/aKNCUc9dEbx0GvE28UC0sJ1FmfsSfmJNqecYlYeb4XvSQW4FLVy0e/MjQeB9op/weiVIEw+za2ssGw==
916921
dependencies:
917-
wonka "^4.0.10"
922+
"@graphql-typed-document-node/core" "^3.1.0"
923+
wonka "^4.0.14"
918924

919925
abab@^2.0.3:
920926
version "2.0.3"
@@ -5190,11 +5196,16 @@ which@^2.0.1, which@^2.0.2:
51905196
dependencies:
51915197
isexe "^2.0.0"
51925198

5193-
"wonka@>= 4.0.9", wonka@^4.0.10:
5199+
"wonka@>= 4.0.9":
51945200
version "4.0.13"
51955201
resolved "https://registry.yarnpkg.com/wonka/-/wonka-4.0.13.tgz#8d188160bd5742870c78ede7a4eba686d089a33f"
51965202
integrity sha512-aWg92IVvbP/kp+q9rw+k/Uw3C/S2J0dTDNhEhivGVH3GXJZgpFk2nuyVtiS7Y1d0UG3m4jvOrR7bPXim6D/TBg==
51975203

5204+
wonka@^4.0.14:
5205+
version "4.0.15"
5206+
resolved "https://registry.yarnpkg.com/wonka/-/wonka-4.0.15.tgz#9aa42046efa424565ab8f8f451fcca955bf80b89"
5207+
integrity sha512-U0IUQHKXXn6PFo9nqsHphVCE5m3IntqZNB9Jjn7EB1lrR7YTDY3YWgFvEvwniTzXSvOH/XMzAZaIfJF/LvHYXg==
5208+
51985209
word-wrap@^1.2.3, word-wrap@~1.2.3:
51995210
version "1.2.3"
52005211
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"

0 commit comments

Comments
 (0)