The goal of this project is to provide to server-side
users of Dart an alternative to REST API's. package:angel_graphql, which, when combined with the allows
server-side Dart users to build backends with GraphQL and
virtually any database imaginable.

Using this package is very similar to GraphQL.js - you define
a schema, and then mount graphQLHttp in your router to start
serving. This implementation supports GraphQL features like
introspection, so you can play around with graphiql as well!

Firstly, define your schema. A GraphQL schema contains an
object type that defines all querying operations that can be
applied to the backend.

A GraphQL schema may also have a mutation object type,
which defines operations that change the backend's state, and
optionally a subscription type, which defines real-time
interactions (coming soon!).

You can use the convertDartType helper to wrap your existing
Model/PODO classes, and make GraphQL aware of them without duplicated
effort.

What would Angel be without services? For those unfamiliar - in Angel,
Service is a base class that implements CRUD functionality, and serves
as the database interface within an Angel application. They are well-suited
for NoSQL or other databases without a schema (they can be used with
SQL, but that's not their primary focus).

package:angel_graphql has functionality to resolve fields by interacting with
services.

Consider our previous example, and note the calls to
resolveViaServiceIndex and resolveViaServiceRead: