ingraph 0.1.0

A declaration-driven indexing framework: records and nodes are written as Rust types, and the storage rows, the dataflow between them and the GraphQL query surface are emitted from the declaration.
Documentation
use super::Noop;

/// The value a package that names nothing carries — and the one an engine's `SearchOptions` row
/// resolves to when the engine has none.
#[test]
fn the_one_value_is_the_default() {
  assert_eq!(Noop::default(), Noop::new());
}

/// **IT IS A SCALAR AND NOT AN EMPTY INPUT OBJECT**, which is the whole reason it is a scalar: a
/// GraphQL input object must define at least one field, so a seat with no content has no legal
/// input-object rendering — where a scalar publishes no fields at all and renders as `scalar Noop`.
///
/// Read through the derive's own name for the type rather than through an SDL: the schema half is
/// `ingraph/tests/search_options_seam.rs`, where a declaration exists to publish one.
#[cfg(feature = "async-graphql")]
#[test]
fn it_publishes_under_its_own_name() {
  assert_eq!(<Noop as async_graphql::InputType>::type_name(), "Noop");
}

/// The wire round-trip at the value grain: what `to_value` writes is what `parse` reads back.
#[cfg(feature = "async-graphql")]
#[test]
fn the_one_value_round_trips() {
  let written = <Noop as async_graphql::InputType>::to_value(&Noop::new());
  let read =
    <Noop as async_graphql::InputType>::parse(Some(written)).expect("the one value parses back");
  assert_eq!(read, Noop::new());
}