Skip to content

msya/graphql-starwars-kotlin

Repository files navigation

Spark Java + GraphQL + Kotlin

This is a GraphQL server written in Kotlin. The repo contains some data for characters in Star Wars. It has a schema for this data and defines queries for it. The server uses Spark to expose a POST endpoint "/graphql". Queries from the client side should be passed to this endpoint.

Server

/graphQL

  • query: GraphQL query to parse.
  • variables: any variables for the query.

Example Usage

  1. Start the 'StarWarsServerApplication':
    ./gradlew run
    
  2. Use curl to query the graphql end point.
    curl -i -H "Content-Type:application/graphql"  -d '{"query": "{hero {id,name}}"}' http://localhost:4567/graphql
    

Schema

  • Objects
    • Human
    • Droid
  • Interfaces
    • Character
  • Enums
    • Episode
    • Height

Libraries

About

GraphQL Server implemented in Kotlin.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages