Adding Algolia search to a project made in the new framework


#1

Hello everyone!

I just created a new graph.cool backend for a project that I wanted to use Algolia search on. However, upon creating the new project I realized that the integrations tab on the left wasn’t there in the new framework. How would I go about adding Algolia to a project using the new GraphCool Framework?

Thanks!


#2

You can use subscriptions for that. There’s an example implementation here:


#3

So I could get that working but it doesn’t seem to have the power that it previously did. I use to be able to set something up like

{
  node {
    name
    style
    abv
    ibu
    brewery {
      name
    }
  }
}

which would allow me to have the relational data in there as well. Giving me the ability to query on the brewery name as well as any parameters of the beer. Am I missing something? I tried to change the SyncQuery.graphql file to reflect the association but I couldn’t get it to run properly

subscription {
  SyncModel(filter: {
    mutation_in: [CREATED, UPDATED, DELETED]
  }) {
    mutation
    previousValues {
      objectID: id
    }
    node {
      objectID: id
      name
      style
      abv
      ibu
      brewery {
        name
      }
    }
  }
}

Am I missing something? Am I totally off in how I should be doing this?


#4

I *think* that should work, but I haven’t used that Algolia integration myself, I just knew it existed and linked to it :smiley: So I hope someone else can chime in here…