Getting null parameter errors when running queries

I wrote a GSQL query with two input parameters, a vertex and an integer. When I run the query, I fill in the parameters in the Enter query parameters box, hitting enter after each one, then press the Run Query button. However, about 90% of the time I get an error that one of the parameters is null, even though both are clearly filled in the box. I’ve only been able to run the query successfully about three times (out of ~30 attempts) due to this error, and could not find any pattern in the successes. Is there some trick to inputting the parameters that I’m missing?

Debugging steps I’ve already taken:
I tried running the query both in INTERPRET mode and as an installed query. The same error occurs in both cases.
I verified that the query itself has no logged syntax errors.
I verified that the vertex ID value used for development exists in the graph, using the Explore Graph vertex selection tab.

Hey, Elli!

The “hitting enter” bit is the issue here. When you do, you will notice the query parameter box will collapse (as shown below); this means that the parameters will be null regardless of whether or not you entered a value (as indicated by the hover value over the plus or minus).

Running query with null parameters (do not do this!).

Instead, there’s no need to hit enter after typing the values; just ensure that the parameter input boxes are open before you press “Run query,” as shown below.

Parameters aren’t collapsed; will run as planned.

Let me know if this helps!


Thank you, that worked! And thanks for your quick responses, Shreya! Sorry I keep being confused by the UI!

1 Like