https://github.com/hawkkiller/graphql_example
https://github.com/hawkkiller/graphql_example
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/hawkkiller/graphql_example
- Owner: hawkkiller
- Created: 2022-12-25T17:22:54.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-11T09:25:50.000Z (over 3 years ago)
- Last Synced: 2025-02-23T14:26:45.461Z (over 1 year ago)
- Language: C++
- Size: 305 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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/