Created
September 28, 2017 15:34
-
-
Save WesSouza/8f52a54e25e3ab904f0bacc30d3b2983 to your computer and use it in GitHub Desktop.
Choosing GraphQL for your API - Schema
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
# The Meetup object, and all of its properties | |
type Meetup { | |
id: ID! | |
name: String! | |
description: String! | |
price: Int! | |
priceFormatted: String! | |
isAvailable: Boolean! | |
} | |
# Exclamation marks indicate the field cannot be null, so it always returns the | |
# expected value type | |
# The Wishlist object has one property, an array of meetups | |
type Wishlist { | |
meetups: [Meetup!]! | |
} | |
# The RootQuery object is used as a starting point for all the queries a client | |
# can run | |
type RootQuery { | |
meetup(id: ID!): Meetup | |
meetups: [Meetup!]! | |
wishlist: Wishlist | |
} | |
# The schema keyword defines the entry point of a GraphQL schema | |
schema { | |
query: RootQuery | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment