Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. GraphQL
  3. sangria-akka-http-example

sangria-akka-http-example

Apache-2.0Scala

A GraphQL server example built with akka-http, circe, and sangria, demonstrating Star Wars API implementation.

Visit WebsiteGitHubGitHub
242 stars95 forks0 contributors

What is sangria-akka-http-example?

Sangria akka-http Example is a GraphQL server implementation built with Scala technologies, specifically using sangria for GraphQL, akka-http for HTTP handling, and circe for JSON processing. It provides a working example of a GraphQL API with a Star Wars-themed schema, demonstrating how to handle queries, variables, and HTTP best practices. The project serves as a reference for developers looking to build GraphQL servers in Scala.

Target Audience

Scala developers and backend engineers who want to implement GraphQL APIs using the sangria library with akka-http and circe. It's ideal for those seeking a practical example to learn from or bootstrap their own GraphQL projects.

Value Proposition

Developers choose this example because it offers a complete, runnable GraphQL server with industry-standard Scala libraries, clear documentation, and interactive query capabilities via GraphQL Playground. It demonstrates real-world patterns like variable handling and HTTP compliance in a concise, easy-to-understand format.

Overview

An example GraphQL server written with akka-http, circe and sangria

Use Cases

Best For

  • Learning GraphQL server implementation in Scala
  • Building GraphQL APIs with sangria and akka-http
  • Creating example projects for educational purposes
  • Testing GraphQL queries with interactive playgrounds
  • Referencing HTTP best practices for GraphQL endpoints
  • Developing backend services with Star Wars-themed mock data

Not Ideal For

  • Production applications requiring custom data persistence and business logic integration
  • Teams using alternative HTTP servers in Scala, such as http4s or Play Framework
  • Projects needing advanced GraphQL features like real-time subscriptions or schema federation

Pros & Cons

Pros

Clean Library Integration

Demonstrates seamless integration of sangria for GraphQL, akka-http for HTTP, and circe for JSON, providing a reference for standard Scala stacks as shown in the README setup.

Interactive Development Tool

Includes GraphQL Playground for interactive query testing at the root endpoint, facilitating easy experimentation and debugging directly in the browser.

HTTP Best Practices

Follows GraphQL HTTP guidelines, showing proper handling of POST requests with JSON bodies and variables, as evidenced in the curl examples provided.

Cons

Fixed Mock Schema

The Star Wars-themed schema is static and only includes basic queries with mock data, lacking mutations, complex types, or real-world data integration.

No Production Guidance

Focuses solely on example code without advice on deployment, scaling, or error handling, making it insufficient for production use without significant modifications.

Frequently Asked Questions

Quick Stats

Stars242
Forks95
Contributors0
Open Issues1
Last commit9 months ago
CreatedSince 2015

Tags

#http-server#akka-http#sangria#graphql#api-server#example-project#scala#backend#circe

Built With

s
sbt
s
sangria
S
Scala
C
Circe
A
Akka HTTP

Links & Resources

Website

Included in

GraphQL15.0k
Auto-fetched 17 hours ago

Related Projects

sangria-playgroundsangria-playground

An example of GraphQL server written with Play and sangria

Stars87
Forks44
Last commit1 year ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub