/graphql-jpa-spring-boot-starter

Spring Boot starter for GraphQL JPA; Expose JPA entities with GraphQL.

Primary LanguageJavaMIT LicenseMIT

graphql-jpa-spring-boot-starter

Spring Boot starter for GraphQL JPA; Expose JPA entities with GraphQL.

Builds on GraphQL for JPA, which in turn builds on GraphQL Java to expose JPA Entities through a /graphql endpoint.

Many thanks to @jcrygier for the initial hard work; This is mostly just a wrapper.

Usage

  1. Add the following dependency to your project pom.xml along with the repository.
  <dependencies>
  	<!-- Expose JPA entities using GraphQL -->
  	<dependency>
  		<groupId>com.github.timtebeek</groupId>
  		<artifactId>graphql-jpa-spring-boot-starter</artifactId>
  		<version>0.0.3</version>
  	</dependency>
  </dependencies>
...
  <repositories>
  	<repository>
  		<id>bintray-timtebeek-maven</id>
  		<name>bintray</name>
  		<url>http://dl.bintray.com/timtebeek/maven</url>
  	</repository>
  </repositories>
  1. Start your project and navigate to http://localhost:8080/graphiql.html.

Warning

This is terribly fun for exploratory projects but quite possibly a terrible idea when you later want to evolve your API. Proceed with caution; maybe read about REST? :)