Skip to content

Instantly share code, notes, and snippets.

@LunaticMuch
Created October 2, 2023 19:52
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 LunaticMuch/b0910195dbbbdf39fbf5df3af70425a6 to your computer and use it in GitHub Desktop.
Save LunaticMuch/b0910195dbbbdf39fbf5df3af70425a6 to your computer and use it in GitHub Desktop.
Demo schema for deprecated
type Author {
firstName: String @deprecated
id: Int! @deprecated(reason: "Thrown away")
lastName: String
posts: [Post!]!
}
type Comment {
comment: String!
id: Int!
postId: Int!
}
type Mutation {
addComment(comment: String!, postId: Int!): Comment!
addPost(authorId: Int!, title: String!): Post!
upvotePost(postId: Int!): Post!
}
type Post {
author: Author!
comments: [Comment]!
id: Int!
title: String!
votes: Int
}
type Query {
author(id: Int!): Author!
comment(id: Int!): Comment!
post(id: Int!): Post!
}
type Subscription {
postAdded: Post!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment