1.0.0-beta.11 - 2023-12-19
This release includes support for GraphQL schema introspection directly in the
compiler. If this is a feature you're interested in, we encourage you to try it
out and leave us any feedback in the introspection discussion. More details on this feature in the changelog below.
Features
- Pretty CLI formatting for custom diagnostics - goto-bus-stop, pull/747:
- A
CliReport
builder API for printing with labeled source code
to a monospace text stream with optional ANSI color codes. - A
ToCliReport
trait for converting error types to aCliReport
when given a source map. - A
Diagnostic
struct for bundling such an error together with a source map
and implementDisplay
/Debug
by printing a CLI report
- A
- Add execution-related and introspection functionality - SimonSapin, pull/758:
- Add data structure in
apollo_compiler::execution
for a GraphQL response, its data, and errors.
All (de)serializable withserde
. - Add
coerce_variable_values()
in that same module. - Add
apollo_compiler::execution::SchemaIntrospection
providing full execution for the schema introspection parts of an operation
and separating the rest to be executed separately.
In order to support all kinds of introspection queries this includes
a full execution engine where users provide objects with resolvable fields.
At this time this engine is not exposed in the public API.
If you’re interested in it let us know about your use case! - Add
ExecutableDocument::insert_operation
convenience method.
- Add data structure in
- Add
NodeStr::from(Name)
- goto-bus-stop, pull/773 - Convenience accessors for
ast::Selection
enum - SimonSapin, pull/777
as_field
,as_inline_fragment
, andas_fragment_spread
; all returningOption<&_>
. - Add schema coordinates - goto-bus-stop, pull/757:
Schema coordinates are a compact, human-readable way to uniquely point to an item defined in a schema.string.parse::<SchemaCoordinate>()
parses a coordinate from a string.- Coordinates have a
Display
impl that writes them out with schema coordinate syntax. - The
coord!()
macro creates a static coordinate at compile time from spec syntax.
Fixes
- Fix serializing single-line strings with leading whitespace - goto-bus-stop, pull/774
Previously, the leading whitespace would get lost.