import graphql from '../utils/graphql' ; export function exchangeNewToken ( { accessToken } ) { return ( dispatch , getState ) => { return new Promise ( async ( resolve , reject ) => { let [ err , res ] = await graphql ( { type : 'mutation' , apis : [ { api : 'exchangeNewToken' , args : { token : accessToken } , fields : `
        access_token
        expires  
        ` } ] } ) ; if ( err ) { reject ( err ) ; } else { resolve ( res ) ; } } ) ; } ; }