Algolia Auto-Sync for GraphQL backends

Hey there! I’m Nilan from Graphcool and I’ve written a tutorial that shows how you can automatically synchronize your data from a GraphQL backend to Algolia.

With React Instantsearch, you can quickly build this example Craftbeer with GraphQL & Algolia :beers:.



Hi @nilan, thanks for sharing!

Mmmm craft beer. We actually just had the lovely folks from Hopsy come to our team happy hour in SF. They brought 6 different beers including the Island Haze IPA from Alameda Island Brewing Company, definitely a new personal favorite.

Johannes came by this week and gave me a demo of Graphcool - really impressive stuff and great work you’re doing over there. One thing I love that you’re doing w/ the Algolia integration is helping developers understand how indexing operations map to quota usage. :+1: to that.

Question about the demo - how is “Specific Brewery” meant to work? I see that it changes the brewery but I can’t select which one to filter on. Looks like a job for a RefinementList?

Thanks for your answer @dzello!

Aww too bad, that brewery is not listed yet in the Craft Cans DB that I used for that example :smiley:

Indeed, it really helps you to get a feel for what’s happening under the hood! :spy:

We included the specific brewery view to illustrate the filter feature for the integration. Using the familiar filter syntax, you can control exactly which data items are synced to the search index. In this case I added a separate search index only for beers brewed in the “Champion Brewing Company”.

In another setting, such as a blog, you could use this filter system to only sync published post to the search index. As the search experience is relying on the data in the search index, features like Refinement Lists and Filter&Faceting still work as usual :slight_smile:

1 Like

Thanks @nilan, I see more of what you’re trying to accomplish there now w/ showing the filter use case.

I would still recommend reworking the UI, maybe moving the specific brewery feature under a different search somewhere else on the page. You could even add some text that explains that that search is going against an index built with partial sync. My concern is that the average Algolia user is expecting different functionality based on that UI, and I think a few changes like that and adding the Refinement list would help make them feel right at home.