Download dependencies with:
$ go mod tidy && go mod vendor
Run application with:
$ go run main.go
Build application with:
$ go build -o xquestions main.go
Access the GraphiQL interface:
Open browser to http://localhost:{PORT}/graphiql
Live GraphiQL Playground: Heroku App
In the root of the application, run go test ./...
to run all test suites
Definitions
- type:string
- margin:string
Query
query CalculatePrice {
calculatePrice(type: "buy", margin: 0.2, exchangeRate: 476)
}
Response
{
"data": {
"calculatePrice": 26467774.368
}
}