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
1) Setting headers during client creation
Previously, we passed the headers directly when creating the client. Now, the TypeScript types indicate this might not be possible:
Is this correct? If so, what's the recommended way to set headers?
We've only found this article on Request Options which mentions setting headers via searchSingleIndex. However, we're not using that method in our case.
2) Type incompatibility between Algoliasearch client and SearchClient
The client created (typeof Algoliasearch) seems to be incompatible with the type that algoliasearchHelper expects (typeof SearchClient)
consthelper=algoliasearchHelper(client,'index',{ ...options})// ^// Argument of type 'Algoliasearch' is not assignable to parameter of type 'SearchClient'.// Types of property 'searchForFacetValues' are incompatible.// Type '({ indexName, facetName, searchForFacetValuesRequest }: SearchForFacetValuesProps, requestOptions?: RequestOptions | undefined) => Promise<SearchForFacetValuesResponse>' is not assignable to type 'undefined'.// ts(2345)
The text was updated successfully, but these errors were encountered:
Not sure about this question, @shortcuts, do you know what the new signature is for a static header?
The sffv problem should be solved in the latest version of the helper: algolia/instantsearch@11399e6 (3.22.5), which was caused by an incompatibility of the v4 and v5 signatures
We've only found this article on Request Options which mentions setting headers via searchSingleIndex. However, we're not using that method in our case.
requestOptions is available on every methods, as the last expected parameter
We're migrating from v4 to v5, using algoliasearch in combination with AlgoliaSearchHelper
Previously, we used it like this:
We've encountered two problems:
1) Setting headers during client creation
Previously, we passed the headers directly when creating the client. Now, the TypeScript types indicate this might not be possible:
Is this correct? If so, what's the recommended way to set headers?
We've only found this article on Request Options which mentions setting headers via
searchSingleIndex
. However, we're not using that method in our case.2) Type incompatibility between Algoliasearch client and SearchClient
The client created (
typeof Algoliasearch
) seems to be incompatible with the type that algoliasearchHelper expects (typeof SearchClient
)The text was updated successfully, but these errors were encountered: