Changelog
1.2.0
maskFragments
to cast data to fragment masks of a given set of fragments
Submitted by @kitten (See #43)graphql.scalar()
utility to retrieve or type check the type of scalars and enums
Submitted by @kitten (See #45)unsafe_readResult
to unsafely cast data to the result data of a given document
Submitted by @kitten (See #43)Changelog
1.1.0
@_optional
and @_required
directives on fields overriding the field types.
When used, @_required
can turn a nullable type into a non-nullable, and @_optional
can turn non-nullable fields into nullable ones. (See “Client-Controlled Nullability” in Graphcache for an example of a client implementing this.)
Submitted by @kitten (See #32)@_unmask
directive on fragments causing the fragment type to not be masked. FragmentOf<>
will return the full result type of fragments when they’re annotated with @_unmask
and spreading these unmasked fragments into parent documents will use their full type
Submitted by @kitten (See #31)TadaDocumentNode
output’s third generic differently. The output of fragment definitions will now be more readable (e.g. { fragment: 'Name', on: 'Type', masked: true }
)
Submitted by @kitten (See #31)