Open itaysmalia opened 3 years ago
just trying a super simple useQuery and it throws an error Uncaught (in promise) ReferenceError: getCurrentInstance is not defined
Uncaught (in promise) ReferenceError: getCurrentInstance is not defined
<template> <div class="h-full flex items-center justify-center"> <h1 class="text-8xl">username here</h1> </div> </template> <script lang="ts"> import { watch } from "vue"; import { useQuery } from "@vue/apollo-composable"; import gql from "graphql-tag"; export default { props: ["id"], setup({ id }) { id = parseInt(id); const { result } = useQuery( gql` query getUsers { user { id username } } ` ); watch(result, value => { console.log(value); }); return { id }; } }; </script> <style></style>
To Reproduce Steps to reproduce the behavior:
Expected behavior get the result of the query
Versions vue: "vue": "^3.0.0" vue-apollo: "@vue/apollo-composable": "^4.0.0-alpha.12", apollo-client: "@apollo/client": "^3.3.6" "snowpack": "^2.18.4", "@snowpack/plugin-vue": "^2.2.6",
"vue": "^3.0.0"
"@vue/apollo-composable": "^4.0.0-alpha.12",
"@apollo/client": "^3.3.6"
"snowpack": "^2.18.4",
"@snowpack/plugin-vue": "^2.2.6",
using snowpack btw: "snowpack": "^2.18.4", "@snowpack/plugin-vue": "^2.2.6",
@itaysmalia were you able to make this work?
Not yet.
just trying a super simple useQuery and it throws an error
Uncaught (in promise) ReferenceError: getCurrentInstance is not defined
code:
To Reproduce Steps to reproduce the behavior:
Expected behavior get the result of the query
Versions vue:
"vue": "^3.0.0"
vue-apollo:"@vue/apollo-composable": "^4.0.0-alpha.12",
apollo-client:"@apollo/client": "^3.3.6"
"snowpack": "^2.18.4",
"@snowpack/plugin-vue": "^2.2.6",