Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AlgoliaIndexReference.facetQuery should accept facets without objectID #88

Closed
Chralu opened this issue Mar 30, 2022 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@Chralu
Copy link

Chralu commented Mar 30, 2022

Flutter version: 2.10.3 (stable)

Describe the bug
When querying a simple string facet, library throws a "type 'Null' is not a subtype of type 'String'" error.

To Reproduce
Steps to reproduce the behavior:

  1. In Algolia settings, setup a facet on a string property
  2. In your Flutter code, run a query like :
final algolia = Algolia.init(
      applicationId: <my_application_id>,
      apiKey: <my_api_key>,
);

await algolia
        ?.index(<my_index>)
        .facetQuery(<my_simple_facet_name>);

It will throw an error when converting Algolia response to AlgoliaFacetValueSnapshot.

Expected behavior
AlgoliaFacetValueSnapshot.objectID should accept null value.

@Chralu Chralu added the bug Something isn't working label Mar 30, 2022
@nhathiwala
Copy link
Member

This has been fix in 1.0.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants