DotNetCore API with GraphQL
intially taken from https://blexin.com/en/blog-en/creating-our-api-with-graphql-and-hot-chocolate/.
Modified to demo HotChocolate functionality
query all books
query
{
books
{
nodes
{
id,
title
}
}
}
delete book
mutation
{
deleteBook(inputBook:
{
id: 4
}
)
{
title
}
}
create book
mutation
{
createBook(inputBook: {
title: "Приключения капитана Вру"
authorId: 1
price: 1999
})
{
id
}
}
update book
mutation
{
updateBook(inputBook: {
id: 4
title: "Winny the Pooh"
})
{
title
}
}