• Kadi Kraman's avatar
    (exchanges) implement auth exchange (#939) · 4ea13f66
    Kadi Kraman authored
    * Create an auth exchange and implement adding token to auth header
    
    * Add tests for the auth exchange
    
    * Expose api to add auth to operation instead of just the header
    
    * Add auth attempt to operation and trigger refresh
    
    * Update auth exchange to combine getAuth and getInitialAuthState
    
    * Refactor auth exchange and account for teardown operations
    
    * Add error excahnge to auth exchange readme
    
    * Replace AuthConfig<T> with documented interface
    
    * Deduplicate operations in the authExchange queue
    
    * Update import in authExchange to rely on @urql/core
    
    * Add a mutate method to the authExchange's getAuth params
    
    * Delay initial getAuth by one tick to wait for result$
    
    Avoid calling getAuth before the rest of the exchange has
    completely run.
    
    * Update tests and test for mutate() method
    
    * Add test for didAuthError method
    
    * Add test for willAuthError
    
    * Update authExchange api documentation
    
    * Target es2019 for optional chaiining
    
    * Update auth exchange initial version to v0.1.0
    
    * Fix readme
    Co-authored-by: 's avatarPhil Pluckthun <phil@kitten.sh>
    4ea13f66