Query Vars Types

Hi Team,

I have noticed Dgraph does not have any type safety in place when it comes to the vars passed along to a query.

For example, in Slash, this:

Screen Shot 2020-11-26 at 9.46.10 pm

Will send the following to Dgraph backend:

Screen Shot 2020-11-26 at 9.47.47 pm

May I understand why that is?

May I suggest that we may it obvious on the client side that we don’t support different value types:

This surprise can be quite dangerous:

See the conversion to a string…

I suggest we change the signature to vars?: { [k: string]: string }, and avoid converting to string on behalf of the user?

This has been accepted as a ticket btw @Sydney-o9


Thank you @chewxy !