Adds an item to the query cache based on provided data and cache keys.

addItemFromQueryCache({
data: { name: 'New Item' },
queryKeysOne: [['get-one', 'posts', {}, '1']],
});
  • Parameters

    • params: {
          data: OnlyObject;
          queryKeysOne?: ["get-one", ...any[]][];
      }

      The parameters for the function.

      • data: OnlyObject

        The new data to add to the corresponding items.

      • OptionalqueryKeysOne?: ["get-one", ...any[]][]

        Cache keys for single queries that should be updated.

    Returns void