interceptors property

List<GQLInterceptor>? interceptors
final

Interceptors to run on every request/response/error.

Processed by GQLInterceptorLink which is inserted before all AuthLinks so retries pick up the freshly stored token. Interceptors execute in list order.

Example — token refresh + cache:

interceptors: [
  GQLTokenRefreshInterceptor(provider: myRefreshProvider),
  MyCacheInterceptor(),
]

Implementation

final List<GQLInterceptor>? interceptors;