Skip to content

apollo-compiler@1.0.0-beta.1

Choose a tag to compare

@SimonSapin SimonSapin released this 12 Oct 11:11
· 307 commits to main since this release
f13d92c

1.0.0-beta.1 - 2023-10-05

BREAKING

Compared to 0.11, version 1.0 is a near-complete rewrite of the library and revamp of the public API. While in beta, there may still be breaking changes (though not as dramatic) until 1.0.0 “final”. If using a beta version, we recommend specifying an exact dependency in Cargo.toml:

apollo-compiler = "=1.0.0-beta.1"

Features

The API is now centered on Schema and ExecutableDocument types. Users no longer need to create a compiler, add inputs to it, and track them by ID. Validation is now a method of these types, and returns a Result to indicate errors.

These types are serializable (through Display, .to_string(), and a .serialize() config builder), integrating the functionality of the apollo-encoder crate.

They are also mutable, and can be created programmatically out of thin air. Node<T> is a thread-safe reference-counted smart pointer
that provides structural sharing and copy-on-write semantics.