Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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]') #548

Open
stack-vue opened this issue Sep 11, 2023 · 0 comments
Labels

Comments

@stack-vue
Copy link

Environment

  • Operating System: Darwin
  • Node Version: v18.12.0
  • Nuxt Version: 3.6.5
  • Nitro Version: 2.5.2
  • Package Manager: pnpm@8.6.10
  • Builder: vite
  • User Config: runtimeConfig, app, css, imports, modules, apollo, devtools, build, vite, routeRules, hooks, sourcemap
  • Runtime Modules: @pinia-plugin-persistedstate/nuxt@1.1.1, @pinia/nuxt@0.4.11, @nuxtjs/i18n@8.0.0-beta.13, @nuxtjs/apollo@5.0.0-alpha.6
  • Build Modules: -

Describe the bug

image

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

@stack-vue stack-vue added the bug label Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant