The result of {{ query1.query }} for a query in my query library is returning [object Object] instead of the actual string value

I have a query (query1) imported from my Query Library that takes in string. number and boolean inputs from an app i created. Once its ran, i call {{ query1.query }} so that it returns the actual query that was ran (which includes all the inputs from the app).

Unfortunately, some valus are returned as "[object Object]" (screenshot below)

However, when i run the query directly in the app, the query (the result of {{query1.query}} )gets returned correctly (screenshot below)

This makes me think its a bug with the query library.

I want to be able to run the query from the QL, not in my app locally since the query is being called in other apps as well (want to minimize copies of this query in different apps).

Thank you for reporting this @alessyl!

Will file a bug report and let you know if I have any questions on reproducing this behavior with the Query Library.

Hey @alessyl,

I was working on reproducing this and my query does not show the 'wildcard' variable at all :thinking:

Let me know if these are the right steps to reproduce this.

  1. Create query in QL with wildcard boolean variable

  2. Import query from QL to app, trigger in on button click and set a checkbox component's .value for the boolean wildcard.

  3. Set a Text component and a Text Area to display the query's .query value. It shows the entire query but omits the wildcard, when the checkbox is toggled and when not toggled.

Let me know what I am missing so I can reproduce and file a bug report!

Hmm that looks like an error in itself no? Why would it be omitted, shouldnt it be showing Ordered = TRUE? Ill need to play around with it more if you need me to recreate the error it using a separate query from what im using now, but some things im doing differently:

  • I have prepared statements disabled
  • My value in the QL has quotation marks around it (i.e '{{ checkbox }}')

I agree, if the purpose of the .query attribute is to should show what the current query is, then it should evaluate what the query will be with wildcards included.

It seems that currently it is set to show the entire query just without wildcards included. I can check with our engineers/PMs to understand if that is the intended purpose and see what they say about expanding the tool to include more information

Also the Audit Logs are able to show the full query as it is run from the backend server after being prepared, and can be streamed to DataDog as well.

For the short term, a work around could be to grab the state of the check boxes from the component on query run, and save this to an object to display.

But let me know what steps I can do from my repro to get the [object Object] to appear because that 100% is a bug and is something I can give to our engineers to solve!