urql-graphql / urql

The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
https://urql.dev/goto/docs
MIT License
8.67k stars 454 forks source link

Operation.operationName deprecated warning in console but everything is up to date #1102

Closed frederikhors closed 4 years ago

frederikhors commented 4 years ago

I updated every single package but keep getting this in console:

[WARNING: Deprecated] The "Operation.operationName" property has been deprecated and will be removed in a future release of urql. Use "Operation.kind" instead.

get operationName   @   urql-core.mjs:78
b   @   node_modules/@urql/exchange-graphcache/dist/5301ccd2.mjs:11
$a  @   urql-exchange-graphcache.mjs:754
p   @   urql-exchange-graphcache.mjs:923
eval    @   node_modules/wonka/dist/wonka.mjs:678
eval    @   node_modules/wonka/dist/wonka.mjs:468
eval    @   node_modules/wonka/dist/wonka.mjs:812
b   @   node_modules/wonka/dist/wonka.mjs:811
eval    @   node_modules/wonka/dist/wonka.mjs:679
eval    @   node_modules/wonka/dist/wonka.mjs:468
eval    @   node_modules/wonka/dist/wonka.mjs:812
b   @   node_modules/wonka/dist/wonka.mjs:811
d   @   node_modules/wonka/dist/wonka.mjs:84
eval    @   node_modules/wonka/dist/wonka.mjs:812
b   @   node_modules/wonka/dist/wonka.mjs:811
eval    @   node_modules/wonka/dist/wonka.mjs:468
eval    @   node_modules/wonka/dist/wonka.mjs:665
next    @   node_modules/wonka/dist/wonka.mjs:664
Z.dispatchOperation @   urql-core.mjs:400
Z.onOperationStart  @   urql-core.mjs:605
eval    @   urql-core.mjs:629
eval    @   node_modules/wonka/dist/wonka.mjs:729
eval    @   node_modules/wonka/dist/wonka.mjs:971
eval    @   node_modules/wonka/dist/wonka.mjs:728
eval    @   node_modules/wonka/dist/wonka.mjs:697
eval    @   node_modules/wonka/dist/wonka.mjs:677
eval    @   node_modules/wonka/dist/wonka.mjs:98
eval    @   node_modules/wonka/dist/wonka.mjs:24
eval    @   node_modules/wonka/dist/wonka.mjs:109
d   @   node_modules/wonka/dist/wonka.mjs:231
eval    @   node_modules/wonka/dist/wonka.mjs:101
eval    @   node_modules/wonka/dist/wonka.mjs:244
next    @   node_modules/wonka/dist/wonka.mjs:627
eval    @   urql-svelte.mjs:249
subscribe   @   node_modules/svelte/store/index.mjs:51
subscribe   @   urql-svelte.mjs:65
eval    @   urql-svelte.mjs:244
eval    @   node_modules/wonka/dist/wonka.mjs:625
eval    @   node_modules/wonka/dist/wonka.mjs:239
eval    @   node_modules/wonka/dist/wonka.mjs:792
eval    @   node_modules/wonka/dist/wonka.mjs:288
query   @   urql-svelte.mjs:127
...

Why?

frederikhors commented 4 years ago

I'm using:

    "@urql/exchange-graphcache": "3.1.9",
    "@urql/exchange-persisted-fetch": "1.2.3",
    "@urql/exchange-retry": "0.1.10",
    "@urql/introspection": "0.1.1",
kitten commented 4 years ago

Looks like we forgot a place where an operation was being shallowly copied. I was able to find the spot by looking at your stack trace. A fix is already queued up

Svarto commented 4 years ago

@kitten Same problem here, updated everything but keep getting the warning. These are my package versions:

    "@urql/devtools": "^2.0.2",
    "@urql/exchange-graphcache": "^3.1.11",
    "urql": "^1.11.0"

Tried also to search but can't find operationName used anywhere?

This is my trace:

