Skip to content

📦 ⚡ 🚀 Exemplo de uma aplicação Java desenvolvida com Spring Boot, Spring Data e GraphQl.

Notifications You must be signed in to change notification settings

robsonkades/spring-boot-api-with-graphql-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

📦 ⚡ 🚀 Exemplo de uma aplicação Java desenvolvida com Spring Boot, Spring Data e GraphQl.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages