An open API service indexing awesome lists of open source software.

https://github.com/eswat2/gt-sports

a simple GraphQL & REST server using cars from GT Sport...
https://github.com/eswat2/gt-sports

graphql gtsport nodejs zeit-now

Last synced: 3 months ago
JSON representation

a simple GraphQL & REST server using cars from GT Sport...

Awesome Lists containing this project

README

        

# gt-sports

A prototype GraphQL server which uses the cars from GT Sports (video game). A technology demonstration leveraging the node microservices model provided by ZEIT Now.

Underneath, the resolvers use 2 different mock servers:

- [mock-gts][mock-gts] - _a simple REST server with GTS data_
- [mock-x43][mock-x43] - _a simple REST server with mock apis_

## dev

To try this locally, run the following:

1. `yarn`
2. `now dev`

The `now dev` command allows you to test the ZEIT Now app locally.

## graphql

- [/graphql][gql-io] - _the playground_

Here's the current schema:

```
type Query {
solution: Solution
cars: [GTSport]
exotics: [GTSport]
groups: [String]
makes: [String]
colors(count: Int!): [String]
hash(count: Int!): [String]
lorem(count: Int!): [String]
slug(count: Int!): String
uuid(count: Int!): [String]
}

type Solution {
id: String
data: DealerGroup
summary: GroupSummary
}

type DealerGroup {
dealers: [Dealer]
}

type Dealer {
dealerId: String
name: String
vehicles: [Vehicle]
}

type GTSport {
year: Int
make: String
model: String
group: String
}

type Vehicle {
vin: String
year: Int
make: String
model: String
group: String
color: String
}

type GroupSummary {
groups: [String]
makes: [String]
vins: [String]
counts: GroupCounts
}

type GroupCounts {
dealers: Int
groups: Int
makes: Int
vehicles: Int
}
```

## who

- Richard Hess
- [eswat2.github.io][eswat2-io]

[eswat2-io]: https://eswat2.github.io
[gql-io]: https://gt-sports.vercel.app/graphql
[mock-gts]: https://mock-gts.vercel.app/api
[mock-x43]: https://mock-x43.vercel.app/api