diff --git a/ariadne_codegen/client_generators/dependencies/base_operation.py b/ariadne_codegen/client_generators/dependencies/base_operation.py index 9f9c766..2be9407 100644 --- a/ariadne_codegen/client_generators/dependencies/base_operation.py +++ b/ariadne_codegen/client_generators/dependencies/base_operation.py @@ -144,13 +144,11 @@ def get_formatted_variables(self) -> Dict[str, Dict[str, Any]]: formatted_variables = self.formatted_variables.copy() # Collect variables from subfields - for subfield in self._subfields: - subfield.get_formatted_variables() - formatted_variables.update(subfield.formatted_variables) + for subfield in self._subfields: + formatted_variables.update(subfield.get_formatted_variables()) # Collect variables from inline fragments for subfields in self._inline_fragments.values(): - for subfield in subfields: - subfield.get_formatted_variables() - formatted_variables.update(subfield.formatted_variables) + for subfield in subfields: + formatted_variables.update(subfield.get_formatted_variables()) return formatted_variables