https://github.com/beratyesbek/graphql-app-spring
Simple Graphql application
https://github.com/beratyesbek/graphql-app-spring
graphql postgresql spring-boot
Last synced: 2 months ago
JSON representation
Simple Graphql application
- Host: GitHub
- URL: https://github.com/beratyesbek/graphql-app-spring
- Owner: BeratYesbek
- Created: 2022-12-31T15:13:25.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-31T20:13:07.000Z (almost 3 years ago)
- Last Synced: 2025-01-08T20:13:10.672Z (9 months ago)
- Topics: graphql, postgresql, spring-boot
- Language: Java
- Homepage:
- Size: 64.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Simple Graphql application that contains PostgreSQL and Hibernate
### Queries
```
query{
getAuthorById(id:1) {
id
firstName
lastName
books {
id
name
pageCount
}
}
}```
```
query{
bookById(id:1) {
id
name
pageCount
author {
id
firstName
lastName
}
}
}```
```
query{
books {
id
name
pageCount
author {
id
firstName
lastName
}
}
}
```### Mutations
```
mutation{
createBook(name: "Incognito: The Secret Lives of the Brain", pageCount: 304, authorId: 3) {
id
name
pageCount
author {
id
firstName
lastName
}
}
}
``````
mutation{
updateBook(id:3,name: "Incognito: The Secret Lives of the Brain", pageCount: 304, authorId: 3) {
id
name
pageCount
author {
id
firstName
lastName
}
}
}
``````
mutation{
deleteBook(id:3)
}
``````
mutation{
createAuthor(firstName:"Fyodor Mikhailovich",lastName: "Dostoevsky") {
id
firstName
lastName
}
}
``````
mutation{
updateAuthor(id: 4,firstName:"Fyodor Mikhailovich",lastName: "Dostoevsky") {
id
firstName
lastName
}
}
```