rage / mooc.fi

https://mooc.fi
5 stars 6 forks source link

Feat: user search returns partial results #1161

Closed mipyykko closed 1 year ago

mipyykko commented 1 year ago

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.