kamilkisiela / apollo-angular

A fully-featured, production ready caching GraphQL client for Angular and every GraphQL server 🎁
https://apollo-angular.com
MIT License
1.5k stars 311 forks source link

Updating to apollo-angular v3 and angular v13 get NullInjectorError Apollo #1769

Closed UchihaYuki closed 2 years ago

UchihaYuki commented 2 years ago

I looked at source code, the decorator for Apollo class is :

@Injectable()

Shouldn't it be:

@Injectable({
  providedIn: 'root',
})

I looked in history it is:

@Injectable({
  providedIn: 'root',
})

Any reason here?

amakhrov commented 2 years ago

Looks like it's intentional: https://apollo-angular.com/docs/migration#apollomodule

kamilkisiela commented 2 years ago

It's described in the changelog and the migration doc that ApolloModule is back and why