This repository was archived by the owner on Jan 21, 2026. It is now read-only.
Description Problem
Error:
Missing @default directive for type Page.
Either add a @default directive to Page or turn all occasions of 'Page!' into 'Page'.
(source )
But I want to keep
type Query {
allPages : [Page ! ]! # <= this occasion of Page non-nullable
page (id : ID ! ): Page
}
And I don't want to add a default value for the Page type.
Possible solution 1
Instead, I maybe can do something like this:
type Query {
allPages : [Page ! ]! @a @b @c @filterNulls
}
where
@a @b @c are any resolvers returning the list of nullable objects and
@filterNulls is a new resolver that filters out nulls from the list
Then we can improve the logic of DirectiveInterpreter to take @filterNulls into account and ignore this exact type occasion.
Downsides:
We will invest time
It will make the DirectiveInterpreter code more complicated
Possible solution 2 (already in use)
Do nothing.
type Query {
allPages : [Page ]!
}Reactions are currently unavailable
Problem
Error:
(source)
But I want to keep
And I don't want to add a default value for the
Pagetype.Possible solution 1
Instead, I maybe can do something like this:
where
@a @b @care any resolvers returning the list of nullable objects and@filterNullsis a new resolver that filters out nulls from the listThen we can improve the logic of
DirectiveInterpreterto take@filterNullsinto account and ignore this exact type occasion.Downsides:
DirectiveInterpretercode more complicatedPossible solution 2 (already in use)
Do nothing.