so now, filtering... can I implement a custom filt...
# prisma-whats-new
q
so now, filtering... can I implement a custom filter?
n
@qsys hey, sorry for the delayed response!
There are no custom filters yet, but it's a great use case for custom queries that is already on our roadmap: https://github.com/graphcool/feature-requests/issues/40
a current workaround for geo location queries that you are interested in is using our Algolia integration and then using the Algolia geo queries
I can help you out with that if this approachs works for you 🙂
q
ok... let me check Algolia first.
should I see the records from graphcool in Algolia? Algolia seems to be empty (after adding api keys etc)
n
could you try to update the nodes that you want to sync?
looks like we're having an issue with the initial sync of Algolia at the moment
q
🙂 should the save button gray out after pushing it?
(Or: where/how to update?)
I seem to have made a few api calls (15) to Algolia, but nothing happens 😛
The search query (on Event):
Copy code
{
    node {
      id
      createdAt
      _geoloc: location {
        lat
        lng
      }
    }
  }
The schema/model:
Copy code
type Location {
  createdAt: DateTime!
  id: ID!
  lat: Float!
  lng: Float!
  Event: Event @relation(name: "EventOnLocation")
  updatedAt: DateTime!
}
type Event {
  createdAt: DateTime!
  id: ID!
  location: Location @relation(name: "EventOnLocation")
  updatedAt: DateTime!
}
n
(Or: where/how to update?)
Hah that's tricky, because there's no field on
Event
that you can update
how many events do you already have stored?
q
only 1 - was just trying to see if I can things to work 🙂
n
then could you just create a new event and see if it is synced to algolia?
q
Oh, sure... np
ok, works... I should've tried that before 🙂. Thanks a lot! (Now, let's check if I can get all events within a certain distance from a given location from Algolia :p)
n
awesome! 🙂
q
Does it work both ways? (sync from Algolia to Graphcool as well?)
n
no
the way it works is that our integration pushes data changes to the Algolia index
q
ok, np, just to know...
great anyway.
n
here's some docs for geo queries with Algolia: https://www.algolia.com/doc/guides/geo-search/geo-search-overview/
👍 1