From c3964b6308583836afa3bd6e33bffa18a8c8e4e4 Mon Sep 17 00:00:00 2001 From: Anton Malofeev Date: Mon, 17 May 2021 04:32:06 +0300 Subject: [PATCH] fix: result list should not be equatable --- .../cactus_sync_client_gen/lib/src/gql_model_builder.dart | 6 +++++- .../lib/src/gql_object_type_definition.dart | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dart_packages/cactus_sync_client_gen/lib/src/gql_model_builder.dart b/dart_packages/cactus_sync_client_gen/lib/src/gql_model_builder.dart index 0ac5c52..107008e 100644 --- a/dart_packages/cactus_sync_client_gen/lib/src/gql_model_builder.dart +++ b/dart_packages/cactus_sync_client_gen/lib/src/gql_model_builder.dart @@ -112,7 +112,7 @@ class GqlModelBuilder extends GqlObjectTypeDefinition { final Set defaultConstructorInitializers = {}; // FIXME: Issue #2 String itemsBaseTypeName = ''; - for (final field in typeDefinition.fields) { + void fillField(gql_schema.FieldDefinition field) { final args = field.args; if (args != null && args.isNotEmpty == true) { fillClassMethodField( @@ -139,6 +139,10 @@ class GqlModelBuilder extends GqlObjectTypeDefinition { ); } } + + for (final field in typeDefinition.fields) { + fillField(field); + } if (serializable) { fillSerializers( definedMethods: definedMethods, diff --git a/dart_packages/cactus_sync_client_gen/lib/src/gql_object_type_definition.dart b/dart_packages/cactus_sync_client_gen/lib/src/gql_object_type_definition.dart index aaeab93..b146171 100644 --- a/dart_packages/cactus_sync_client_gen/lib/src/gql_object_type_definition.dart +++ b/dart_packages/cactus_sync_client_gen/lib/src/gql_object_type_definition.dart @@ -56,7 +56,7 @@ class GqlObjectTypeDefinition { ], ), ); - final getters = isEquatable + final getters = isEquatable && !isResultList ? [ Method( (m) => m