You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my application I make a request upfront to load all feature flags. For as long as the fetch request is in progress, my code falls back to default values. But I can't find an API to just grab all feature flags at once. Instead I have to resort to manually grabbing of the flags:
// Have to manually pull of all keys and iterate over them to get all values :(constkeys=awaitclient.getAllKeysAsync()constvalues=awaitPromise.all(keys.map(key=>client.getValueAsync(key,undefined,user)));constflags=keys.reduce((acc,key,i)=>{acc[key]=values[i]returnacc},{})
I'd like to get rid of that. Peeking at the code in this repo and configcat/common-js it seems like the data is all there, it's just not exposed. Is there a way to just get the record of the flags directly?
The text was updated successfully, but these errors were encountered:
It is right the data is present but the client has to evaluate each of them (it's more than return your feature flag values only). Your code is good solution for this but in this case I suggest to ensure your up to date feature flags with force refresh like this:
I would like to kindly inform you that in the next release we'll introduce a new function getAllValues (returns all values of a feature flag or setting). This will be an explicit solution to your issue.
In my application I make a request upfront to load all feature flags. For as long as the fetch request is in progress, my code falls back to default values. But I can't find an API to just grab all feature flags at once. Instead I have to resort to manually grabbing of the flags:
I'd like to get rid of that. Peeking at the code in this repo and
configcat/common-js
it seems like the data is all there, it's just not exposed. Is there a way to just get the record of the flags directly?The text was updated successfully, but these errors were encountered: