after chatting to [~wtrocki] I realized we have 3 options:
1) Supply headers in http link: * Shown above in the description * Once the HTTP link is created, you can't change the headers --> fine for now because all the metrics related info are static * Ex: https://github.com/aerogear/aerogear-js-sdk/pull/156/files#diff-f9ff2769705bf8db6018103445f9b0f4R24 2) Creating a separate link for this purpose: * https://github.com/apollographql/apollo-link/tree/master/packages/apollo-link-error#retrying-failed-requests * Same as (1) but instead of modifying the http link, we would have a more clear separate link
3) Extensions: * https://github.com/aerogear/offline-conflict-strategies/pull/9 * Instead of having these info in headers, we could use an extension and put whatever we like in there * Means --> no base64 encoding is required (can't send plain JSON as headers in other approaches, need to encode them in base64)
Number #3 seems like the best to me, but the base64 encoded header support is already implemented in the sync server.
We can have another look at the options once we know when the Sync JS sdk plans are out. |
|