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

Fix(dql): Fix error message in case of wrong argument to val() #7543

Merged
merged 2 commits into from
Mar 11, 2021

Conversation

ahsanbarkati
Copy link
Contributor

@ahsanbarkati ahsanbarkati commented Mar 10, 2021

This PR fixes a wrong error message in DQL query. Consider the following query

query {
  foo(func: uid("0x1")) {
    x: val(math(1))
  }
}

Before this change:

"message": "line 3 column 16: Expected a variable but got comma"

After this change:

"message": "line 3 column 16: Expected a variable but got 1"

This change is Reviewable

@github-actions github-actions bot added the area/querylang Issues related to the query language specification and implementation. label Mar 10, 2021
@ahsanbarkati ahsanbarkati merged commit a88ae81 into release/v21.03 Mar 11, 2021
@ahsanbarkati ahsanbarkati deleted the ahsan/dql-error branch March 11, 2021 06:23
aman-bansal pushed a commit that referenced this pull request Mar 15, 2021
Fix wrong error message for DQL queries which contains a
val() function and val's argument is not a variable. It used to 
always say that it expects a variable but got comma. Fixed it
to spit the right error message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/querylang Issues related to the query language specification and implementation.
Development

Successfully merging this pull request may close these issues.

2 participants