Skip to content

Instantly share code, notes, and snippets.

@freiksenet
Last active April 6, 2018 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freiksenet/327e8ece1bdcbc5aee8f6b5ed1fc359a to your computer and use it in GitHub Desktop.
Save freiksenet/327e8ece1bdcbc5aee8f6b5ed1fc359a to your computer and use it in GitHub Desktop.
Schema Transforms
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
}
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