Collective's locations
How we deal with collective's addresses and countries

GraphQL API

On the GraphQL side things are easy, you can just fetch collective.location and you'll get an object like:
1
{
2
name: { type: GraphQLString },
3
address: { type: GraphQLString },
4
country: { type: GraphQLString },
5
lat: { type: GraphQLFloat },
6
long: { type: GraphQLFloat },
7
}
Copied!

Database

On the database side things are organized this way:
  • geoLocationLatLong => coordinates (eg. POINT (43.6515899 -70.29052239999999))
  • countryISO => two letters country code (eg. FR, BE...etc)
  • address => postal address normally without country (eg. 12 opensource avenue, 7500 Paris)
  • locationName => a name for the location (eg. Google Headquarters)
Export as PDF
Copy link