Is there a Standard/Recomended way to do Location ...
# prisma-whats-new
j
Is there a Standard/Recomended way to do Location with GraphQL?
Copy code
*Less Important Questions, which are derived from my likely false assumptions:*

Should I create a Type and give it relations? 

Should I just stick Lat and Lon in their own fields in the other types? 

If I wanted city, zip, lat lon, country, state, county, etc. 
Would they be fields in a location type or would I be creating types for each category and then just relate them to eachother?
s
I’d guess this would end up being quite specific to the database you choose. For Postgres, I’d either look at PostGIS https://postgis.net/ or do something myself using https://www.postgresql.org/docs/9.1/static/datatype-geometric.html
j
Thanks!
s
@Jack Peterson that’s a great question - can you ask it again in the forum so other people can profit from the answer in the future as well?
m
If it does go in the forum, could you put a link here and @ me? This makes me wonder whether there is something like a "standard library" of GQL interfaces, providing something like a canonical way to do locations, street addresses, blog articles, ... (and if not, should there be?)
s
@i1g was working on something similar!