Shared Query Stuck - Unable to Select or Delete

  • Goal: Delete shared query from the query library

  • Details: I have a jsquery that was shared to the query library. This query can not be selected nor deleted. The direct link to the shared query is also not working. No action is possible for it.

image

Hey @Brian_Rohllf! Welcome to the community and thanks for reaching out. This response is a little belated, but hopefully we can help you out.

We've seen this issue before, but have never been able to figure out the root cause. If the direct link to the query isn't working, the best alternative is to manually construct and execute the backend DELETE request. Try navigating to any authenticated Retool page and then running the following code in the browser console.

// Find bad query ID
fetch('/api/playground', {
  'headers': {
    'x-xsrf-token': document.cookie.split('xsrfToken=')[1].split(';')[0]
  }
}).then(r => r.json()).then(d => console.log(d))

// 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))

I hope that helps! Let me know if you have any questions. :+1: