Last active
January 4, 2018 12:57
-
-
Save dave-nicholas/182c2ff15f5edfb0857059a4f2f982c5 to your computer and use it in GitHub Desktop.
apollo server typeDefs for blog article
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
const typeDefs = ` | |
type River { | |
id: Int | |
name: String | |
streams: [Stream] | |
} | |
type Stream { | |
id: Int | |
name: String | |
river: River | |
brooks: [Brook] | |
} | |
type Brook { | |
id: Int | |
name: String | |
stream: Stream | |
} | |
type Query { | |
river(id: Int): River | |
streams(limit: Int): [Stream] | |
BrooksByRiverName(name: String) [Brook] | |
} | |
schema { | |
query: Query | |
} | |
`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment