import { paginatorFromVariables , syncedPoll } from '../utils' ; export function albumResolvers ( spotifyApiClient ) { return { artists ( album ) { return album . artists ; } , tracks ( album , variables ) { return syncedPoll ( 'Album.tracks' , ( ) => { return paginatorFromVariables ( 'OffsetPaging' , variables ) ( spotifyApiClient , 'getAlbumTracks' , response => response . body . items , album . id ) . then ( ( tracks ) => { return tracks ; } ) ; } , variables . throttle || 2 ) ; } } ; }