Some documentation tweaks

This commit is contained in:
Paul van Tilburg 2019-07-10 20:55:32 +02:00
parent c3a6b5f572
commit 63fc7a0721
6 changed files with 14 additions and 10 deletions

View File

@ -1,4 +1,4 @@
//! The application error catchers
//! The application error catchers.
use rocket::catch;
use rocket_contrib::json;

View File

@ -1,3 +1,6 @@
//! The GraphQL schema implementation.
//!
//! Provides the schema with the root query and mutation.
use crate::models::{
CompanyInfo, Customer, Invoice, NewCustomer, NewInvoice, NewTimeEntry, TimeEntry,
};
@ -8,9 +11,10 @@ use juniper::{object, Context, FieldResult, RootNode};
impl Context for DbConn {}
/// The GraphQL schema.
pub type Schema = RootNode<'static, Query, Mutation>;
/// The query root.
/// The GraphQL query root.
pub struct Query;
#[object(Context = DbConn)]
@ -61,7 +65,7 @@ impl Query {
}
}
/// The mutation root.
/// The GraphQL mutation root.
pub struct Mutation;
#[object(Context = DbConn)]

View File

@ -1,4 +1,4 @@
//! The root handlers
//! The request handlers.
use crate::graphql::Schema;
use crate::DbConn;

View File

@ -1,7 +1,6 @@
//! Some ORM helpers
//! Some ORM helpers.
//!
//! The macros, types and traits in this module are used to create a simple GraphQL API on top of
//! models that are in the database.
//! These macros can be used to shorten repetative ORM queries.
#![allow(unused_macros)]

View File

@ -18,11 +18,12 @@ pub mod catchers;
pub mod graphql;
pub mod handlers;
pub mod models;
/// The application database schema.
pub mod schema;
// This macro from `diesel_migrations` defines an `embedded_migrations` module containing a
// function named `run`. This allows the example to be run and tested without any outside setup of
// the database.
// function named `run`. This allows the example to be run and tested without any outside setup
// of the database.
embed_migrations!();
#[database("stoptime_db")]

View File

@ -1,4 +1,4 @@
//! The application models
//! The application models.
mod company_info;
mod customer;