Skip to content

eswat2/gt-sports

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 - a simple REST server with GTS data
  • 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

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

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published