I'm trying to refetch automatically whenever variables change - however I always have to run my log function to force a refetch. Can anyone point me in the right direction here? Sorry I'm a bit new to Svelte so hopefully this is just me missing something basic.
let start_date = "2020-01-01";
let end_date = "2020-12-31";
let take = 30;
let skip = 0;
const scheduleMvFeed = query(client, {query: Schedule, variables: {start_date, end_date, skip, take}});
I'm trying to refetch automatically whenever variables change - however I always have to run my log function to force a refetch. Can anyone point me in the right direction here? Sorry I'm a bit new to Svelte so hopefully this is just me missing something basic.
let start_date = "2020-01-01"; let end_date = "2020-12-31"; let take = 30; let skip = 0; const scheduleMvFeed = query(client, {query: Schedule, variables: {start_date, end_date, skip, take}});
// schedule is refetched whenever dates change $: scheduleMvFeed.refetch({start_date, end_date, skip, take});`
function log() { console.log(take, skip); scheduleMvFeed.refetch({start_date, end_date, skip, take}); }