Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ali-ahnaf/dotnet-demos
Contains a bunch of demos illustrating different functionalities of .NET
https://github.com/ali-ahnaf/dotnet-demos
dotnet-core hotchocolate hotchocolate-graphql jwt-authentication mongodb mongodb-driver webapi
Last synced: 17 days ago
JSON representation
Contains a bunch of demos illustrating different functionalities of .NET
- Host: GitHub
- URL: https://github.com/ali-ahnaf/dotnet-demos
- Owner: ali-ahnaf
- Created: 2021-07-19T21:19:39.000Z (over 3 years ago)
- Default Branch: graphql
- Last Pushed: 2021-08-13T14:36:23.000Z (over 3 years ago)
- Last Synced: 2024-12-30T03:26:53.373Z (26 days ago)
- Topics: dotnet-core, hotchocolate, hotchocolate-graphql, jwt-authentication, mongodb, mongodb-driver, webapi
- Language: C#
- Homepage:
- Size: 8.09 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dotnet-graphql-demo
A demo project illustrating the basics of graphql with HotChocolateReferences:
- https://chillicream.com/docs/hotchocolate/get-started## Follow the steps to run:
- clone the repo
- run ```dotnet watch run```
- go to the mock up url generated. Mine was at ```https://localhost:5001/graphql```### Example queries:
```graphql
query GetBookById{
book(id: "asdasd2313") {
title
author {
name
}
}
}query GetBooks{
allBooks{
title
author{
name
}
}
}
```
### Example mutations:
```graphql
mutation AddAuthor {
addAuthor(input: { name: "Hashem", age: 22, booksWritten: 10 }) {
name
age
}
}mutation AddBook {
addBook(
input: {
author: { name: "Hashem", age: 40, booksWritten: 5 }
title: "Sex and the City"
}
) {
author{
age
name
booksWritten
}
title
}
}
```