Code Monkey home page Code Monkey logo

graphql-bootstrap's Introduction

GraphQL Bootstrap [Spring Boot]

A little project to skyrocket your way into GraphQL and Spring Boot. The project is ready to go to try out all GraphQL's functionality.

Tech Stack and Dependecy

GraphQL is pretty a new thing for most of the user, and for this reason, all of its implementation are ongoing. From version to version you may find lots of difference, so, here's the following technology and dependecy used for this project.

  • Java 8
  • Spring Boot 2.2.5
  • Gradle
  • GraphQL Spring Boot Starter 5.0.2
  • GraphQL Java Tools 5.2.4
  • Lombok 1.18.4
  • H2 Database

Installation

In your console, simply:

git clone https://github.com/dasher7/webflux-api.git

Import your code into your favourite IDE, I invite you to use Sping Tools Suite (STS 4).

Install [Lombok] (https://projectlombok.org/) Update your Gradle Dependecy and then just:

gradle bootRun

Or run via STS config.

Usage

You can visit your H2 database here: http://localhost:8080/h2-console/login.jsp note: use the parameter in application.properties

You GraphQL endpoint will be: http://localhost:8080/graphql

First thing first, hit the following endpoint: http://localhost:8080/graphql/schema.json The response will be a JSON with all the specification of your API.

Example

All your request will be managed only by this endpoint: http://localhost:8080/graphql

I'll provied an example of you can query your new little toy.

@POST - save a new author

```
     mutation {
        newAuthor(
          firstName: "Ken",
          lastName: "Follet"
           )
     }
  ```

@POST - find all books

```    {
          findAllBooks {
             id
             title
            }
        }
  ```

Contribuiton and Usage

Feel free to use the project for your own like. NOTE: The project is always a WIP, because I will always try new things and test new topic.

License

MIT

graphql-bootstrap's People

Contributors

dasher7 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.