Chapter 7: Vue
Chapter contents:
Background: Vue
In this chapter, we’ll build a basic Vue.js app with Vue Apollo’s composition API. Vue Apollo also has an option API, where operations are defined under an apollo
component option, and a component API, where <ApolloQuery>
, <ApolloMutation>
, and <ApolloSubscribeToMore>
are used inside component templates. We recommend using the composition API for its flexibility.
Vue Apollo uses the same Apollo Client library that we used in the extensive React chapter, so for in-depth knowledge and advanced topics, refer to that chapter. In this chapter, we’ll see what the Vue equivalents to the React hooks API look like. (Vue Apollo’s composition API, option API, and component API are roughly analogous to React Apollo’s hooks API, HOC API, and render prop API, respectively.)