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