Allow @tag
values to be used in edge parameters
#371
Labels
A-syntax
Area: query or schema syntax
C-feature-request
Category: request for new future functionality
E-medium
Call for participation: experience needed to fix: medium / intermediate
Right now, edge parameters have to be literals:
There's currently no way to use pass a tagged value as the
message
edge'skind
parameter.Here's one possible Trustfall extension that could make this work:
This is still 100% valid GraphQL syntax (so we keep all the nice editor integrations) while not breaking anything that isn't already broken (Trustfall already requires implicit definition of query variables, so the "variables" portion of GraphQL integrations is already broken).
This is the first option I've found that preserves maximal GraphQL syntax compatibility while allowing using tagged values of any type (not just strings) to be used as edge parameters.
Specifically, the following changes would be needed:
@fromTag
directive that can be applied to variable definitions@filter(op: "=", value: ["$implicit"])
) are as-if equivalent to explicit variable definitions (likequery Name($implicit: String)
)@fromTag
if no tag by that name existsThe text was updated successfully, but these errors were encountered: