From 6513cc2de00d35ce0663d25453d27d9374bb318b Mon Sep 17 00:00:00 2001 From: Eliot Austin-Forbes Date: Tue, 30 Aug 2022 10:51:45 +0900 Subject: [PATCH] feat(flow): flow-operations tries to spread inexact objects #8000 --- .../flow/operations/src/flow-selection-set-processor.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/plugins/flow/operations/src/flow-selection-set-processor.ts b/packages/plugins/flow/operations/src/flow-selection-set-processor.ts index 4d661dd419d..712ad8e3a54 100644 --- a/packages/plugins/flow/operations/src/flow-selection-set-processor.ts +++ b/packages/plugins/flow/operations/src/flow-selection-set-processor.ts @@ -105,6 +105,8 @@ export class FlowWithPickSelectionSetProcessor extends BaseSelectionSetProcessor } transformTypenameField(type: string, name: string): ProcessResult { - return [`{ ${name}: ${type} }`]; + const useFlowExactObject = this.config.useFlowExactObjects; + + return [`{${useFlowExactObject ? "|" : ""} ${name}: ${type} } ${useFlowExactObject ? "|" : ""}`]; } }