Skip to content

Commit

Permalink
fix(Designer): Remove react query for dynamic data (#4693)
Browse files Browse the repository at this point in the history
* fix(designer): fix issue where scope nodes didn't get focused when they were jumped to

* small pr

* upload

* update

---------

Co-authored-by: Travis Harris <travisharris@microsoft.com>
  • Loading branch information
Eric-B-Wu and hartra344 committed Apr 24, 2024
1 parent e911432 commit 87340c3
Showing 1 changed file with 18 additions and 31 deletions.
49 changes: 18 additions & 31 deletions libs/designer/src/lib/core/utils/parameters/dynamicdata.ts
Expand Up @@ -193,38 +193,25 @@ export async function getDynamicSchema(

return schema ? { ...emptySchema, ...schema } : schema;
}
const queryClient = getReactQueryClient();
const outputSchema = await queryClient.fetchQuery(
[
'getDynamicSchema',
connectionReference?.connection.id,
operationInfo.connectorId,
operationInfo.operationId,
dependencyInfo.parameter?.key,
],
async () => {
const { connectorId } = operationInfo;
const { parameters, operationId } = definition.extension;
const { connector, parsedSwagger } = await getConnectorWithSwagger(connectorId);
const inputs = getParameterValuesForLegacyDynamicOperation(
parsedSwagger,
operationId,
parameters,
nodeInputs,
idReplacements,
workflowParameters
);
const connectionId = (connectionReference as ConnectionReference).connection.id;
const managedIdentityRequestProperties = await getManagedIdentityRequestProperties(
connector,
connectionId,
connectionReference as ConnectionReference
);

return getLegacyDynamicSchema(connectionId, connectorId, inputs, definition.extension, managedIdentityRequestProperties);
}
const { connectorId } = operationInfo;
const { parameters, operationId } = definition.extension;
const { connector, parsedSwagger } = await getConnectorWithSwagger(connectorId);
const inputs = getParameterValuesForLegacyDynamicOperation(
parsedSwagger,
operationId,
parameters,
nodeInputs,
idReplacements,
workflowParameters
);
const connectionId = (connectionReference as ConnectionReference).connection.id;
const managedIdentityRequestProperties = await getManagedIdentityRequestProperties(
connector,
connectionId,
connectionReference as ConnectionReference
);
return outputSchema;

return getLegacyDynamicSchema(connectionId, connectorId, inputs, definition.extension, managedIdentityRequestProperties);
} catch (error: any) {
if (
(error.name === UnsupportedExceptionName && error.code === UnsupportedExceptionCode.RUNTIME_EXPRESSION) ||
Expand Down

0 comments on commit 87340c3

Please sign in to comment.