eswat2 / gt-sports

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

Home Page:https://gt-sports.vercel.app/graphql

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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...

https://gt-sports.vercel.app/graphql


Languages

Language:HTML 54.8%Language:JavaScript 45.2%