Examples
Beside the tests from each package, you can find some usage example in the following directories and external repositories:
Code Generator example
An example with multiple ways of creating a GraphQLSchema with different GraphQL types and resolvers from code generation can be found in https://github.com/juancastillo0/leto/tree/main/leto_generator/example.
Fullstack Dart Chat
A fullstack Dart example with Flutter client and Leto/Shelf server can be found in https://github.com/juancastillo0/leto/tree/main/chat_example. The server is in the server folder.
- Sqlite3 and Postgres database integrations
- Subscriptions
- Authentication/Authorization
- Sessions
- Tests
- File uploads
- Client/Server GraphQL extensions integration
- Docker
Chat functionalities
- Send/receive/delete messages in realtime
- File uploads
- Link metadata
- Reply to other messages
- Client cache through Ferry and Hive
- Create chat rooms, add/remove users and share authorized invite links
- View complete usage history with events for the most important mutations
- View all user sessions
Server example
A Leto/Shelf server example with multiple models, code generation, some utilities and tests can be found in https://github.com/juancastillo0/leto/tree/main/leto_shelf/example
Room Signals
A service with room and messages, an user can subscribe to a room to listen to messages and send private or group-wide messages. Useful for simple messages or setting up peer-to-peer protocols like WebRTC. The service uses web sockets and in the source code repository there are three projects:
- The Leto Shelf GraphQL server. Everything is saved in memory
- A Dart client using Artemis
- A Web Dart client using
package:rad
You can view the code in the Github repo. The client UI and some links to the different GraphQL Schema UI explorer is deployed in this page.
CI & CD Dart Server
Work in Progress
A service for compiling, executing and tracking the build process and deployment. With a git repository, one can set up a CLI pipeline for continuous integration and delivery. All the commands are tracked in realtime. This is a simple personal project for deploying in a VM. The service uses web sockets and the source code repository has three projects:
- The Leto Shelf GraphQL server. Everything is saved in memory
- A Dart client using
package:graphql
andpackage:graphql_codegen
- A Web Dart client using
package:jaspr
You can view the code in the Github repo. The client UI and some links to the different GraphQL Schema UI explorer is deployed in this page.