Experimental play with GraphQL - needs major refactor
Goals:
- Transform the Formula 1 ergast API into a graphQL API
go run formulagraphql/main.goOpen a browser to localhost:8080.
Try a payload of
query {
DriverStandings(filter: {year: "2018", top: 5}){
drivers {
points
Driver {
code
givenName
familyName
}
}
}
}GQL_ADDR=http:/localhost:8080 dx serve --port 8090Open a browser to localhost
go test ./...Modify the graph/schema.graphqls file, and run go run github.com/99designs/gqlgen generate.
This should update any resolver function signatures, then modify the resolver function itself to support the new updates.
This was being actively developed on twitch (it may come back) :)