Skip to content

Instantly share code, notes, and snippets.

@shrirambalakrishnan
Last active October 18, 2020 20:18
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 shrirambalakrishnan/f8b2520ef9d6e1a3d7157e62c31fdfdc to your computer and use it in GitHub Desktop.
Save shrirambalakrishnan/f8b2520ef9d6e1a3d7157e62c31fdfdc to your computer and use it in GitHub Desktop.
const typeDefs = gql`
input PostInputType {
id: Int!
title: String!
description: String
}
type CommentType {
id: Int!
comment: String!
}
type PostType {
id: Int!
title: String
description: String
comments: [CommentType]
}
type UserType {
id: Int
name: String
email: String
posts: [PostType]
}
type Query {
users: [UserType]
posts: [PostType]
}
`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment