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

Named queries without variables don't parse #3994

Closed
campoy opened this issue Sep 13, 2019 · 0 comments · Fixed by #4028
Closed

Named queries without variables don't parse #3994

campoy opened this issue Sep 13, 2019 · 0 comments · Fixed by #4028
Labels
area/parsing Issues related to the parser or lexer. area/querylang/vars Issues related to queries with GraphQL variables kind/bug Something is broken. priority/P2 Somehow important but would not block a release. status/accepted We accept to investigate/work on it.
Milestone

Comments

@campoy
Copy link
Contributor

campoy commented Sep 13, 2019

What version of Dgraph are you using?

v1.1.0

Have you tried reproducing the issue with the latest release?

yes

What is the hardware spec (RAM, OS)?

playground

Steps to reproduce the issue (command/config used to run Dgraph).

Running this query works:

query works($name: string = "Francesc") {
  q(func: has(name)) {
    name
  }
}

But if you realize that the query doesn't use the variable and you decide to remove it:

query works() {
  q(func: has(name)) {
    name
  }
}

You get the error:

Error Name: t

Message: line 1 column 12: Invalid comma in var block

URL: http://localhost:8080/query

Expected behaviour and actual result.

It should just parse it correctly

@campoy campoy added kind/bug Something is broken. priority/P2 Somehow important but would not block a release. status/accepted We accept to investigate/work on it. area/parsing Issues related to the parser or lexer. area/querylang/vars Issues related to queries with GraphQL variables labels Sep 13, 2019
@campoy campoy added this to the Dgraph v1.1.1 milestone Sep 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/parsing Issues related to the parser or lexer. area/querylang/vars Issues related to queries with GraphQL variables kind/bug Something is broken. priority/P2 Somehow important but would not block a release. status/accepted We accept to investigate/work on it.
Development

Successfully merging a pull request may close this issue.

1 participant