Shortest path query weight

When performing a shortest path query, is it at all possible to specify the weight from the value of predicate on the node rather than a facet ?
for example :

shortest(from: uid(A), to: uid(B)) {
  edge_predicate
  weight: integer_predicate
}

Alternatively is it possible to assign a variable value to a facet ?

Hi @paulrostorp

Alternatively is it possible to assign a variable value to a facet ?

You can assign a variable value from a facet, if that’s what mean - something like this:

q(..){
    pred @facets(foo: facetvalue)
}

No I mean “the opposite”.
so that I could do this for example:

shortest(from: uid(A), to: uid(B)) {
  myWeightVar as integer_predicate
  edge_predicate @facet(val(myWeightVar))
}