Created
February 1, 2020 01:09
-
-
Save stemmlerjs/d764de43bfd610bb44efec4c7177bc2d to your computer and use it in GitHub Desktop.
Studyspots schema
This file contains hidden or 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
| enum SpotType { | |
| Bar, | |
| Restaurant, | |
| Cafe, | |
| Mall | |
| } | |
| enum SoundType { | |
| Chatter, | |
| Natural, | |
| City, | |
| Music, | |
| } | |
| enum SoundLevel { | |
| Low, | |
| Moderate, | |
| Loud | |
| } | |
| enum PeoplePresenceType { | |
| Low, | |
| Moderate, | |
| Packed | |
| } | |
| type Review { | |
| comment: String | |
| rating: Integer! | |
| upvotes: Integer! | |
| downvotes: Integer! | |
| } | |
| enum Reputation { | |
| Fresh | |
| } | |
| type User { | |
| userId: ID! | |
| email: String! | |
| username: String! | |
| password: String! | |
| } | |
| type Member { | |
| memberId: ID! | |
| baseUserId: ID! | |
| username: String! | |
| reputation: Reputation | |
| picture: String | |
| } | |
| type Seating { | |
| hasStandingSurfaces: Boolean! | |
| hasComfortableSeating: Boolean! | |
| } | |
| type Sound { | |
| soundTypes: [SoundType!]! | |
| soundLevel: SoundLevel! | |
| } | |
| enum Lighting { | |
| Dim, | |
| Natural, | |
| Bright | |
| } | |
| type Location { | |
| locationId: ID! | |
| address: String! | |
| cityName: String! | |
| provinceOrState: String! | |
| country: String! | |
| } | |
| type Spot { | |
| spotId: ID! | |
| spottedBy: Member! | |
| spotType: SpotType! | |
| title: String! | |
| peoplePresenceType: PeoplePresenceType! | |
| hasPlugs: Boolean! | |
| seating: Seating! | |
| sound: Sound! | |
| lighting: Lighting! | |
| reviews: [Review]! | |
| location: Location! | |
| } | |
| type LocationFiltersInput { | |
| address: String | |
| cityName: String | |
| provinceOrState: String | |
| } | |
| type GetAndFilterSpotsOptions { | |
| pageSize: Int | |
| after: String | |
| # Filters | |
| filterByTitle: String | |
| filterByPeoplePresenceType: PeoplePresenceType | |
| filterByHasPlugs: Boolean | |
| filterByHasStandingSurfaces: Boolean | |
| filterByHasComfortableSeating: Boolean | |
| filterBySpotType: SpotType | |
| filterBySoundType: SountType | |
| filterBySoundLevel: SoundLevel | |
| filterByLighting: Lighting | |
| filterByLocation: LocationFiltersInput | |
| } | |
| type SpotsConnection { | |
| cursor: String! | |
| hasMore: Boolean! | |
| spots: [Spot]! | |
| } | |
| type Query { | |
| spotById (id: ID!): Spot | |
| getAndFilterSpots (options: GetAndFilterSpotsOptions): SpotsConnection! | |
| } | |
| type CreateSpotInput { | |
| spotType: SpotType! | |
| title: String! | |
| peoplePresenceType: PeoplePresenceType! | |
| hasPlugs: Boolean! | |
| seating: Seating! | |
| sound: Sound! | |
| lighting: Lighting! | |
| location: Location! | |
| } | |
| type CreateSpotResult { | |
| success: Boolean! | |
| spot: Spot | |
| } | |
| type Mutation { | |
| createSpot (data: CreateSpotInput!): CreateSpotResult! | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment