Skip to content
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

Merged
merged 4 commits into from
Oct 14, 2019

Conversation

martinmr
Copy link
Contributor

@martinmr martinmr commented Oct 2, 2019

This change is Reviewable

Copy link

@pullrequest pullrequest bot left a 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.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 Message
It looks like the description for this pull request is either blank or very short. Adding a high-level summary will help our reviewers provide better feedback. Feel free to include questions for PullRequest reviewers and make specific feedback requests.

@danielmai danielmai changed the title Remove expand(_foward_) and expand(_reverse_). breaking change: Remove expand(_foward_) and expand(_reverse_). Oct 2, 2019
@danielmai danielmai changed the title breaking change: Remove expand(_foward_) and expand(_reverse_). Breaking change: Remove expand(_forward_) and expand(_reverse_). Oct 2, 2019
@@ -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)).
Copy link
Contributor

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

Copy link
Contributor

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".

Copy link
Contributor Author

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."

wiki/content/query-language/index.md Outdated Show resolved Hide resolved
Copy link
Contributor Author

@martinmr martinmr left a 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.

Copy link
Contributor

@pawanrawal pawanrawal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

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_?

Copy link

@pullrequest pullrequest bot left a 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

gql/parser.go Show resolved Hide resolved
Copy link
Contributor Author

@martinmr martinmr left a 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.

Copy link
Contributor

@pawanrawal pawanrawal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 2 files at r3.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @campoy, @danielmai, @manishrjain, @MichaelJCompton, and @pawanrawal)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants