Here are some common utilities that you might find useful when working with Pigeon.
frg
__typename
to the start of the fragment and remove all new lines and multiple spaces. If the fragment
starts with __typename
it will not be appended. If the fragment contains __typename
anywhere else, we will still
append it to the start. We will not remove duplicate __typename
’s. This is a simple string append, we don’t analyse
the fragment.
dependenciesToMappedQuery
Component
field that can be a HeroBanner
or Image
. In that case you would use dependenciesToMappedQuery
to map the dependencies to a query.
Struct
createRegistration
or createDependency
.
resolver
onQueryError
or onZodError
functions if there is an error.
You’ll need to provide your own getClient
function and QueryInput
type.