also, just a thing, I'm not sure what you're build...
# orm-help
c
also, just a thing, I'm not sure what you're building, but doing search with a mandatory
id
field seems wrong. šŸ™‚
k
it's the
id
of a location and the query searches for other locations inside the
radius
šŸ™‚
šŸ‘ 1
c
I’m just saying that it seems complicated:) IMHO you could send the location as args. Just think about knowing user location in the background and wuery it without having to create that location and the query search results:)
Also, if for example you'll have a map where the user can add a marker, you'll spam the database by creating the marker position in order to get the apartments nearby that marker šŸ™‚
Oh šŸ™‚ got it, you're searching for possible other apartments nearby the current apartment šŸ™‚
But is a perf problem here because you already have the current apartment location šŸ™‚
k
But a user can have multiple apartments šŸ˜‰
c
But each apartment has a location šŸ˜Ž
r
@kratam sounds fun, are you using postgis + prisma for doing the radius queries?
k
@rikki it's much simpler, I store
lat
and
lng
as `Float`s and use
geolib
c
@rikki you can check my initial example about geolib here: https://github.com/catalinmiron/prisma-graphql-coordinates.