Skip to content

Conversation

henrygr
Copy link
Member

@henrygr henrygr commented Oct 27, 2026

Summary

  • Add search(term) query: a minimal flat SearchResult covering both venues and cities, exposing type (venue/city), name, coordinates, address, opening hours, and the latest non-limited price sighting (null for cities)
  • Add city(name) query with case-insensitive city name search
  • Extend venue with optional lat/lon arguments that sort venues by proximity (nearest first); without coordinates the query behaves as before
  • Add haversine_distance(lat1, lon1, lat2, lon2) user-defined SQL function (IMMUTABLE, PARALLEL SAFE) via migration, used for proximity sorting
  • Add required lat/lon columns to venue (migration) with coordinates for all seeded venues
  • Add latestUnlimitedSighting helper (latest sighting without TIME/MEMBERSHIP limitations)
  • Export OpeningHours and PriceSighting model types from @t09-project-2/db

Notes

  • Venues match the search term on name or address; cities on name; all matching is case-insensitive
  • The venue query keeps the latest-per-category price sighting filtering in both sort modes

@henrygr henrygr self-assigned this Oct 27, 2026
@henrygr henrygr marked this pull request as ready for review October 27, 2026 19:14
@henrygr henrygr requested a review from a team as a code owner October 27, 2026 19:14
Copy link
Member

@sivertlv sivertlv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its cool

@henrygr henrygr merged commit 996a827 into main Oct 27, 2026
1 check passed
@henrygr henrygr deleted the graphql-search-and-proximity branch October 27, 2026 19:22
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants