Skip to content

JigarDedhia/GraphiQLDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

GraphiQLDemo

GraphQL Demo with GraphiQL

The project is a demo to understand the concepts and workflow of GraphQL using GraphiQL interface.

The steps to run and test the application:

  1. Run the application as a Spring Maven Application
  2. You can use postman to run the endpoints
  3. You can check the embedded database h2-console at "http://localhost:8080/h2-console"
  4. You can use the graphiQL interface to execute GraphQL queries at "http://localhost:8080/graphiql"

Sample GraphiQL Queries/Mutations:

  1. Mutation
mutation {
  newAuthor(firstName:"ABC",lastName:"DEF") 
  {
    id
  },
  newBook (title:"qwerty", isbn:"13", pageCount:12, author: 3) 
  {
      id
  }
}
  1. Query
query {
  findAllAuthors 
  {
    id,
    firstName,
    lastName
    }
}
  1. Query
query {
  findAllBooks
  {
    id,
    title,
    isbn,
    pageCount,
    author {
      id,
      firstName,
      lastName
    }
    }
}
  1. Query
query {
  countBooks
}

About

GraphQL Demo with GraphiQL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages