1.0.1
Breaking Changes
- Single-root-entity fields (e.g.
Hero
) now treat arguments with the valuenull
as if they have not omitted. This allows you to write a single query that can fetch root entity by ID or by key, depending on which variable is set. This however also means that it is an error to get a root entity with id / keynull
(previously, it returnednull
if no such root entity was found).
Features
- Added
@collect
fields to traverse relations and other fields, accumulate objects and aggregate values (see docs). - Added
@reference(keyField: "...")
so that the raw value of a reference field can be retrieved (see docs). - Added an
ProjectOptions.processErrors
to convert (and/or log) errors.
Improvements
Project.createSchema()
(and some of its siblings) throw the typedInvalidProjectError
if there are validation errors- Expected runtime errors like permission denied throw typed
RuntimeError
which has acode
property
Bugfixes
- Fixed error message if argument was missing in single-root-entitiy-field (was [object object]).
- Fixed errors that occured during an explain call not being properly processed
What about 1.0.0?
There is no 1.0.0 because I messed up and published an empty package for [email protected] a year ago.