https://github.com/robsonkades/spring-boot-api-with-graphql-example
📦 ⚡ 🚀 Exemplo de uma aplicação Java desenvolvida com Spring Boot, Spring Data e GraphQl.
https://github.com/robsonkades/spring-boot-api-with-graphql-example
graphql java spring-boot spring-data-jpa
Last synced: 3 months ago
JSON representation
📦 ⚡ 🚀 Exemplo de uma aplicação Java desenvolvida com Spring Boot, Spring Data e GraphQl.
- Host: GitHub
- URL: https://github.com/robsonkades/spring-boot-api-with-graphql-example
- Owner: robsonkades
- Created: 2018-05-22T00:01:13.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-22T00:26:01.000Z (about 7 years ago)
- Last Synced: 2025-01-11T02:51:44.021Z (5 months ago)
- Topics: graphql, java, spring-boot, spring-data-jpa
- Language: Java
- Homepage:
- Size: 12.7 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# EXAMPLE SPRING-BOOT, SPRING-DATA AND GRAPHQL.
mvn spring-boot:run
http://localhost:8080/graphiq
### Mutation
```
mutation newAuthor($input: String!) {
newAuthor(name: $input) {
id
name
}
}
``````
mutation newPost($title: String!, $content: String!, $mmm: String!,) {
newPost(title: $title, content: $content, author: $mmm) {
id
title
content
author {
id,
name
}
}
}
```### Query
```
query findPosts {
posts {
id
title
content
author {
id,
name
}
}
}
``````
query findAll {
authors {
id
name
}
}
``````
query findPageAuthors($page: Int!) {
pageAuthors(pageSize: $page) {
pageNumber
numberPages
totalElements
authors {
id
}
}
}
```Variables
```
{
"input": "Robson Kadees",
"page": 0,
"title": "TEste",
"content": "jdsaoijdisajdojiasijodas",
"mmm": "5001"
}
```