July 2019
Intermediate to advanced
416 pages
10h 6m
English
Before we get around to creating our user interface, we are going to set up the client side of our Apollo integration. While we could install all the individual parts of Apollo using npm, we are going to use the power of ng again:
ng add apollo-client
Going back to AppModule, we are going to set up Apollo to interact with the server. The AppModule constructor is the perfect place for us to inject Apollo to create the connection to our server. Our constructor starts off looking like this:
constructor(httpLink: HttpLink, apollo: Apollo) {}
The way that we create the connection to the server is through the apollo.create command. This accepts a number of options, but we're just going to concentrate on three of ...
Read now
Unlock full access