Skip to content

rksangeeth007/graphql-kotlin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

GraphQL Kotlin

Build Status Docs codecov Slack

GraphQL Kotlin is a collection of libraries, built on top of graphql-java, that aim to simplify running GraphQL in Kotlin

📦 Modules

⌨️ Usage

Below is a basic example of how you can use graphql-kotlin-spring-server to run a GraphQL server. For more details, see our documentation below or in the individual module READMEs

// Simple data class that is parsed by the schema generator
data class Widget(val id: Int, val value: String)

// Mark the class as a Spring GraphQL Query
@Component
class WidgetService : Query {
  fun widgetById(id: Int): Widget? = null
}

@SpringBootApplication
class Application

fun main(args: Array<String>) {
    runApplication<Application>(*args)
}

will generate a server at /graphql and /playground with the following schema

type Query {
  widgetById(id: Int!): Widget
}

type Widget {
  id: Int!
  value: String!
}

📋 Documentation

Examples and documentation are available on our documentation site hosted in GitHub Pages.

If you have a question about something you can not find in our documentation, the indivdual module READMEs, or javadocs, feel free to create an issue and tag it with the question label.

If you would like to contribute to our documentation see the website directory for more information.

👥 Contact

This project is part of Expedia Group Open Source but also maintained by a dedicated team

✏️ Contributing

To get started, please fork the repo and checkout a new branch. You can then build the library locally with Gradle

./gradlew clean build

See more info in CONTRIBUTING.md

🛡️ Security

For more info on how to contact the team for security issues or the supported versions that recieve security updates, see SECURITY.md.

⚖️ License

This library is licensed under the Apache License, Version 2.0

About

Libraries for running GraphQL in Kotlin

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 98.9%
  • Other 1.1%