Skip to content

msya/graphql-starwars-kotlin

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

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