-
-
Save freiksenet/327e8ece1bdcbc5aee8f6b5ed1fc359a to your computer and use it in GitHub Desktop.
Schema Transforms
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
type User { | |
_id: ID! | |
username: String | |
blogs: [Blog] | |
} | |
type Blog { | |
_id: ID! | |
user: User | |
title: String! | |
text: String | |
} | |
type Query { | |
userById(id: ID!): User | |
blogById(id: ID!): Blog | |
} |
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
interface Node { | |
id: ID! | |
} | |
extend type User implements Node { | |
id: ID! | |
} | |
extend type Blog implements Node { | |
id: ID! | |
} | |
extend type Query { | |
node(id: ID!): Node | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment