Query is called multiple times when resourceNameOverride points to different resource than initial one

  1. My goal: I want dynamically route query to specific resource based on the user/environment

  2. Issue: Right now, retool will fetch the query for the original resource id - if that resource is invalid it will show notification - then it will realize that it should call different endpoint, and call the correct one.

But if the original endpoint return the data, they will populate the page. If the endpoint is bad and return error, it will show error even tho it shouldn't

  1. Steps I've taken to troubleshoot: I searched the web and didn't find any solutions. Didn't find any way how to force retool into behaving, and because of that i assume its a bug with the platform.

For now i just disabled showing the notification when query fails. But that is not really a solution.

  1. Additional info: (Cloud or Self-hosted, Screenshots)
    Retool version 3.148.8
    Self-hosted


As you can see on the image, it queries the incorrect resource, and then it corrects to proper one

Actually clarification: It calls the query multiple time even if base resource is the same as the override one.

Hello @abz,

What kind of query and resource are you using?

Are you trying to dynamically set the Resource ID for a query?

Hi @abz,

Could you share how you have the resource set up and how you are dynamically specifying the resource inside of the query?

Those details would be very helpful for me to try to reproduce this behavior and better trouble shoot or report a bug if needed!