Skip to content

netodeolino/spring-graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub stars GitHub issues GitHub forks

Spring Boot - GraphQL Study

Info

  1. Schema
http://localhost:8080/graphql/schema.json
  1. GraphQL endpoint
http://localhost:8080/graphql

Create User

mutation {
  createUser(user: {
    name: "Neto",
    email: "neto@email.com"
  }) {
    name,
    email
  }
}

Create Book

mutation {
  createBook(email: "neto@email.com", book: {
    title: "GraphQL For You"
  }) {
    title
  }
}

Find User

query {
  findUser(email: "neto@email.com") {
    email
    name
    books {
      title
    }
  }
}

Find Book

query {
  findBook(title: "GraphQL For You") {
    title
    userOwner {
        name,
        email
    }
  }
}