-
-
Notifications
You must be signed in to change notification settings - Fork 522
Closed
Description
my dependencies:
"dependencies": {
"@apollo/client": "^3.5.8",
"@element-plus/icons-vue": "^0.2.7",
"@vue/apollo-option": "^4.0.0-alpha.16",
"autoprefixer": "^9.8.8",
"core-js": "^3.6.5",
"element-plus": "^2.0.2",
"graphql": "^16.3.0",
"graphql-tag": "^2.12.6",
"postcss": "^7.0.39",
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.17",
"vue": "^3.0.0",
"vue-router": "^4.0.0-0"
},
my code:
<template>
<router-view />
</template>
<script>
import gql from "graphql-tag";
export default {
apollo: {
// do not work
me: gql`
{
me {
isStaff
}
}
`,
},
created() {
this.$apollo.addSmartQuery("me", {
// work
query: gql`
{
me {
isStaff
}
}
`,
});
},
};
</script>
error:
TypeError: Cannot read properties of undefined (reading 'data')
get: function get() {
return _this.$data.$apolloData.data[key];
},
can someone help me?
Metadata
Metadata
Assignees
Labels
No labels