Skip to content

infratographer/location-api

Location API

Provides GraphQL APIs to manage locations

Development and Contributing

Getting Started

To begin start by opening the devcontainer as outlined in the Development Guide

To initialize the database:

  1. go build
  2. ./location-api migrate up

To run the api

make go-run

Interacting with the GraphQL queries:

Go to localhost:XXXX/playground

Example GraphQL Queries

Create Location Mutation

Input:

mutation {
    locationCreate(input:{
        name: "DA",
        ownerID: "testtnt-123456",
        description: "DA Metro"
    }) {
        location{
            id
        }
    }
}

Output:

{
    "data": {
        "locationCreate": {
            "location": {
                "id": "lctnloc-NW_5CWPx3xeOuh4Ak2WgS"
            }
        }
    }
}