Closed igorwojda closed 2 weeks ago
This was answered on Slack - for the record, the issue was that this particular server replied with 200
in case of auth errors, thus OkHttp Authenticator doesn't work. A possible solution is to implement an ApolloInterceptor. Closing for now.
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Kotlin usage and allow us to serve you better.
the issue was that this particular server replied with 200 in case of auth errors
FWIW, the "200 ok" days are counted and if a server supports application/graphql-response+json
, it's soon-ish fine to use whatever HTTP status code makes sense. See https://github.com/apollographql/apollo-kotlin/pull/6170 and https://graphql.github.io/graphql-over-http/draft/#sec-Processing-the-response
Question
Apollo documentation mentions support of OkHttp interceptors as a way to easily add an "Authorization" header to HTTP requests.
I wonder if Apollo also supports okhttp Authenticator as a way to refresh auth token and retry the request? (after my initial trials I don't think this is the case but I want to double check)