-
Goal: I'm working on integrating Retool Embeds into my existing application. As part of the embed flow, I want to pass in a
clientUuid
using the data prop in react-retool. The retool app is then supposed to use a ParentWindow query to access the property, store it in a Global Variable and then other Resource queries are using it to load the right data from our API. -
Steps: I'm initializing the Retool React Embed component using this code:
<Retool url={embedUrl} data={{ clientUuid: 'myUUID'}} onData={(data) => {
console.log('received data', data);
}} />
I have my ParentWindow query configured like this:
However, the Variable ClientUuid
never receives a value. I have added a secondary success handler that uses parent.postMessage
to send the value back to my code, but it's also only sending undefined
. However, looking at the console in my parent application, I do see the following log returned by Retool, indicating that the ParentWindow Query indeed ran successfully and returned the right value:
To summarize: It looks like extracting the passed in data is working properly, but the result of the ParentWindow query does not appear to be usable.