Skip to content

Instantly share code, notes, and snippets.

@sueannioanis
Created January 18, 2020 20:14
Show Gist options
  • Select an option

  • Save sueannioanis/da07b7489cbcb473178b694e77ee94f2 to your computer and use it in GitHub Desktop.

Select an option

Save sueannioanis/da07b7489cbcb473178b694e77ee94f2 to your computer and use it in GitHub Desktop.
Schema v1
type User {
id: ID!
tripIds: [Trip!]!
name: String!
}
type Trip {
id: ID!
description: String!
name: String!
users: [User!]!
locations: [Location!]!
}
type Location {
id: ID!
name: String!
lat: Int!
description: String!
lon: Int!
}
input UserInput {
name: String!
}
input TripInput {
description: String!
name: String!
users: [User!]!
locations: [Location!]!
}
input LocationInput {
name: String!
lat: Int!
description: String!
lon: Int!
}
type Query {
getTripsByUser(userId: String!): [Trip!]!
}
type Mutation {
createUser(input: UserInput!): User!
createTrip(input: TripInput!): Trip!
createLocation(input: LocationInput!): Location!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment