Angular - Apollo: Client has not been defined yet
问题 I'm using apollo client for graphql. I set up the client in AppApolloModule that I'm importing in AppModule. I'm making a query in a service which is also imported right in the AppModule. Although the service runs before the AppApolloModule runs and hence apollo is not initialized when the query is made and I get this error Error: Client has not been defined yet AppApolloModule imports .... export class AppApolloModule { constructor( apollo: Apollo, httpLink: HttpLink, private userService: