Last active
June 8, 2018 13:55
-
-
Save dsandip/ac91835d38846c261b6095e740ee1e89 to your computer and use it in GitHub Desktop.
schema for a blog app's database
This file contains hidden or 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 Query { | |
author(firstName: String, lastName: String): Author | |
allAuthors: [Author] | |
allArticles: [Article] | |
} | |
type Author { | |
id: Int | |
firstName: String | |
lastName: String | |
articles: [Article] | |
} | |
type Article { | |
id: Int | |
title: String | |
text: String | |
views: Int | |
author: Author | |
} | |
`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment