Skip to content

Instantly share code, notes, and snippets.

@dave-nicholas
Last active January 4, 2018 12:57
Show Gist options
  • Save dave-nicholas/182c2ff15f5edfb0857059a4f2f982c5 to your computer and use it in GitHub Desktop.
Save dave-nicholas/182c2ff15f5edfb0857059a4f2f982c5 to your computer and use it in GitHub Desktop.
apollo server typeDefs for blog article
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