An open API service indexing awesome lists of open source software.

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.

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"
}
```