Created
January 26, 2018 14:01
-
-
Save bherr2/8d20f2412bb384906121489eeb65299c to your computer and use it in GitHub Desktop.
AISL Schema (WIP)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scalar Date | |
type Avatar { | |
id: ID! | |
name: String | |
runMillis: Int | |
} | |
input NewAvatar { | |
name: String | |
runMillis: Int | |
} | |
enum GENDER { | |
male | |
female | |
other | |
} | |
enum HANDEDNESS { | |
left | |
right | |
} | |
type Persona { | |
id: ID! | |
name: String | |
icon: String | |
color: String | |
gender: GENDER | |
age_group: String | |
handedness: HANDEDNESS | |
zipcode: String | |
state: String | |
latitude: Float | |
longitude: Float | |
} | |
input NewPersona { | |
name: String | |
icon: String | |
color: String | |
gender: GENDER | |
age_group: String | |
handedness: HANDEDNESS | |
zipcode: String | |
state: String | |
latitude: Float | |
longitude: Float | |
} | |
type Run { | |
avatar: Avatar! | |
persona: Persona! | |
timestamp: String | |
lane: Int | |
started: Boolean | |
falseStart: Boolean | |
timeMillis: Int | |
} | |
type RunRecord { | |
avatar: ID! | |
persona: ID! | |
timestamp: String | |
lane: Int | |
started: Boolean | |
falseStart: Boolean | |
timeMillis: Int | |
asRun: Run | |
} | |
input NewRunRecord { | |
avatar: ID! | |
persona: ID! | |
timestamp: String | |
lane: Int | |
started: Boolean | |
falseStart: Boolean | |
timeMillis: Int | |
} | |
interface Message { | |
type: String | |
timestamp: String | |
} | |
type RunSelectedMessage implements Message { | |
type: String | |
timestamp: String | |
avatar: Avatar | |
} | |
type RaceInitiatedMessage implements Message { | |
type: String | |
timestamp: String | |
avatar: Avatar | |
} | |
type RaceResult { | |
lane: Int | |
persona: Persona | |
started: Boolean | |
falseStart: Boolean | |
timeMillis: Int | |
} | |
type RaceCompletedMessage implements Message { | |
type: String | |
timestamp: String | |
avatar: Avatar | |
results: [RaceResult]! | |
} | |
type AnyMessage implements Message { | |
type: String! | |
timestamp: String! | |
avatar: Avatar | |
results: [RaceResult] | |
} | |
input NewRaceResult { | |
lane: Int | |
persona: NewPersona | |
started: Boolean | |
falseStart: Boolean | |
timeMillis: Int | |
} | |
input NewAnyMessage { | |
type: String! | |
timestamp: String! | |
avatar: NewAvatar | |
results: [NewRaceResult] | |
} | |
type Query { | |
avatar(id: ID): Avatar | |
avatars(limit: Int = 20): [Avatar!]! | |
persona(id: ID): Persona | |
personas(limit: Int = 20): [Persona!]! | |
runRecords(lastX: Int): [RunRecord!]! | |
runs(lastX: Int): [RunRecord!]! | |
messages(lastX: Int): AnyMessage | |
} | |
type Mutation { | |
registerAvatar(avatar: NewAvatar): ID | |
registerPersona(persona: NewPersona): ID | |
raceCompleted(runs: [NewRunRecord!]!): [ID!]! | |
sendMessage(message: NewAnyMessage): Boolean | |
} | |
type Subscription { | |
messageStream: AnyMessage | |
runSelected: RunSelectedMessage | |
raceInitiated: RaceInitiatedMessage | |
raceCompleted: RaceCompletedMessage | |
runCompletedRecords: [RunRecord]! | |
runCompleted: [Run]! | |
} | |
schema { | |
query: Query | |
mutation: Mutation | |
subscription: Subscription | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment