Skip to content

byteleaf/graphql-jvm-client-example

 
 

Repository files navigation

GraphQL JVM Client Examples

GraphQL JVM Client examples. Java, Java / Kotlin, Kotlin

Playground

GraphiQL

Query

Query on Client

{
  products{
    id
    name
    description
  }
}
query getProduct($id: ID!) {
  product(id: $id) {
    id
    name
    description
  }
}

Variables:
{
  "id": "1"
}

Query on Service

{
  products{
    id
    name
    description
    price
  }
}

Run application

Build projects (incl. code generation)

./mvnw verify 

Build projects (incl. code generation) without test

./mvnw verify -DskipTests

Start service


./mvnw spring-boot:run -f product-service/pom.xml

Start client

./mvnw spring-boot:run -f product-client-kotlin/pom.xml
./mvnw spring-boot:run -f product-client-java-kotlin/pom.xml
./mvnw spring-boot:run -f product-client-java/pom.xml

Troubleshooting

On compile error use maven reload

IntelliJ:

IntelliJ maven reload

About

GraphQL JVM Client Examples

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 73.7%
  • Kotlin 26.3%