Alias bridge event field to fix Relay build
Alias the connector card event selection so it does not conflict with the SCIM event list fragment querying the same field with different arguments. This resolves the Relay compilation failure in CI while keeping the latest bridge error message available for the error-state callout. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
This commit is contained in:
committed by
Bryan Frimin
parent
f02c3b88b7
commit
83ce4286f8
@@ -39,7 +39,7 @@ import { useOrganizationId } from "#/hooks/useOrganizationId";
|
||||
const googleWorkspaceConnectorFragment = graphql`
|
||||
fragment GoogleWorkspaceConnectorFragment on SCIMConfiguration {
|
||||
id
|
||||
events(first: 1) {
|
||||
eventsLatest: events(first: 1) {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
@@ -96,7 +96,7 @@ export function GoogleWorkspaceConnector(props: {
|
||||
const organizationId = useOrganizationId();
|
||||
const { __, dateTimeFormat } = useTranslate();
|
||||
const bridgeState = bridge?.state ?? null;
|
||||
const latestBridgeError = data?.events?.edges?.[0]?.node?.errorMessage ?? null;
|
||||
const latestBridgeError = data?.eventsLatest?.edges?.[0]?.node?.errorMessage ?? null;
|
||||
const isBridgeFailed = bridgeState === "FAILED";
|
||||
const isBridgePending = bridgeState === "PENDING";
|
||||
const bridgeStatusBadgeVariant = isBridgeFailed
|
||||
|
||||
@@ -39,7 +39,7 @@ import { useOrganizationId } from "#/hooks/useOrganizationId";
|
||||
const microsoft365ConnectorFragment = graphql`
|
||||
fragment Microsoft365ConnectorFragment on SCIMConfiguration {
|
||||
id
|
||||
events(first: 1) {
|
||||
eventsLatest: events(first: 1) {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
@@ -96,7 +96,7 @@ export function Microsoft365Connector(props: {
|
||||
const organizationId = useOrganizationId();
|
||||
const { __, dateTimeFormat } = useTranslate();
|
||||
const bridgeState = bridge?.state ?? null;
|
||||
const latestBridgeError = data?.events?.edges?.[0]?.node?.errorMessage ?? null;
|
||||
const latestBridgeError = data?.eventsLatest?.edges?.[0]?.node?.errorMessage ?? null;
|
||||
const isBridgeFailed = bridgeState === "FAILED";
|
||||
const isBridgePending = bridgeState === "PENDING";
|
||||
const bridgeStatusBadgeVariant = isBridgeFailed
|
||||
|
||||
Reference in New Issue
Block a user