[WARNING: Deprecated] The "Operation.operationName" property has been deprecated and will be removed in a future release of urql. Use "Operation.kind" instead.
- node_modules/react-native/Libraries/LogBox/LogBox.js:117:10 in registerWarning
- node_modules/react-native/Libraries/LogBox/LogBox.js:63:8 in warnImpl
- node_modules/react-native/Libraries/LogBox/LogBox.js:36:4 in console.warn
- node_modules/expo/build/environment/react-native-logs.fx.js:18:4 in warn
- node_modules/@urql/core/dist/urql-core.js:132:2 in deprecationWarning
- node_modules/@urql/core/dist/urql-core.js:26:24 in get__operationName
- node_modules/@urql/devtools/dist/urql-devtools-exchange.js:95:29 in <anonymous>
- node_modules/wonka/dist/wonka.js:207:15 in b$argument_0
- node_modules/wonka/dist/wonka.js:1197:7 in next
* [native code]:null in forEach
- node_modules/wonka/dist/wonka.js:1196:10 in next
* http://10.0.0.99:19001/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&minify=false:203958:17 in dispatchOperation
- node_modules/@urql/core/dist/urql-core.js:544:24 in Client.prototype.onOperationStart
- node_modules/@urql/core/dist/urql-core.js:572:21 in wonka.onStart$argument_0
- node_modules/wonka/dist/wonka.js:539:30 in b$argument_0
- node_modules/wonka/dist/wonka.js:761:9 in <anonymous>
- node_modules/wonka/dist/wonka.js:102:16 in <anonymous>
- node_modules/wonka/dist/wonka.js:25:40 in <anonymous>
- node_modules/wonka/dist/wonka.js:116:19 in <anonymous>
- node_modules/wonka/dist/wonka.js:233:20 in e
- node_modules/wonka/dist/wonka.js:96:7 in <anonymous>
- node_modules/wonka/dist/wonka.js:247:21 in b$argument_0
- node_modules/wonka/dist/wonka.js:1145:21 in <anonymous>
- node_modules/wonka/dist/wonka.js:266:19 in <anonymous>
- node_modules/wonka/dist/wonka.js:300:19 in b$argument_0
- node_modules/wonka/dist/wonka.js:591:12 in c$argument_0
- node_modules/wonka/dist/wonka.js:247:7 in <anonymous>
- node_modules/wonka/dist/wonka.js:298:4 in <anonymous>
- node_modules/urql/dist/urql.js:64:6 in wonka.subscribe$argument_0
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:10490:31 in mountState
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:11129:25 in HooksDispatcherOnMountInDEV.useState
- node_modules/urql/dist/urql.js:53:2 in useSource
- node_modules/urql/dist/urql.js:162:20 in useQuery
* http://10.0.0.99:19001/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&minify=false:202521:39 in DiscoverFeed
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:10073:26 in renderWithHooks
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:12882:27 in mountIndeterminateComponent
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:19181:22 in beginWork$1
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:18085:22 in performUnitOfWork
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:18013:38 in workLoopSync
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:17977:18 in renderRootSync
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:17674:33 in performSyncWorkOnRoot
* [native code]:null in performSyncWorkOnRoot
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:5321:31 in runWithPriority$argument_1
- node_modules/scheduler/cjs/scheduler.development.js:653:23 in unstable_runWithPriority
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:5316:21 in flushSyncCallbackQueueImpl
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:5304:28 in flushSyncCallbackQueue
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:17125:30 in scheduleUpdateOnFiber
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:11003:16 in dispatchAction
* [native code]:null in dispatchAction
* src/auth_gate.jsx:40:8 in auth.onAuthStateChanged$argument_0
- node_modules/nhost-js-sdk/dist/Auth.js:472:16 in prototype.authStateChanged
* http://10.0.0.99:19001/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&minify=false:286600:27 in setLoginState
- node_modules/nhost-js-sdk/dist/Auth.js:457:24 in __generator$argument_1
* http://10.0.0.99:19001/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&minify=false:286221:24 in step
- node_modules/nhost-js-sdk/dist/Auth.js:5:40 in fulfilled
- node_modules/react-native/node_modules/promise/setimmediate/core.js:37:13 in tryCallOne
- node_modules/react-native/node_modules/promise/setimmediate/core.js:123:24 in setImmediate$argument_0
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:130:14 in _callTimer
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:181:14 in _callImmediatesPass
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:441:30 in callImmediates
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:387:6 in __callImmediates
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:135:6 in __guard$argument_0
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:364:10 in __guard
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:134:4 in flushedQueue
* [native code]:null in flushedQueue
* [native code]:null in callFunctionReturnFlushedQueue
kitten commented 4 years ago

@Svarto hiya 👋 that's in the urql-devtools which are maintained in a separate repository, so fixing that up will take us a little longer. It's just a couple of warnings in the meantime though and we should have a patch ready next week

GollyJer commented 3 years ago

Hi. I'm new to urql and ran into this. Spent a while thinking it was something I was doing wrong before finding this issue. 😃 I don't see an issue in the urql-devtools repo. Do we need to make one?

kitten commented 3 years ago

@GollyJer i think one was already opened but something's still slipped through and is causing these warnings. I'll follow this up on Monday ✌️