All Projects → sangria-graphql → Sangria

sangria-graphql / Sangria

Licence: apache-2.0
Scala GraphQL implementation

Programming Languages

scala
5932 projects
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Sangria

Flask Graphene Sqlalchemy
⚗️Project template to build a GraphQL API in Python
Stars: ✭ 109 (-94.17%)
Mutual labels:  api, graphql
Postgraphile
GraphQL is a new way of communicating with your server. It eliminates the problems of over- and under-fetching, incorporates strong data types, has built-in introspection, documentation and deprecation capabilities, and is implemented in many programming languages. This all leads to gloriously low-latency user experiences, better developer experiences, and much increased productivity. Because of all this, GraphQL is typically used as a replacement for (or companion to) RESTful API services.
Stars: ✭ 10,967 (+486.78%)
Mutual labels:  api, graphql
Json Serverless
Transform a JSON file into a serverless REST API in AWS cloud
Stars: ✭ 108 (-94.22%)
Mutual labels:  api, graphql
Graphql devise
GraphQL interface on top devise_token_auth
Stars: ✭ 100 (-94.65%)
Mutual labels:  api, graphql
Core
The server component of API Platform: hypermedia and GraphQL APIs in minutes
Stars: ✭ 2,004 (+7.22%)
Mutual labels:  api, graphql
Strapi
🚀 Open source Node.js Headless CMS to easily build customisable APIs
Stars: ✭ 41,786 (+2135.74%)
Mutual labels:  api, graphql
Next
Directus is a real-time API and App dashboard for managing SQL database content. 🐰
Stars: ✭ 111 (-94.06%)
Mutual labels:  api, graphql
Ariadne
Ariadne is a Python library for implementing GraphQL servers using schema-first approach.
Stars: ✭ 1,274 (-31.84%)
Mutual labels:  api, graphql
Serene
Generate clojure.spec with GraphQL and extend GraphQL with clojure.spec
Stars: ✭ 132 (-92.94%)
Mutual labels:  api, graphql
Graphbrainz
A fully-featured GraphQL interface for the MusicBrainz API.
Stars: ✭ 130 (-93.04%)
Mutual labels:  api, graphql
Graphql Dotnetcore
GraphQL for .NET core based on https://github.com/graphql/graphql-js
Stars: ✭ 97 (-94.81%)
Mutual labels:  api, graphql
Graphql Api For Wp
[READ ONLY] GraphQL API for WordPress
Stars: ✭ 136 (-92.72%)
Mutual labels:  api, graphql
Miraql
GraphQL performance monitoring & error-handling tool
Stars: ✭ 97 (-94.81%)
Mutual labels:  api, graphql
Src Cli
Sourcegraph CLI
Stars: ✭ 108 (-94.22%)
Mutual labels:  api, graphql
Graphql Portal
Configurable and distributed GraphQL Gateway. Convert your legacy data sources or monitor your existing GraphQL Services with a visual dashboard.
Stars: ✭ 88 (-95.29%)
Mutual labels:  api, graphql
Laqul
A complete starter kit that allows you create amazing apps that look native thanks to the Quasar Framework. Powered by an API developed in Laravel Framework using the easy GraphQL queries language. And ready to use the Google Firebase features.
Stars: ✭ 110 (-94.11%)
Mutual labels:  api, graphql
Purescript Graphql
End to End typesafe GraphQL with PureScript
Stars: ✭ 79 (-95.77%)
Mutual labels:  api, graphql
Projectartemis
An analytic tool for GraphQL queries to external APIs with a Graphical User Interface to view performance metrics.
Stars: ✭ 84 (-95.51%)
Mutual labels:  api, graphql
Directus
Open-Source Data Platform 🐰 — Directus wraps any SQL database with a real-time GraphQL+REST API and an intuitive app for non-technical users.
Stars: ✭ 13,190 (+605.72%)
Mutual labels:  api, graphql
Subzero Starter Kit
Starter Kit and tooling for authoring GraphQL/REST API backends with subZero
Stars: ✭ 136 (-92.72%)
Mutual labels:  api, graphql

Sangria Logo

Sangria is a scala GraphQL library.

Continuous Integration Coverage Status Maven Central License Scaladocs Join the chat at https://gitter.im/sangria-graphql/sangria

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.2"

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 the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].