apollo
apollo copied to clipboard
TypeError: 'get' on proxy: property '0' is a read-only and non-configurable data property on the proxy target but the proxy did not return its actual value (expected '[object Object]' but got '[object Object]')
Environment
- Operating System:
Darwin
- Node Version:
v18.12.0
- Nuxt Version:
3.6.5
- Nitro Version:
2.5.2
- Package Manager:
[email protected]
- Builder:
vite
- User Config:
runtimeConfig
,app
,css
,imports
,modules
,apollo
,devtools
,build
,vite
,routeRules
,hooks
,sourcemap
- Runtime Modules:
@pinia-plugin-persistedstate/[email protected]
,@pinia/[email protected]
,@nuxtjs/[email protected]
,@nuxtjs/[email protected]
- Build Modules:
-
Describe the bug
I am getting this error when I enable SubscribeToMore as below
const variables = ref({ where: { id: { _eq: props.instrument.id } } })
const res = ref(0)
const { subscribeToMore, onError: onFetchError, onResult: onFetchResult } = useQuery(query, variables)
onFetchResult((res) => {
res.value = res.data.records[0].value || 0
})
subscribeToMore({
document: subscriptionLtp,
variables: { where: { id: { eq: props.id } } },
updateQuery(, { subscriptionData }) {
console.log('------updateQuery-------')
res.value = subscriptionData.data.instruments[0].ltp || 0
},
})
onFetchError((error) => {
toast.error({ summary: Error: ${error.message}
})
})
Expected behaviour
expecting the messages from Websocket. When i debugged, actually messages are coming but because of above error I am not able to capture the messages in my Vue file
Reproduction
No response
Additional context
No response
Logs
No response