ferry icon indicating copy to clipboard operation
ferry copied to clipboard

How to ignore cache for a specific query

Open Fanom2813 opened this issue 9 months ago • 3 comments

Hello , i am new with flutter i would like to ignore cache for specific query that needs latest data

Future<void> refreshProfile() async {
    var req = GMeReq();
    var data = await GraphQLService()
        .client
        .request(req)
        .firstWhere((data) => data.loading == false);

    currentProfile.value = User.fromMeData(data.data);
    await saveAccount();
  }

kindly help

Fanom2813 avatar Mar 13 '25 12:03 Fanom2813

pass .fetchPolicy to request. Either .NoCache or .NetworkOnly

knaeckeKami avatar Mar 13 '25 14:03 knaeckeKami

thank you very much

Fanom2813 avatar Mar 13 '25 14:03 Fanom2813

could you provide a full example how to use pagination ? thanks

Fanom2813 avatar Mar 13 '25 17:03 Fanom2813