You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But it would be nice to have isPaginationFragment in the TemplateFragment type so that you can conditionally render a usePaginationFragment instead of useFragment.
To extend, there could be a extension.(js|ts) file inside .relay-butler that exports a function that takes in config (the config object defined in .relay-butler/config.js), api (the default output of relay-butler's template API), and ast (the parsed AST object from running graphql.parse(input) on the contents of input.graphql) and outputs a new API.
For example:
The idea is to allow for even more customization by being able to extend the template API.
The current template API is:
But it would be nice to have
isPaginationFragment
in theTemplateFragment
type so that you can conditionally render ausePaginationFragment
instead ofuseFragment
.To extend, there could be a
extension.(js|ts)
file inside.relay-butler
that exports a function that takes inconfig
(the config object defined in.relay-butler/config.js
),api
(the default output of relay-butler's template API), andast
(the parsed AST object from runninggraphql.parse(input)
on the contents ofinput.graphql
) and outputs a new API.For example:
Add 👍 to upvote.
The text was updated successfully, but these errors were encountered: