Skip to content

Instantly share code, notes, and snippets.

@grantnorwood
Last active July 20, 2019 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grantnorwood/ec99ae6b05081d235345de132adc6190 to your computer and use it in GitHub Desktop.
Save grantnorwood/ec99ae6b05081d235345de132adc6190 to your computer and use it in GitHub Desktop.
GraphQL Nullability - Initial non-nullable schema
### Initial schema
type Query {
vacationRentalById(id: $id) : VacationRental
}
type VacationRental {
id: ID!
title: String!
description: String!
owner: Owner!
roomCount: Int!
address: Address!
geolocation: GeoLocation!
price: Price!
}
type Owner {
name: String!
email: String!
phone: String!
twitterHandle: String!
inboxNotifications: [Notification]!
}
type Address {
line1: String!
line2: String!
city: String!
state: String!
zip: String!
}
type Price {
amount: Float!
currency: String!
}
type GeoLocation {
latitude: String!
longitude: String!
}
type Notification {
timestamp: String!
message: String!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment