Skip to content

Instantly share code, notes, and snippets.

@proton0210
Created February 8, 2024 17:04
Show Gist options
  • Save proton0210/b1756e728781c4ee80fbf878f683705f to your computer and use it in GitHub Desktop.
Save proton0210/b1756e728781c4ee80fbf878f683705f to your computer and use it in GitHub Desktop.
type User {
id: ID!
name: String!
email: String!
}
type Todo {
TodoID: ID!
UserID: ID!
title: String!
completed: Boolean!
}
input CreateTodoInput {
UserID: ID!
title: String!
}
input UpdateTodoInput {
UserID: ID!
title: String
}
input DeleteTodoInput {
UserID: ID!
title: String!
}
type Mutation {
createTodo(input: CreateTodoInput!): Todo
updateTodo(input: UpdateTodoInput!): Boolean
deleteTodo(input: DeleteTodoInput!): Boolean
}
type Query {
listTodos(UserID: ID!): [Todo]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment