An open API service indexing awesome lists of open source software.

https://github.com/hawkkiller/graphql_example


https://github.com/hawkkiller/graphql_example

Last synced: 1 day ago
JSON representation

Awesome Lists containing this project

README

          

# graphql_example

This very simple example shows the basics of working with graphQL on backend and client side.

## Stack

As a backend language I prefer Go and The Flutter for the client. Libraries - gqlgen(go side), artemis(dart side).

## Schema

There is a model Todo, which has three fields(id - autogenerated random int, text - string received from input, done - boolean, just for fun :)
Also there are three types: Query, Mutation, Subscription. Here, I use Mutation and Subscription.

## Strategy

I create Todo using CreateTodo mutation and subscribe to the changes via Todos subcription.

---

See: [best practices] for GraphQL useful information.
**Note**: the structure is as silly as possible.

[best practices]: https://graphql.org/learn/best-practices/