OpenBeta / openbeta-graphql

The open source rock climbing API
https://openbeta.io
GNU Affero General Public License v3.0
41 stars 32 forks source link
climbing climbing-api climbing-data graphql rock-climbing

Build License

All Contributors

Climbing Route Catalog API

What is this?

OpenBeta Graph API allows other applications to access the OpenBeta climbing database using any standard GraphQL clients.

Endpoint:

We recommend using an online playground to explore the API.

Learn more about GraphQL

Example query

Get all sub-areas at Smith Rock

query Example1 {
  areas(filter: {area_name: {match: "Smith Rock"}}) {
    area_name
    children {
      area_name
      metadata {
        lat
        lng
      }
    }
  }
}

# Result
{
  "data": {
    "areas": [
      {
        "area_name": "Smith Rock",
        "children": [
          {
            "area_name": "Aggro Gully",
            "metadata": {
              "lat": 44.36724,
              "lng": -121.14238
            }
          },
          {
            "area_name": "Angel Flight Crags",
            "metadata": {
              "lat": 44.5672,
              "lng": -122.1269
            }
          },
       ...
        ]
      }
    ]
  }
}

Development

Requirements

  1. Add '127.0.0.1 mongodb' entry to your /etc/hosts file (or C:\Windows\System32\drivers\etc\hosts on Windows)
127.0.0.1       mongodb
  1. Launch mongodb dev stack: database server and mongo-express (web-based admin console for mongo):
docker compose up -d
  1. Seed your local database with data from staging environment
yarn install
yarn seed-db   # May take a few minutes to download a large database file
  1. Start the GraphQL server
    yarn serve

Navigating the codebase

These links explain the structure and key abstractions of our codebase. It's a good place to start before you go spelunking in the code.

Troubleshooting

Tips

Questions?

This project is under active development. Join us on Discord!

License

The source code is licensed under the Affero GPL v3.0 license.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Kendra Gibbons
Kendra Gibbons

πŸ’» πŸ€”
Paul Phillips
Paul Phillips

πŸ€”
admanny
admanny

πŸ’»
Colin Gale
Colin Gale

πŸ’» πŸ€”
Brendan Downing
Brendan Downing

πŸ’» πŸ€”
Darren Lew
Darren Lew

πŸ€” πŸ’»
Sundev
Sundev

πŸ’» πŸ€”
Siman Shrestha
Siman Shrestha

πŸ’» πŸ€”
Silthus
Silthus

πŸ€” πŸ’»
Bradley Lignoski
Bradley Lignoski

πŸ’» πŸ€”
zkao
zkao

πŸ’» πŸ€”
Nathan Musoke
Nathan Musoke

πŸ’» πŸ€”
Bill Huang
Bill Huang

πŸ’»
Klaus
Klaus

πŸ’» πŸ€”
Iacami Gevaerd
Iacami Gevaerd

πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!