Skip to content

1.0.1

Compare
Choose a tag to compare
@Yogu Yogu released this 04 Jul 09:15

Breaking Changes

  • Single-root-entity fields (e.g. Hero) now treat arguments with the value null 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 / key null (previously, it returned null 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 typed InvalidProjectError if there are validation errors
  • Expected runtime errors like permission denied throw typed RuntimeError which has a code 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.