sangria
sangria copied to clipboard
[Feature Request] Context in Scalars
It would be cool to have the context in Scalars so we can use information found before executing the query to determine if a scalar is applicable.
i.e.
Scalar AgnosticID, if the context has string
or number
to differentiate between the 2 possible IDs that can be used, the scalar can check against the context which is correct and either return the correct value or throw an error.
This would be very useful for arguments, not really useful for returning data though.