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

queryWithVars -- how to specify multiple uids? #97

Closed
wiradikusuma opened this issue Jul 30, 2019 · 6 comments
Closed

queryWithVars -- how to specify multiple uids? #97

wiradikusuma opened this issue Jul 30, 2019 · 6 comments
Assignees
Labels
kind/question something requiring a response

Comments

@wiradikusuma
Copy link

Given this signature:

public Response queryWithVars(final String query, final Map<String, String> vars)

How do I pass multiple value (uids) with the same key?

@campoy
Copy link

campoy commented Aug 6, 2019

Hey @gitlw, I think you're probably the best person to answer this question.

@wiradikusuma
Copy link
Author

Tried passing string "0xAAA,0XBBB" (comma-separated text) -- doesn't work :D

@campoy
Copy link

campoy commented Sep 17, 2019

Hey @mangalaman93, please have a look at this issue.

@mangalaman93 mangalaman93 added kind/question something requiring a response status/accepted We were able to reproduce the issue and accept to work on it labels Sep 18, 2019
@mangalaman93
Copy link
Member

I don't think we support passing multiple values in a variable, I can't find an example for this in Dgraph or dgo repo.

@mangalaman93 mangalaman93 removed the status/accepted We were able to reproduce the issue and accept to work on it label Oct 1, 2019
@mangalaman93
Copy link
Member

Related to hypermodeinc/dgraph#2726

@MichelDiz
Copy link
Contributor

BTW guys, a workaround for this would be something like

query q($name1:string = "Ridley Scott", $name2:string = "Steven Spielberg") {
  me(func: eq(name@en, [$name1, $name2])) {
    name@en
    director.film @filter(lt(initial_release_date, "1980-01-01"))  {
      initial_release_date
      name@en
    }
  }
}

You pass each value separately into variables. Hence use them as above.

Details of this support hypermodeinc/dgraph#2981

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question something requiring a response
Development

No branches or pull requests

3 participants