sangria alternatives and similar packages
Based on the "Web Frameworks" category.
Alternatively, view sangria alternatives based on common mentions on social networks and blogs.
-
Play
Makes it easy to build scalable, fast and real-time web applications with Java & Scala. -
Finatra
A sinatra-inspired web framework for scala, running on top of Finagle. -
Scalatra
Tiny Scala high-performance, async web framework, inspired by Sinatra. -
Colossus
lightweight framework for building high-performance applications in Scala that require non-blocking network I/O. -
Skinny Framework
A full-stack web app framework upon Scalatra for rapid Development in Scala. -
Unfiltered
A modular set of unopinionated primitives for servicing HTTP and WebSocket requests in Scala. -
Socko
An embedded Scala web server powered by Netty networking and Akka processing. -
Reactive
FRP and web abstractions, which can be plugged into any web framework (currently only has bindings for Lift). -
youi
Next generation user interface framework and server engine for Scala and Scala.js. -
Play Pagelets
A Module for the Play Framework to build resilient and modular Play applications in an elegant and concise manner. -
Xitrum
An async and clustered Scala web framework and HTTP(S) server fusion on top of Netty, Akka, and Hazelcast.
Scout APM - Leading-edge performance monitoring starting at $39/month
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of sangria or a related project?
Popular Comparisons
README
Sangria is a scala GraphQL library.
SBT Configuration:
libraryDependencies += "org.sangria-graphql" %% "sangria" % "<latest version>"
You can find an example application that uses akka-http with sangria here:
https://github.com/sangria-graphql/sangria-akka-http-example
More info and the documentation can be found in the project home page:
https://sangria-graphql.github.io/
I would also recommend you to check out Sangria Playground. It is an example of GraphQL server written with Play framework and Sangria. It also serves as a playground, where you can interactively execute GraphQL queries and play with some examples.
If you want to use sangria with react-relay framework, then you also may be interested in sangria-relay.
Sangria is a spec compliant GraphQL implementation, so it works out of the box with Apollo, Relay, GraphiQL and other GraphQL tools and libraries.
Hello World Example
In this example we will use circe JSON marshalling, so we also need to include following dependency:
libraryDependencies += "org.sangria-graphql" %% "sangria-circe" % "1.3.1"
The most simple Hello World application might look like this:
import sangria.schema._
import sangria.execution._
import sangria.macros._
import sangria.marshalling.circe._
import scala.concurrent.ExecutionContext.Implicits.global
val QueryType = ObjectType("Query", fields[Unit, Unit](
Field("hello", StringType, resolve = _ => "Hello world!")
))
val schema = Schema(QueryType)
val query = graphql"{ hello }"
val result = Executor.execute(schema, query)
result.foreach(res => println(res.spaces2))
this example will print following result JSON:
{
"data" : {
"hello" : "Hello world!"
}
}
For more complex example, I would recommend you to check out the Getting Started Tutorial.
Issues, Bugs, Ideas
If you've got some interesting ideas to share or discovered a nasty bug, feel free to use Sangria's issue tracker. Also feel free to fork project and create the pull requests - they are highly appreciated!
If you are facing an issue and not sure what would be the best way to describe it, the I would recommend you to use this minimal gist as a template.
StackOverflow
In case you need some help or support, then you can use StackOverflow for this.
When you are asking a question,
be sure to add scala
, graphql
and sangria
tags, so that other people can easily find them.
Gitter & Mailing List
For more general, lengthy discussions or pretty much anything else please join us in the gitter chat and google groups.
Contribute
If you like the project and would like to support it or contribute to it, then you are very welcome to do so. You can spread the word and tweet about the project or even better - create a small blog post, video, example project and show how you use sangria and GraphQL. I'm pretty sure it would be interesting for many people.
Also you can contribute to the documentation or help others by answering questions on StackOverflow or joining discussions at the mailing list and gitter chat. It would be very helpful!
Not to mention the code itself. There is nothing more exciting than hacking some stuff together :) So please feel free to materialize your ideas in form of code and send pull requests!
License
Sangria is licensed under Apache License, Version 2.0.
*Note that all licence references and agreements mentioned in the sangria README section above
are relevant to that project's source code only.