-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat(elasticsearch-plugin): Add facetFilters input for search query #808
Conversation
…ith unit tests and documentayion #726
The implementation looks good, but I'm not sure about the API - I feel it might be confusing that the SearchInput now has both I understand why you did it this way, because we need the existing SearchInput API to still be compatible with the DefaultSearchPlugin API. I have been trying to think of ways to use the existing API in a backwards-compatible way, e.g. extend input SearchInput {
facetValueIds: [ID!] | [[ID]]
} but this is not valid in GraphQL unfortunately. I guess in the docs we should highlight the improved facet-filtering capabilities of the ES plugin and advise devs to favour the use of the |
Yes, totally agree with you. Probably, i can extend DefaultSearchPlugin with new input and we can mark old input as deprecated. Seems, it would be more consistent and moreover, allow to write e2e tests. |
If you have the time to do that I would gladly accept it! I would also suggest renaming to |
Ok, i will do that in couple of days and update PR. One moment. How to mark field as deprecated? |
Or is there reason to divide implementation on separate PRs? |
You can keep it in the same PR. To mark as deprecated use the |
… add e2e tests, remove old docs feat(default-search-plugin): Add facetValueFilters input with e2e tests, mark facetValueIds and facetValueOperator deprecated
Ok, probably done. Please review :) Probably this might be added to docs somewhere:
|
…ot cause indexing to fail' test, that can cause random fail of other tests
This is great. I have 1 last bit of feedback: When I was manually testing out the filters, I found it difficult to remember whether I should be using Consider the current naming:
What do you think of a more explicit naming, such as replacing
|
Great idea! Need 20 minutes to make this rename |
…d" to "and" and rename "facetValueIds" to "or" #726
Did you generate the types with the ES plugin configured? |
Yes, ma fault :( |
OK. Push again with corrected codegen and it's ready to merge 👍 |
Thank you! |
Related #726
This PR hasn't e2e test (only unit tests), because i don't know how to safely extend generated-e2e-shop-types.ts with new field.