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
To allow for a richer computed fields resolution logic.
Design
We already analyze computed field functions signatures to insert them into the schema.
I believe we could as well detect function argument name and type and auto-add schema input fields for additional arguments.
Drawbacks
Don't see any.
Alternatives
Certainly we can pass additional info down to computed field resolver via global variables by doing
it isn't currently possible to have additional parameters using the computed column feature. This feature is related to #222 but lets track it separately here as it'll probably be implemented in a separate PR
Please hold off on this feature. We need to make some decisions internally about how to differentiate between functions which extend base types and functions that are on the Query object and that'll have a significant impact on implementation
Summary
To allow
to be natively used like
Rationale
To allow for a richer computed fields resolution logic.
Design
We already analyze computed field functions signatures to insert them into the schema.
I believe we could as well detect function argument name and type and auto-add schema input fields for additional arguments.
Drawbacks
Don't see any.
Alternatives
Certainly we can pass additional info down to computed field resolver via global
variables
by doingin
app.graphql()
and usingin the computed field function.
The above is just a lot of hackish plus it pushes to pass data beside the schema and bypasses input validation.
The text was updated successfully, but these errors were encountered: