Heyo! Well, certainly updating coordinates for people isn't a difficult thing to accomplish using Prisma's generated update mutations.
I can't claim I have some special knowledge about GPS coordinates so I'm just going to offer my arm-chair suggestion. To find people I would figure you'd certainly want to get use Decimal Degrees for your coordinates.
https://en.wikipedia.org/wiki/Decimal_degrees
That way you can use less-than/greater-than comparisons to find people within a certain square distance from each other. Find out the east/west scale first based on the person's current latitude and from there you could take a rider and search for drivers who are within a certain decimal-point distance from each other.
So if a rider is at like, 6.422235, 3.409556, chilling on Victoria Island in Lagos (my girlfriend is from there haha), you'd want to search for drivers whose coordinates are +/- 0.01 in both directions (about 1km at the equator).
So something like this I suppose!
query nearbyDrivers {
drivers(
where: {
AND: {
lat_gte: 6.412235,
lat_lte: 6.432235,
long_gte: 3.399556,
long_lte: 3.419556
}
}
) {
id
}
}