Feat: user search returns partial results #1161
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
User search built up a very complicated and slow query with zillions of different conditions, so now we go through each of the possible conditions one by one with a separate query and return the results through a subscription. This way the search feels more responsive. Also added some meta information on the searches in the form, if someone should ever need that -- probably not, but that was almost a side effect of the implementation.
GraphQL playground didn't like subscriptions (probably using some other implementation of subscriptions) so I guess we're using the newer default Apollo ones now. It did only affect the subscription, though, so if we don't really need to do that in the playground, then we can revert. Tthe old user search works there as well.