Adding queries and generating types and services
In this section, we'll continue working on our profile component by sending queries to receive paginated posts and comments data, as well as mutations, to add comments and likes to posts.
Here is a screenshot of a single post prior to the addition of any comments or likes:
Here is a screenshot of a post after I commented and liked it:
Before we begin, let's change one behavior that we implemented in Chapter 9, Uploading Images and Adding Posts. We utilized the takeUntil()
operator in the base component to unsubscribe from the returned Observables when the component is destroyed. This is the correct method when we need to keep Observables alive over the component's lifetime in order to keep watching active queries, but it is not necessary for the createTextPost...