Missing query attribute on result Vue graphql
问题 I can't understand why this error occurs in the console import gql from 'graphql-tag' // import gql const getBooksQuery = gql`query // describing query { books{ name id } } `; export default { name: "BookList", // template name apollo: { // apollo instance query: getBooksQuery // query } } What am i doing wrong? 回答1: You have to name the apollo property (docs, e.g bookList ): export default { name: "BookList", // template name apollo: { bookList: { query: getBooksQuery // query } } } or even