-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update infratographer/x to enable event traces (#38)
# Summary of Changes - Updates x package to enable tracing - re-run `make generate` --------- Signed-off-by: Stephen Hwang <126002920+sthwang-metal@users.noreply.github.com>
- Loading branch information
1 parent
dab8e82
commit f03d0c6
Showing
10 changed files
with
251 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,56 @@ | ||
# Location API | ||
|
||
Provides GraphQL APIs to manage locations | ||
|
||
## Development and Contributing | ||
|
||
- [Development Guide](docs/development.md) | ||
- [Contributing](https://infratographer.com/community/contributing/) | ||
|
||
### Getting Started | ||
|
||
To begin start by opening the devcontainer as outlined in the [Development Guide](docs/development.md) | ||
|
||
**To initialize the database:** | ||
1. `go build` | ||
1. `./location-api migrate up` | ||
|
||
**To run the api** | ||
```sh | ||
make go-run | ||
``` | ||
|
||
**Interacting with the GraphQL queries:** | ||
> Go to localhost:XXXX/playground | ||
## Example GraphQL Queries | ||
|
||
### Create Location Mutation | ||
|
||
Input: | ||
```graphql | ||
mutation { | ||
locationCreate(input:{ | ||
name: "DA", | ||
ownerID: "testtnt-123456", | ||
description: "DA Metro" | ||
}) { | ||
location{ | ||
id | ||
} | ||
} | ||
} | ||
``` | ||
|
||
Output: | ||
```json | ||
{ | ||
"data": { | ||
"locationCreate": { | ||
"location": { | ||
"id": "lctnloc-NW_5CWPx3xeOuh4Ak2WgS" | ||
} | ||
} | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.