-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breaking change: Remove expand(_forward_) and expand(_reverse_). #4119
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ A review job has been created and sent to the PullRequest network.
@martinmr you can click here to see the review status or cancel the code review job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1824,7 +1824,7 @@ func expandSubgraph(ctx context.Context, sg *SubGraph) ([]*SubGraph, error) { | |||
} | |||
|
|||
switch child.Params.Expand { | |||
// It could be expand(_all_), expand(_forward_), expand(_reverse_) or expand(val(x)). | |||
// It could be expand(_all_) or expand(val(x)). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's val(x)? I have never any example like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a variable that gets predicates values from the old _predicate_
func. To expand a query with those preds. It was like "expand only the preds found in the _predicate_
func".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pasted from my reply in Reviewable: "It takes a variable (a list of string values) and uses those values as the names of the predicates to expand. We should discuss whether to keep it but I left it untouched for now."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 5 files reviewed, 2 unresolved discussions (waiting on @campoy, @danielmai, @manishrjain, @MichaelJCompton, and @pawanrawal)
query/query.go, line 1827 at r1 (raw file):
Previously, campoy (Francesc Campoy) wrote…
What's val(x)? I have never any example like this
It takes a variable (a list of string values) and uses those values as the names of the predicates to expand. We should discuss whether to keep it but I left it untouched for now.
wiki/content/query-language/index.md, line 1800 at r1 (raw file):
Previously, campoy (Francesc Campoy) wrote…
Since we're at it, this statement is not accurate.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 5 files at r1, 1 of 1 files at r2.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @campoy, @danielmai, @manishrjain, @martinmr, and @MichaelJCompton)
gql/parser.go, line 2805 at r2 (raw file):
case "_all_": child.Expand = "_all_" case "_forward_":
Should have a custom error message for _forward_
and _reverse_
, saying that these are not supported anymore and the user should use _all_
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a reminder to make sure the basis of dropping support for these options is communicated to those who may be using forward or reverse.
Reviewed with ❤️ by PullRequest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 3 of 5 files reviewed, 3 unresolved discussions (waiting on @campoy, @danielmai, @manishrjain, @MichaelJCompton, and @pawanrawal)
gql/parser.go, line 2805 at r2 (raw file):
Previously, pawanrawal (Pawan Rawal) wrote…
Should have a custom error message for
_forward_
and_reverse_
, saying that these are not supported anymore and the user should use_all_
?
Done. The message does not include anything about _all_
because it's not a direct replacement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r3.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @campoy, @danielmai, @manishrjain, @MichaelJCompton, and @pawanrawal)
This change is