Great news, just got word on how to delete these queries.
I know that I mentioned one option before but this is much better, as we prefer not to do any DB surgery on our cloud servers as this is bad practice and should only be used as a last resort.
The better option for deleting queries is to use the Retool API to directly send a request to delete the query if the UI is not able to do so. The code snippet is what the delete button in the UI runs under the hood.
First: From your Retool app, open up the browser inspector, navigate to the console and run the following script to get the IDs of your queries. The returned list will include Query Library queries as well as app specific queries.
fetch('/api/playground', {
'headers': {
'x-xsrf-token': document.cookie.split('xsrfToken=')[1].split(';')[0]
}
}).then(r => r.json()).then(d => console.log(d))
The result should look something like this(ignore the errors).
The ID we need to ass into the delete is the numeric ID on the left (not the UUID, which has letters in it).
Now we can run the delete fetch request with the ID of the query we are looking to remove. The code snippet is as follows:
// Replace QUERY_ID with numeric ID
fetch('/api/playground/QUERY_ID/delete', {
'headers': {
'x-xsrf-token': document.cookie.split('xsrfToken=')[1].split(';')[0]
},
'method': 'DELETE'
}).then(r => r.json()).then(d => console.log(d))
This should work to remove these queries that do not have a delete button!
Let me know if this works or if the console log gives back something unexpected