diff --git a/README.md b/README.md index 9d926277..40f9a736 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ [github-forks-link]: https://github.com/gql-dart/gql/network/members [discord-badge]: https://img.shields.io/discord/559455668810153989.svg?style=for-the-badge&logo=discord&logoColor=ffffff -[discord-link]: https://discord.gg/NryjpVa +[discord-link]: https://discord.gg/YBFCTXNbwY This is an effort to advance the Dart GraphQL ecosystem. diff --git a/codegen/end_to_end_test/build.yaml b/codegen/end_to_end_test/build.yaml index 845da27f..c9ec1014 100644 --- a/codegen/end_to_end_test/build.yaml +++ b/codegen/end_to_end_test/build.yaml @@ -50,6 +50,7 @@ targets: enabled: true options: schema: end_to_end_test|lib/graphql/schema.graphql + vars_create_factories: true type_overrides: Date: name: DateTime diff --git a/codegen/end_to_end_test/lib/aliases/__generated__/alias_var_fragment.data.gql.dart b/codegen/end_to_end_test/lib/aliases/__generated__/alias_var_fragment.data.gql.dart index fc03d848..4a86762c 100644 --- a/codegen/end_to_end_test/lib/aliases/__generated__/alias_var_fragment.data.gql.dart +++ b/codegen/end_to_end_test/lib/aliases/__generated__/alias_var_fragment.data.gql.dart @@ -13,7 +13,8 @@ part 'alias_var_fragment.data.gql.g.dart'; abstract class GPostsData implements Built { GPostsData._(); - factory GPostsData([Function(GPostsDataBuilder b) updates]) = _$GPostsData; + factory GPostsData([void Function(GPostsDataBuilder b) updates]) = + _$GPostsData; static void _initializeBuilder(GPostsDataBuilder b) => b..G__typename = 'Query'; @@ -39,7 +40,7 @@ abstract class GPostsData_posts implements Built, GPostFragment { GPostsData_posts._(); - factory GPostsData_posts([Function(GPostsData_postsBuilder b) updates]) = + factory GPostsData_posts([void Function(GPostsData_postsBuilder b) updates]) = _$GPostsData_posts; static void _initializeBuilder(GPostsData_postsBuilder b) => @@ -78,7 +79,7 @@ abstract class GPostsData_posts_isFavorited GPostsData_posts_isFavorited._(); factory GPostsData_posts_isFavorited( - [Function(GPostsData_posts_isFavoritedBuilder b) updates]) = + [void Function(GPostsData_posts_isFavoritedBuilder b) updates]) = _$GPostsData_posts_isFavorited; static void _initializeBuilder(GPostsData_posts_isFavoritedBuilder b) => @@ -112,7 +113,7 @@ abstract class GPostsData_posts_isLiked GPostsData_posts_isLiked._(); factory GPostsData_posts_isLiked( - [Function(GPostsData_posts_isLikedBuilder b) updates]) = + [void Function(GPostsData_posts_isLikedBuilder b) updates]) = _$GPostsData_posts_isLiked; static void _initializeBuilder(GPostsData_posts_isLikedBuilder b) => @@ -165,7 +166,8 @@ abstract class GPostFragmentData GPostFragment { GPostFragmentData._(); - factory GPostFragmentData([Function(GPostFragmentDataBuilder b) updates]) = + factory GPostFragmentData( + [void Function(GPostFragmentDataBuilder b) updates]) = _$GPostFragmentData; static void _initializeBuilder(GPostFragmentDataBuilder b) => @@ -204,7 +206,7 @@ abstract class GPostFragmentData_isFavorited GPostFragmentData_isFavorited._(); factory GPostFragmentData_isFavorited( - [Function(GPostFragmentData_isFavoritedBuilder b) updates]) = + [void Function(GPostFragmentData_isFavoritedBuilder b) updates]) = _$GPostFragmentData_isFavorited; static void _initializeBuilder(GPostFragmentData_isFavoritedBuilder b) => @@ -238,7 +240,7 @@ abstract class GPostFragmentData_isLiked GPostFragmentData_isLiked._(); factory GPostFragmentData_isLiked( - [Function(GPostFragmentData_isLikedBuilder b) updates]) = + [void Function(GPostFragmentData_isLikedBuilder b) updates]) = _$GPostFragmentData_isLiked; static void _initializeBuilder(GPostFragmentData_isLikedBuilder b) => diff --git a/codegen/end_to_end_test/lib/aliases/__generated__/alias_var_fragment.req.gql.dart b/codegen/end_to_end_test/lib/aliases/__generated__/alias_var_fragment.req.gql.dart index a668586c..c190fb3f 100644 --- a/codegen/end_to_end_test/lib/aliases/__generated__/alias_var_fragment.req.gql.dart +++ b/codegen/end_to_end_test/lib/aliases/__generated__/alias_var_fragment.req.gql.dart @@ -17,7 +17,7 @@ part 'alias_var_fragment.req.gql.g.dart'; abstract class GPosts implements Built { GPosts._(); - factory GPosts([Function(GPostsBuilder b) updates]) = _$GPosts; + factory GPosts([void Function(GPostsBuilder b) updates]) = _$GPosts; static void _initializeBuilder(GPostsBuilder b) => b ..operation = _i1.Operation( diff --git a/codegen/end_to_end_test/lib/aliases/__generated__/alias_var_fragment.var.gql.dart b/codegen/end_to_end_test/lib/aliases/__generated__/alias_var_fragment.var.gql.dart index a57a54a4..8cae8c83 100644 --- a/codegen/end_to_end_test/lib/aliases/__generated__/alias_var_fragment.var.gql.dart +++ b/codegen/end_to_end_test/lib/aliases/__generated__/alias_var_fragment.var.gql.dart @@ -12,7 +12,11 @@ part 'alias_var_fragment.var.gql.g.dart'; abstract class GPostsVars implements Built { GPostsVars._(); - factory GPostsVars([Function(GPostsVarsBuilder b) updates]) = _$GPostsVars; + factory GPostsVars([void Function(GPostsVarsBuilder b) updates]) = + _$GPostsVars; + + factory GPostsVars.create({required String userId}) => + GPostsVars((b) => b..userId = userId); String get userId; static Serializer get serializer => _$gPostsVarsSerializer; @@ -33,9 +37,13 @@ abstract class GPostFragmentVars implements Built { GPostFragmentVars._(); - factory GPostFragmentVars([Function(GPostFragmentVarsBuilder b) updates]) = + factory GPostFragmentVars( + [void Function(GPostFragmentVarsBuilder b) updates]) = _$GPostFragmentVars; + factory GPostFragmentVars.create({required String userId}) => + GPostFragmentVars((b) => b..userId = userId); + String get userId; static Serializer get serializer => _$gPostFragmentVarsSerializer; diff --git a/codegen/end_to_end_test/lib/aliases/__generated__/aliased_hero.data.gql.dart b/codegen/end_to_end_test/lib/aliases/__generated__/aliased_hero.data.gql.dart index 1aa34499..8f4fecf8 100644 --- a/codegen/end_to_end_test/lib/aliases/__generated__/aliased_hero.data.gql.dart +++ b/codegen/end_to_end_test/lib/aliases/__generated__/aliased_hero.data.gql.dart @@ -16,7 +16,7 @@ abstract class GAliasedHeroData implements Built { GAliasedHeroData._(); - factory GAliasedHeroData([Function(GAliasedHeroDataBuilder b) updates]) = + factory GAliasedHeroData([void Function(GAliasedHeroDataBuilder b) updates]) = _$GAliasedHeroData; static void _initializeBuilder(GAliasedHeroDataBuilder b) => @@ -47,7 +47,7 @@ abstract class GAliasedHeroData_empireHero GAliasedHeroData_empireHero._(); factory GAliasedHeroData_empireHero( - [Function(GAliasedHeroData_empireHeroBuilder b) updates]) = + [void Function(GAliasedHeroData_empireHeroBuilder b) updates]) = _$GAliasedHeroData_empireHero; static void _initializeBuilder(GAliasedHeroData_empireHeroBuilder b) => @@ -79,7 +79,7 @@ abstract class GAliasedHeroData_jediHero GAliasedHeroData_jediHero._(); factory GAliasedHeroData_jediHero( - [Function(GAliasedHeroData_jediHeroBuilder b) updates]) = + [void Function(GAliasedHeroData_jediHeroBuilder b) updates]) = _$GAliasedHeroData_jediHero; static void _initializeBuilder(GAliasedHeroData_jediHeroBuilder b) => diff --git a/codegen/end_to_end_test/lib/aliases/__generated__/aliased_hero.req.gql.dart b/codegen/end_to_end_test/lib/aliases/__generated__/aliased_hero.req.gql.dart index a216d77c..f54d38e8 100644 --- a/codegen/end_to_end_test/lib/aliases/__generated__/aliased_hero.req.gql.dart +++ b/codegen/end_to_end_test/lib/aliases/__generated__/aliased_hero.req.gql.dart @@ -18,7 +18,7 @@ abstract class GAliasedHero implements Built { GAliasedHero._(); - factory GAliasedHero([Function(GAliasedHeroBuilder b) updates]) = + factory GAliasedHero([void Function(GAliasedHeroBuilder b) updates]) = _$GAliasedHero; static void _initializeBuilder(GAliasedHeroBuilder b) => b diff --git a/codegen/end_to_end_test/lib/aliases/__generated__/aliased_hero.var.gql.dart b/codegen/end_to_end_test/lib/aliases/__generated__/aliased_hero.var.gql.dart index f4d2ee29..e87fe0d2 100644 --- a/codegen/end_to_end_test/lib/aliases/__generated__/aliased_hero.var.gql.dart +++ b/codegen/end_to_end_test/lib/aliases/__generated__/aliased_hero.var.gql.dart @@ -15,9 +15,12 @@ abstract class GAliasedHeroVars implements Built { GAliasedHeroVars._(); - factory GAliasedHeroVars([Function(GAliasedHeroVarsBuilder b) updates]) = + factory GAliasedHeroVars([void Function(GAliasedHeroVarsBuilder b) updates]) = _$GAliasedHeroVars; + factory GAliasedHeroVars.create({required _i1.GEpisode ep}) => + GAliasedHeroVars((b) => b..ep = ep); + _i1.GEpisode get ep; static Serializer get serializer => _$gAliasedHeroVarsSerializer; diff --git a/codegen/end_to_end_test/lib/fragments/__generated__/fragment_with_scalar_var.data.gql.dart b/codegen/end_to_end_test/lib/fragments/__generated__/fragment_with_scalar_var.data.gql.dart index 4740c372..18474aed 100644 --- a/codegen/end_to_end_test/lib/fragments/__generated__/fragment_with_scalar_var.data.gql.dart +++ b/codegen/end_to_end_test/lib/fragments/__generated__/fragment_with_scalar_var.data.gql.dart @@ -16,7 +16,7 @@ abstract class GPostsWithFixedVariableData GPostsWithFixedVariableData._(); factory GPostsWithFixedVariableData( - [Function(GPostsWithFixedVariableDataBuilder b) updates]) = + [void Function(GPostsWithFixedVariableDataBuilder b) updates]) = _$GPostsWithFixedVariableData; static void _initializeBuilder(GPostsWithFixedVariableDataBuilder b) => @@ -48,7 +48,7 @@ abstract class GPostsWithFixedVariableData_posts GPostsWithFixedVariableData_posts._(); factory GPostsWithFixedVariableData_posts( - [Function(GPostsWithFixedVariableData_postsBuilder b) updates]) = + [void Function(GPostsWithFixedVariableData_postsBuilder b) updates]) = _$GPostsWithFixedVariableData_posts; static void _initializeBuilder(GPostsWithFixedVariableData_postsBuilder b) => @@ -86,7 +86,7 @@ abstract class GPostsWithFixedVariableData_posts_favoritedUsers GPostsWithFixedVariableData_posts_favoritedUsers._(); factory GPostsWithFixedVariableData_posts_favoritedUsers( - [Function(GPostsWithFixedVariableData_posts_favoritedUsersBuilder b) + [void Function(GPostsWithFixedVariableData_posts_favoritedUsersBuilder b) updates]) = _$GPostsWithFixedVariableData_posts_favoritedUsers; static void _initializeBuilder( @@ -136,7 +136,7 @@ abstract class GPostFragmentForUser1Data GPostFragmentForUser1Data._(); factory GPostFragmentForUser1Data( - [Function(GPostFragmentForUser1DataBuilder b) updates]) = + [void Function(GPostFragmentForUser1DataBuilder b) updates]) = _$GPostFragmentForUser1Data; static void _initializeBuilder(GPostFragmentForUser1DataBuilder b) => @@ -173,7 +173,7 @@ abstract class GPostFragmentForUser1Data_favoritedUsers GPostFragmentForUser1Data_favoritedUsers._(); factory GPostFragmentForUser1Data_favoritedUsers( - [Function(GPostFragmentForUser1Data_favoritedUsersBuilder b) + [void Function(GPostFragmentForUser1Data_favoritedUsersBuilder b) updates]) = _$GPostFragmentForUser1Data_favoritedUsers; static void _initializeBuilder( diff --git a/codegen/end_to_end_test/lib/fragments/__generated__/fragment_with_scalar_var.req.gql.dart b/codegen/end_to_end_test/lib/fragments/__generated__/fragment_with_scalar_var.req.gql.dart index 23fd9fc8..2402d510 100644 --- a/codegen/end_to_end_test/lib/fragments/__generated__/fragment_with_scalar_var.req.gql.dart +++ b/codegen/end_to_end_test/lib/fragments/__generated__/fragment_with_scalar_var.req.gql.dart @@ -19,7 +19,7 @@ abstract class GPostsWithFixedVariable GPostsWithFixedVariable._(); factory GPostsWithFixedVariable( - [Function(GPostsWithFixedVariableBuilder b) updates]) = + [void Function(GPostsWithFixedVariableBuilder b) updates]) = _$GPostsWithFixedVariable; static void _initializeBuilder(GPostsWithFixedVariableBuilder b) => b diff --git a/codegen/end_to_end_test/lib/fragments/__generated__/fragment_with_scalar_var.var.gql.dart b/codegen/end_to_end_test/lib/fragments/__generated__/fragment_with_scalar_var.var.gql.dart index 1eb7bd4d..9ae60682 100644 --- a/codegen/end_to_end_test/lib/fragments/__generated__/fragment_with_scalar_var.var.gql.dart +++ b/codegen/end_to_end_test/lib/fragments/__generated__/fragment_with_scalar_var.var.gql.dart @@ -17,9 +17,12 @@ abstract class GPostsWithFixedVariableVars GPostsWithFixedVariableVars._(); factory GPostsWithFixedVariableVars( - [Function(GPostsWithFixedVariableVarsBuilder b) updates]) = + [void Function(GPostsWithFixedVariableVarsBuilder b) updates]) = _$GPostsWithFixedVariableVars; + factory GPostsWithFixedVariableVars.create({required _i1.GJson? filter}) => + GPostsWithFixedVariableVars((b) => b..filter = filter?.toBuilder()); + _i1.GJson? get filter; static Serializer get serializer => _$gPostsWithFixedVariableVarsSerializer; @@ -42,9 +45,11 @@ abstract class GPostFragmentForUser1Vars GPostFragmentForUser1Vars._(); factory GPostFragmentForUser1Vars( - [Function(GPostFragmentForUser1VarsBuilder b) updates]) = + [void Function(GPostFragmentForUser1VarsBuilder b) updates]) = _$GPostFragmentForUser1Vars; + factory GPostFragmentForUser1Vars.create() => GPostFragmentForUser1Vars(); + static Serializer get serializer => _$gPostFragmentForUser1VarsSerializer; diff --git a/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_fragments.data.gql.dart b/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_fragments.data.gql.dart index 8a8f6ffa..a447049b 100644 --- a/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_fragments.data.gql.dart +++ b/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_fragments.data.gql.dart @@ -15,7 +15,7 @@ abstract class GHeroWithFragmentsData GHeroWithFragmentsData._(); factory GHeroWithFragmentsData( - [Function(GHeroWithFragmentsDataBuilder b) updates]) = + [void Function(GHeroWithFragmentsDataBuilder b) updates]) = _$GHeroWithFragmentsData; static void _initializeBuilder(GHeroWithFragmentsDataBuilder b) => @@ -46,7 +46,7 @@ abstract class GHeroWithFragmentsData_hero GHeroWithFragmentsData_hero._(); factory GHeroWithFragmentsData_hero( - [Function(GHeroWithFragmentsData_heroBuilder b) updates]) = + [void Function(GHeroWithFragmentsData_heroBuilder b) updates]) = _$GHeroWithFragmentsData_hero; static void _initializeBuilder(GHeroWithFragmentsData_heroBuilder b) => @@ -85,7 +85,7 @@ abstract class GHeroWithFragmentsData_hero_friendsConnection GHeroWithFragmentsData_hero_friendsConnection._(); factory GHeroWithFragmentsData_hero_friendsConnection( - [Function(GHeroWithFragmentsData_hero_friendsConnectionBuilder b) + [void Function(GHeroWithFragmentsData_hero_friendsConnectionBuilder b) updates]) = _$GHeroWithFragmentsData_hero_friendsConnection; static void _initializeBuilder( @@ -124,7 +124,8 @@ abstract class GHeroWithFragmentsData_hero_friendsConnection_edges GHeroWithFragmentsData_hero_friendsConnection_edges._(); factory GHeroWithFragmentsData_hero_friendsConnection_edges( - [Function(GHeroWithFragmentsData_hero_friendsConnection_edgesBuilder b) + [void Function( + GHeroWithFragmentsData_hero_friendsConnection_edgesBuilder b) updates]) = _$GHeroWithFragmentsData_hero_friendsConnection_edges; static void _initializeBuilder( @@ -163,7 +164,7 @@ abstract class GHeroWithFragmentsData_hero_friendsConnection_edges_node GHeroWithFragmentsData_hero_friendsConnection_edges_node._(); factory GHeroWithFragmentsData_hero_friendsConnection_edges_node( - [Function( + [void Function( GHeroWithFragmentsData_hero_friendsConnection_edges_nodeBuilder b) updates]) = _$GHeroWithFragmentsData_hero_friendsConnection_edges_node; @@ -204,7 +205,7 @@ abstract class GheroDataData implements Built, GheroData { GheroDataData._(); - factory GheroDataData([Function(GheroDataDataBuilder b) updates]) = + factory GheroDataData([void Function(GheroDataDataBuilder b) updates]) = _$GheroDataData; static void _initializeBuilder(GheroDataDataBuilder b) => @@ -272,7 +273,7 @@ abstract class GcomparisonFieldsData GcomparisonFieldsData._(); factory GcomparisonFieldsData( - [Function(GcomparisonFieldsDataBuilder b) updates]) = + [void Function(GcomparisonFieldsDataBuilder b) updates]) = _$GcomparisonFieldsData; static void _initializeBuilder(GcomparisonFieldsDataBuilder b) => @@ -311,7 +312,7 @@ abstract class GcomparisonFieldsData_friendsConnection GcomparisonFieldsData_friendsConnection._(); factory GcomparisonFieldsData_friendsConnection( - [Function(GcomparisonFieldsData_friendsConnectionBuilder b) + [void Function(GcomparisonFieldsData_friendsConnectionBuilder b) updates]) = _$GcomparisonFieldsData_friendsConnection; static void _initializeBuilder( @@ -350,7 +351,7 @@ abstract class GcomparisonFieldsData_friendsConnection_edges GcomparisonFieldsData_friendsConnection_edges._(); factory GcomparisonFieldsData_friendsConnection_edges( - [Function(GcomparisonFieldsData_friendsConnection_edgesBuilder b) + [void Function(GcomparisonFieldsData_friendsConnection_edgesBuilder b) updates]) = _$GcomparisonFieldsData_friendsConnection_edges; static void _initializeBuilder( @@ -388,7 +389,8 @@ abstract class GcomparisonFieldsData_friendsConnection_edges_node GcomparisonFieldsData_friendsConnection_edges_node._(); factory GcomparisonFieldsData_friendsConnection_edges_node( - [Function(GcomparisonFieldsData_friendsConnection_edges_nodeBuilder b) + [void Function( + GcomparisonFieldsData_friendsConnection_edges_nodeBuilder b) updates]) = _$GcomparisonFieldsData_friendsConnection_edges_node; static void _initializeBuilder( diff --git a/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_fragments.req.gql.dart b/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_fragments.req.gql.dart index 919f3a55..1d37415e 100644 --- a/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_fragments.req.gql.dart +++ b/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_fragments.req.gql.dart @@ -18,7 +18,8 @@ abstract class GHeroWithFragments implements Built { GHeroWithFragments._(); - factory GHeroWithFragments([Function(GHeroWithFragmentsBuilder b) updates]) = + factory GHeroWithFragments( + [void Function(GHeroWithFragmentsBuilder b) updates]) = _$GHeroWithFragments; static void _initializeBuilder(GHeroWithFragmentsBuilder b) => b diff --git a/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_fragments.var.gql.dart b/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_fragments.var.gql.dart index cb0a4709..4d470c5e 100644 --- a/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_fragments.var.gql.dart +++ b/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_fragments.var.gql.dart @@ -14,9 +14,12 @@ abstract class GHeroWithFragmentsVars GHeroWithFragmentsVars._(); factory GHeroWithFragmentsVars( - [Function(GHeroWithFragmentsVarsBuilder b) updates]) = + [void Function(GHeroWithFragmentsVarsBuilder b) updates]) = _$GHeroWithFragmentsVars; + factory GHeroWithFragmentsVars.create({required int? first}) => + GHeroWithFragmentsVars((b) => b..first = first); + int? get first; static Serializer get serializer => _$gHeroWithFragmentsVarsSerializer; @@ -37,9 +40,11 @@ abstract class GheroDataVars implements Built { GheroDataVars._(); - factory GheroDataVars([Function(GheroDataVarsBuilder b) updates]) = + factory GheroDataVars([void Function(GheroDataVarsBuilder b) updates]) = _$GheroDataVars; + factory GheroDataVars.create() => GheroDataVars(); + static Serializer get serializer => _$gheroDataVarsSerializer; Map toJson() => (_i1.serializers.serializeWith( @@ -59,9 +64,12 @@ abstract class GcomparisonFieldsVars GcomparisonFieldsVars._(); factory GcomparisonFieldsVars( - [Function(GcomparisonFieldsVarsBuilder b) updates]) = + [void Function(GcomparisonFieldsVarsBuilder b) updates]) = _$GcomparisonFieldsVars; + factory GcomparisonFieldsVars.create({required int? first}) => + GcomparisonFieldsVars((b) => b..first = first); + int? get first; static Serializer get serializer => _$gcomparisonFieldsVarsSerializer; diff --git a/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.data.gql.dart b/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.data.gql.dart index f7308305..400d3487 100644 --- a/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.data.gql.dart +++ b/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.data.gql.dart @@ -19,7 +19,7 @@ abstract class GHeroWithInterfaceSubTypedFragmentsData GHeroWithInterfaceSubTypedFragmentsData._(); factory GHeroWithInterfaceSubTypedFragmentsData( - [Function(GHeroWithInterfaceSubTypedFragmentsDataBuilder b) + [void Function(GHeroWithInterfaceSubTypedFragmentsDataBuilder b) updates]) = _$GHeroWithInterfaceSubTypedFragmentsData; static void _initializeBuilder( @@ -53,7 +53,7 @@ abstract class GHeroWithInterfaceSubTypedFragmentsData_hero GHeroWithInterfaceSubTypedFragmentsData_hero._(); factory GHeroWithInterfaceSubTypedFragmentsData_hero( - [Function(GHeroWithInterfaceSubTypedFragmentsData_heroBuilder b) + [void Function(GHeroWithInterfaceSubTypedFragmentsData_heroBuilder b) updates]) = _$GHeroWithInterfaceSubTypedFragmentsData_hero; static void _initializeBuilder( @@ -315,7 +315,7 @@ abstract class GheroFieldsFragmentData__base GheroFieldsFragmentData__base._(); factory GheroFieldsFragmentData__base( - [Function(GheroFieldsFragmentData__baseBuilder b) updates]) = + [void Function(GheroFieldsFragmentData__baseBuilder b) updates]) = _$GheroFieldsFragmentData__base; static void _initializeBuilder(GheroFieldsFragmentData__baseBuilder b) => @@ -353,7 +353,7 @@ abstract class GheroFieldsFragmentData__asHuman GheroFieldsFragmentData__asHuman._(); factory GheroFieldsFragmentData__asHuman( - [Function(GheroFieldsFragmentData__asHumanBuilder b) updates]) = + [void Function(GheroFieldsFragmentData__asHumanBuilder b) updates]) = _$GheroFieldsFragmentData__asHuman; static void _initializeBuilder(GheroFieldsFragmentData__asHumanBuilder b) => @@ -464,7 +464,7 @@ abstract class GheroFieldsFragmentData__asHuman_friends__base GheroFieldsFragmentData__asHuman_friends__base._(); factory GheroFieldsFragmentData__asHuman_friends__base( - [Function(GheroFieldsFragmentData__asHuman_friends__baseBuilder b) + [void Function(GheroFieldsFragmentData__asHuman_friends__baseBuilder b) updates]) = _$GheroFieldsFragmentData__asHuman_friends__base; static void _initializeBuilder( @@ -500,7 +500,7 @@ abstract class GheroFieldsFragmentData__asHuman_friends__asDroid GheroFieldsFragmentData__asHuman_friends__asDroid._(); factory GheroFieldsFragmentData__asHuman_friends__asDroid( - [Function(GheroFieldsFragmentData__asHuman_friends__asDroidBuilder b) + [void Function(GheroFieldsFragmentData__asHuman_friends__asDroidBuilder b) updates]) = _$GheroFieldsFragmentData__asHuman_friends__asDroid; static void _initializeBuilder( @@ -540,7 +540,7 @@ abstract class GheroFieldsFragmentData__asHuman_friends__asHuman GheroFieldsFragmentData__asHuman_friends__asHuman._(); factory GheroFieldsFragmentData__asHuman_friends__asHuman( - [Function(GheroFieldsFragmentData__asHuman_friends__asHumanBuilder b) + [void Function(GheroFieldsFragmentData__asHuman_friends__asHumanBuilder b) updates]) = _$GheroFieldsFragmentData__asHuman_friends__asHuman; static void _initializeBuilder( @@ -580,7 +580,7 @@ abstract class GheroFieldsFragmentData__asDroid GheroFieldsFragmentData__asDroid._(); factory GheroFieldsFragmentData__asDroid( - [Function(GheroFieldsFragmentData__asDroidBuilder b) updates]) = + [void Function(GheroFieldsFragmentData__asDroidBuilder b) updates]) = _$GheroFieldsFragmentData__asDroid; static void _initializeBuilder(GheroFieldsFragmentData__asDroidBuilder b) => @@ -698,7 +698,7 @@ abstract class GhumanFieldsFragmentData GhumanFieldsFragmentData._(); factory GhumanFieldsFragmentData( - [Function(GhumanFieldsFragmentDataBuilder b) updates]) = + [void Function(GhumanFieldsFragmentDataBuilder b) updates]) = _$GhumanFieldsFragmentData; static void _initializeBuilder(GhumanFieldsFragmentDataBuilder b) => @@ -800,8 +800,8 @@ abstract class GhumanFieldsFragmentData_friends__base GhumanFieldsFragmentData_friends__base._(); factory GhumanFieldsFragmentData_friends__base( - [Function(GhumanFieldsFragmentData_friends__baseBuilder b) updates]) = - _$GhumanFieldsFragmentData_friends__base; + [void Function(GhumanFieldsFragmentData_friends__baseBuilder b) + updates]) = _$GhumanFieldsFragmentData_friends__base; static void _initializeBuilder( GhumanFieldsFragmentData_friends__baseBuilder b) => @@ -836,7 +836,7 @@ abstract class GhumanFieldsFragmentData_friends__asDroid GhumanFieldsFragmentData_friends__asDroid._(); factory GhumanFieldsFragmentData_friends__asDroid( - [Function(GhumanFieldsFragmentData_friends__asDroidBuilder b) + [void Function(GhumanFieldsFragmentData_friends__asDroidBuilder b) updates]) = _$GhumanFieldsFragmentData_friends__asDroid; static void _initializeBuilder( @@ -875,7 +875,7 @@ abstract class GhumanFieldsFragmentData_friends__asHuman GhumanFieldsFragmentData_friends__asHuman._(); factory GhumanFieldsFragmentData_friends__asHuman( - [Function(GhumanFieldsFragmentData_friends__asHumanBuilder b) + [void Function(GhumanFieldsFragmentData_friends__asHumanBuilder b) updates]) = _$GhumanFieldsFragmentData_friends__asHuman; static void _initializeBuilder( @@ -918,7 +918,7 @@ abstract class GdroidFieldsFragmentData GdroidFieldsFragmentData._(); factory GdroidFieldsFragmentData( - [Function(GdroidFieldsFragmentDataBuilder b) updates]) = + [void Function(GdroidFieldsFragmentDataBuilder b) updates]) = _$GdroidFieldsFragmentData; static void _initializeBuilder(GdroidFieldsFragmentDataBuilder b) => diff --git a/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.req.gql.dart b/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.req.gql.dart index 4544f2d4..84c82ddb 100644 --- a/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.req.gql.dart +++ b/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.req.gql.dart @@ -21,8 +21,8 @@ abstract class GHeroWithInterfaceSubTypedFragments GHeroWithInterfaceSubTypedFragments._(); factory GHeroWithInterfaceSubTypedFragments( - [Function(GHeroWithInterfaceSubTypedFragmentsBuilder b) updates]) = - _$GHeroWithInterfaceSubTypedFragments; + [void Function(GHeroWithInterfaceSubTypedFragmentsBuilder b) + updates]) = _$GHeroWithInterfaceSubTypedFragments; static void _initializeBuilder( GHeroWithInterfaceSubTypedFragmentsBuilder b) => diff --git a/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.var.gql.dart b/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.var.gql.dart index 6ea5ff77..d167b705 100644 --- a/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.var.gql.dart +++ b/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.var.gql.dart @@ -18,9 +18,13 @@ abstract class GHeroWithInterfaceSubTypedFragmentsVars GHeroWithInterfaceSubTypedFragmentsVars._(); factory GHeroWithInterfaceSubTypedFragmentsVars( - [Function(GHeroWithInterfaceSubTypedFragmentsVarsBuilder b) + [void Function(GHeroWithInterfaceSubTypedFragmentsVarsBuilder b) updates]) = _$GHeroWithInterfaceSubTypedFragmentsVars; + factory GHeroWithInterfaceSubTypedFragmentsVars.create( + {required _i1.GEpisode episode}) => + GHeroWithInterfaceSubTypedFragmentsVars((b) => b..episode = episode); + _i1.GEpisode get episode; static Serializer get serializer => _$gHeroWithInterfaceSubTypedFragmentsVarsSerializer; @@ -43,9 +47,11 @@ abstract class GheroFieldsFragmentVars GheroFieldsFragmentVars._(); factory GheroFieldsFragmentVars( - [Function(GheroFieldsFragmentVarsBuilder b) updates]) = + [void Function(GheroFieldsFragmentVarsBuilder b) updates]) = _$GheroFieldsFragmentVars; + factory GheroFieldsFragmentVars.create() => GheroFieldsFragmentVars(); + static Serializer get serializer => _$gheroFieldsFragmentVarsSerializer; @@ -67,9 +73,11 @@ abstract class GhumanFieldsFragmentVars GhumanFieldsFragmentVars._(); factory GhumanFieldsFragmentVars( - [Function(GhumanFieldsFragmentVarsBuilder b) updates]) = + [void Function(GhumanFieldsFragmentVarsBuilder b) updates]) = _$GhumanFieldsFragmentVars; + factory GhumanFieldsFragmentVars.create() => GhumanFieldsFragmentVars(); + static Serializer get serializer => _$ghumanFieldsFragmentVarsSerializer; @@ -91,9 +99,11 @@ abstract class GdroidFieldsFragmentVars GdroidFieldsFragmentVars._(); factory GdroidFieldsFragmentVars( - [Function(GdroidFieldsFragmentVarsBuilder b) updates]) = + [void Function(GdroidFieldsFragmentVarsBuilder b) updates]) = _$GdroidFieldsFragmentVars; + factory GdroidFieldsFragmentVars.create() => GdroidFieldsFragmentVars(); + static Serializer get serializer => _$gdroidFieldsFragmentVarsSerializer; diff --git a/codegen/end_to_end_test/lib/fragments/__generated__/multiple_fragments.data.gql.dart b/codegen/end_to_end_test/lib/fragments/__generated__/multiple_fragments.data.gql.dart index 8b7b047e..36cf6433 100644 --- a/codegen/end_to_end_test/lib/fragments/__generated__/multiple_fragments.data.gql.dart +++ b/codegen/end_to_end_test/lib/fragments/__generated__/multiple_fragments.data.gql.dart @@ -14,7 +14,7 @@ abstract class GHeroWith2FragmentsData GHeroWith2FragmentsData._(); factory GHeroWith2FragmentsData( - [Function(GHeroWith2FragmentsDataBuilder b) updates]) = + [void Function(GHeroWith2FragmentsDataBuilder b) updates]) = _$GHeroWith2FragmentsData; static void _initializeBuilder(GHeroWith2FragmentsDataBuilder b) => @@ -47,7 +47,7 @@ abstract class GHeroWith2FragmentsData_hero GHeroWith2FragmentsData_hero._(); factory GHeroWith2FragmentsData_hero( - [Function(GHeroWith2FragmentsData_heroBuilder b) updates]) = + [void Function(GHeroWith2FragmentsData_heroBuilder b) updates]) = _$GHeroWith2FragmentsData_hero; static void _initializeBuilder(GHeroWith2FragmentsData_heroBuilder b) => @@ -86,7 +86,7 @@ abstract class GheroNameData implements Built, GheroName { GheroNameData._(); - factory GheroNameData([Function(GheroNameDataBuilder b) updates]) = + factory GheroNameData([void Function(GheroNameDataBuilder b) updates]) = _$GheroNameData; static void _initializeBuilder(GheroNameDataBuilder b) => @@ -122,7 +122,8 @@ abstract class GheroIdData implements Built, GheroId { GheroIdData._(); - factory GheroIdData([Function(GheroIdDataBuilder b) updates]) = _$GheroIdData; + factory GheroIdData([void Function(GheroIdDataBuilder b) updates]) = + _$GheroIdData; static void _initializeBuilder(GheroIdDataBuilder b) => b..G__typename = 'Character'; diff --git a/codegen/end_to_end_test/lib/fragments/__generated__/multiple_fragments.req.gql.dart b/codegen/end_to_end_test/lib/fragments/__generated__/multiple_fragments.req.gql.dart index 532882c3..e0225328 100644 --- a/codegen/end_to_end_test/lib/fragments/__generated__/multiple_fragments.req.gql.dart +++ b/codegen/end_to_end_test/lib/fragments/__generated__/multiple_fragments.req.gql.dart @@ -19,7 +19,8 @@ abstract class GHeroWith2Fragments GHeroWith2Fragments._(); factory GHeroWith2Fragments( - [Function(GHeroWith2FragmentsBuilder b) updates]) = _$GHeroWith2Fragments; + [void Function(GHeroWith2FragmentsBuilder b) updates]) = + _$GHeroWith2Fragments; static void _initializeBuilder(GHeroWith2FragmentsBuilder b) => b ..operation = _i1.Operation( diff --git a/codegen/end_to_end_test/lib/fragments/__generated__/multiple_fragments.var.gql.dart b/codegen/end_to_end_test/lib/fragments/__generated__/multiple_fragments.var.gql.dart index ae781cb0..4ffcb5a5 100644 --- a/codegen/end_to_end_test/lib/fragments/__generated__/multiple_fragments.var.gql.dart +++ b/codegen/end_to_end_test/lib/fragments/__generated__/multiple_fragments.var.gql.dart @@ -14,9 +14,12 @@ abstract class GHeroWith2FragmentsVars GHeroWith2FragmentsVars._(); factory GHeroWith2FragmentsVars( - [Function(GHeroWith2FragmentsVarsBuilder b) updates]) = + [void Function(GHeroWith2FragmentsVarsBuilder b) updates]) = _$GHeroWith2FragmentsVars; + factory GHeroWith2FragmentsVars.create({required int? first}) => + GHeroWith2FragmentsVars((b) => b..first = first); + int? get first; static Serializer get serializer => _$gHeroWith2FragmentsVarsSerializer; @@ -37,9 +40,11 @@ abstract class GheroNameVars implements Built { GheroNameVars._(); - factory GheroNameVars([Function(GheroNameVarsBuilder b) updates]) = + factory GheroNameVars([void Function(GheroNameVarsBuilder b) updates]) = _$GheroNameVars; + factory GheroNameVars.create() => GheroNameVars(); + static Serializer get serializer => _$gheroNameVarsSerializer; Map toJson() => (_i1.serializers.serializeWith( @@ -57,7 +62,10 @@ abstract class GheroNameVars abstract class GheroIdVars implements Built { GheroIdVars._(); - factory GheroIdVars([Function(GheroIdVarsBuilder b) updates]) = _$GheroIdVars; + factory GheroIdVars([void Function(GheroIdVarsBuilder b) updates]) = + _$GheroIdVars; + + factory GheroIdVars.create() => GheroIdVars(); static Serializer get serializer => _$gheroIdVarsSerializer; diff --git a/codegen/end_to_end_test/lib/graphql/__generated__/schema.schema.gql.dart b/codegen/end_to_end_test/lib/graphql/__generated__/schema.schema.gql.dart index 517c2477..a5e5943a 100644 --- a/codegen/end_to_end_test/lib/graphql/__generated__/schema.schema.gql.dart +++ b/codegen/end_to_end_test/lib/graphql/__generated__/schema.schema.gql.dart @@ -51,7 +51,7 @@ abstract class GReviewInput implements Built { GReviewInput._(); - factory GReviewInput([Function(GReviewInputBuilder b) updates]) = + factory GReviewInput([void Function(GReviewInputBuilder b) updates]) = _$GReviewInput; int get stars; @@ -76,7 +76,8 @@ abstract class GCustomFieldInput implements Built { GCustomFieldInput._(); - factory GCustomFieldInput([Function(GCustomFieldInputBuilder b) updates]) = + factory GCustomFieldInput( + [void Function(GCustomFieldInputBuilder b) updates]) = _$GCustomFieldInput; String get id; @@ -99,7 +100,8 @@ abstract class GCustomFieldInput abstract class GColorInput implements Built { GColorInput._(); - factory GColorInput([Function(GColorInputBuilder b) updates]) = _$GColorInput; + factory GColorInput([void Function(GColorInputBuilder b) updates]) = + _$GColorInput; int get red; int get green; @@ -122,7 +124,7 @@ abstract class GPostLikesInput implements Built { GPostLikesInput._(); - factory GPostLikesInput([Function(GPostLikesInputBuilder b) updates]) = + factory GPostLikesInput([void Function(GPostLikesInputBuilder b) updates]) = _$GPostLikesInput; String get id; @@ -146,7 +148,8 @@ abstract class GPostFavoritesInput GPostFavoritesInput._(); factory GPostFavoritesInput( - [Function(GPostFavoritesInputBuilder b) updates]) = _$GPostFavoritesInput; + [void Function(GPostFavoritesInputBuilder b) updates]) = + _$GPostFavoritesInput; String get id; static Serializer get serializer => diff --git a/codegen/end_to_end_test/lib/interfaces/__generated__/hero_for_episode.data.gql.dart b/codegen/end_to_end_test/lib/interfaces/__generated__/hero_for_episode.data.gql.dart index ef7e5b53..0c53c5ef 100644 --- a/codegen/end_to_end_test/lib/interfaces/__generated__/hero_for_episode.data.gql.dart +++ b/codegen/end_to_end_test/lib/interfaces/__generated__/hero_for_episode.data.gql.dart @@ -17,7 +17,8 @@ abstract class GHeroForEpisodeData GHeroForEpisodeData._(); factory GHeroForEpisodeData( - [Function(GHeroForEpisodeDataBuilder b) updates]) = _$GHeroForEpisodeData; + [void Function(GHeroForEpisodeDataBuilder b) updates]) = + _$GHeroForEpisodeData; static void _initializeBuilder(GHeroForEpisodeDataBuilder b) => b..G__typename = 'Query'; @@ -100,7 +101,7 @@ abstract class GHeroForEpisodeData_hero__base GHeroForEpisodeData_hero__base._(); factory GHeroForEpisodeData_hero__base( - [Function(GHeroForEpisodeData_hero__baseBuilder b) updates]) = + [void Function(GHeroForEpisodeData_hero__baseBuilder b) updates]) = _$GHeroForEpisodeData_hero__base; static void _initializeBuilder(GHeroForEpisodeData_hero__baseBuilder b) => @@ -137,8 +138,8 @@ abstract class GHeroForEpisodeData_hero__base_friends GHeroForEpisodeData_hero__base_friends._(); factory GHeroForEpisodeData_hero__base_friends( - [Function(GHeroForEpisodeData_hero__base_friendsBuilder b) updates]) = - _$GHeroForEpisodeData_hero__base_friends; + [void Function(GHeroForEpisodeData_hero__base_friendsBuilder b) + updates]) = _$GHeroForEpisodeData_hero__base_friends; static void _initializeBuilder( GHeroForEpisodeData_hero__base_friendsBuilder b) => @@ -175,7 +176,7 @@ abstract class GHeroForEpisodeData_hero__asDroid GHeroForEpisodeData_hero__asDroid._(); factory GHeroForEpisodeData_hero__asDroid( - [Function(GHeroForEpisodeData_hero__asDroidBuilder b) updates]) = + [void Function(GHeroForEpisodeData_hero__asDroidBuilder b) updates]) = _$GHeroForEpisodeData_hero__asDroid; static void _initializeBuilder(GHeroForEpisodeData_hero__asDroidBuilder b) => @@ -215,7 +216,7 @@ abstract class GHeroForEpisodeData_hero__asDroid_friends GHeroForEpisodeData_hero__asDroid_friends._(); factory GHeroForEpisodeData_hero__asDroid_friends( - [Function(GHeroForEpisodeData_hero__asDroid_friendsBuilder b) + [void Function(GHeroForEpisodeData_hero__asDroid_friendsBuilder b) updates]) = _$GHeroForEpisodeData_hero__asDroid_friends; static void _initializeBuilder( @@ -262,7 +263,8 @@ abstract class GDroidFragmentData GDroidFragment { GDroidFragmentData._(); - factory GDroidFragmentData([Function(GDroidFragmentDataBuilder b) updates]) = + factory GDroidFragmentData( + [void Function(GDroidFragmentDataBuilder b) updates]) = _$GDroidFragmentData; static void _initializeBuilder(GDroidFragmentDataBuilder b) => diff --git a/codegen/end_to_end_test/lib/interfaces/__generated__/hero_for_episode.req.gql.dart b/codegen/end_to_end_test/lib/interfaces/__generated__/hero_for_episode.req.gql.dart index 777d95b5..c201fe40 100644 --- a/codegen/end_to_end_test/lib/interfaces/__generated__/hero_for_episode.req.gql.dart +++ b/codegen/end_to_end_test/lib/interfaces/__generated__/hero_for_episode.req.gql.dart @@ -18,7 +18,7 @@ abstract class GHeroForEpisode implements Built { GHeroForEpisode._(); - factory GHeroForEpisode([Function(GHeroForEpisodeBuilder b) updates]) = + factory GHeroForEpisode([void Function(GHeroForEpisodeBuilder b) updates]) = _$GHeroForEpisode; static void _initializeBuilder(GHeroForEpisodeBuilder b) => b diff --git a/codegen/end_to_end_test/lib/interfaces/__generated__/hero_for_episode.var.gql.dart b/codegen/end_to_end_test/lib/interfaces/__generated__/hero_for_episode.var.gql.dart index 4946036f..a8f473d6 100644 --- a/codegen/end_to_end_test/lib/interfaces/__generated__/hero_for_episode.var.gql.dart +++ b/codegen/end_to_end_test/lib/interfaces/__generated__/hero_for_episode.var.gql.dart @@ -16,7 +16,11 @@ abstract class GHeroForEpisodeVars GHeroForEpisodeVars._(); factory GHeroForEpisodeVars( - [Function(GHeroForEpisodeVarsBuilder b) updates]) = _$GHeroForEpisodeVars; + [void Function(GHeroForEpisodeVarsBuilder b) updates]) = + _$GHeroForEpisodeVars; + + factory GHeroForEpisodeVars.create({required _i1.GEpisode ep}) => + GHeroForEpisodeVars((b) => b..ep = ep); _i1.GEpisode get ep; static Serializer get serializer => @@ -38,9 +42,12 @@ abstract class GDroidFragmentVars implements Built { GDroidFragmentVars._(); - factory GDroidFragmentVars([Function(GDroidFragmentVarsBuilder b) updates]) = + factory GDroidFragmentVars( + [void Function(GDroidFragmentVarsBuilder b) updates]) = _$GDroidFragmentVars; + factory GDroidFragmentVars.create() => GDroidFragmentVars(); + static Serializer get serializer => _$gDroidFragmentVarsSerializer; diff --git a/codegen/end_to_end_test/lib/no_vars/__generated__/hero_no_vars.data.gql.dart b/codegen/end_to_end_test/lib/no_vars/__generated__/hero_no_vars.data.gql.dart index 61d60b74..296a0380 100644 --- a/codegen/end_to_end_test/lib/no_vars/__generated__/hero_no_vars.data.gql.dart +++ b/codegen/end_to_end_test/lib/no_vars/__generated__/hero_no_vars.data.gql.dart @@ -13,7 +13,7 @@ abstract class GHeroNoVarsData implements Built { GHeroNoVarsData._(); - factory GHeroNoVarsData([Function(GHeroNoVarsDataBuilder b) updates]) = + factory GHeroNoVarsData([void Function(GHeroNoVarsDataBuilder b) updates]) = _$GHeroNoVarsData; static void _initializeBuilder(GHeroNoVarsDataBuilder b) => @@ -42,7 +42,7 @@ abstract class GHeroNoVarsData_hero GHeroNoVarsData_hero._(); factory GHeroNoVarsData_hero( - [Function(GHeroNoVarsData_heroBuilder b) updates]) = + [void Function(GHeroNoVarsData_heroBuilder b) updates]) = _$GHeroNoVarsData_hero; static void _initializeBuilder(GHeroNoVarsData_heroBuilder b) => diff --git a/codegen/end_to_end_test/lib/no_vars/__generated__/hero_no_vars.req.gql.dart b/codegen/end_to_end_test/lib/no_vars/__generated__/hero_no_vars.req.gql.dart index c2a95c68..afdcd295 100644 --- a/codegen/end_to_end_test/lib/no_vars/__generated__/hero_no_vars.req.gql.dart +++ b/codegen/end_to_end_test/lib/no_vars/__generated__/hero_no_vars.req.gql.dart @@ -17,7 +17,8 @@ part 'hero_no_vars.req.gql.g.dart'; abstract class GHeroNoVars implements Built { GHeroNoVars._(); - factory GHeroNoVars([Function(GHeroNoVarsBuilder b) updates]) = _$GHeroNoVars; + factory GHeroNoVars([void Function(GHeroNoVarsBuilder b) updates]) = + _$GHeroNoVars; static void _initializeBuilder(GHeroNoVarsBuilder b) => b ..operation = _i1.Operation( diff --git a/codegen/end_to_end_test/lib/no_vars/__generated__/hero_no_vars.var.gql.dart b/codegen/end_to_end_test/lib/no_vars/__generated__/hero_no_vars.var.gql.dart index a93cb2fb..8161aee7 100644 --- a/codegen/end_to_end_test/lib/no_vars/__generated__/hero_no_vars.var.gql.dart +++ b/codegen/end_to_end_test/lib/no_vars/__generated__/hero_no_vars.var.gql.dart @@ -13,9 +13,11 @@ abstract class GHeroNoVarsVars implements Built { GHeroNoVarsVars._(); - factory GHeroNoVarsVars([Function(GHeroNoVarsVarsBuilder b) updates]) = + factory GHeroNoVarsVars([void Function(GHeroNoVarsVarsBuilder b) updates]) = _$GHeroNoVarsVars; + factory GHeroNoVarsVars.create() => GHeroNoVarsVars(); + static Serializer get serializer => _$gHeroNoVarsVarsSerializer; diff --git a/codegen/end_to_end_test/lib/scalars/__generated__/review_with_date.data.gql.dart b/codegen/end_to_end_test/lib/scalars/__generated__/review_with_date.data.gql.dart index fa99d54f..be7458e0 100644 --- a/codegen/end_to_end_test/lib/scalars/__generated__/review_with_date.data.gql.dart +++ b/codegen/end_to_end_test/lib/scalars/__generated__/review_with_date.data.gql.dart @@ -18,7 +18,8 @@ abstract class GReviewWithDateData GReviewWithDateData._(); factory GReviewWithDateData( - [Function(GReviewWithDateDataBuilder b) updates]) = _$GReviewWithDateData; + [void Function(GReviewWithDateDataBuilder b) updates]) = + _$GReviewWithDateData; static void _initializeBuilder(GReviewWithDateDataBuilder b) => b..G__typename = 'Mutation'; @@ -48,7 +49,7 @@ abstract class GReviewWithDateData_createReview GReviewWithDateData_createReview._(); factory GReviewWithDateData_createReview( - [Function(GReviewWithDateData_createReviewBuilder b) updates]) = + [void Function(GReviewWithDateData_createReviewBuilder b) updates]) = _$GReviewWithDateData_createReview; static void _initializeBuilder(GReviewWithDateData_createReviewBuilder b) => diff --git a/codegen/end_to_end_test/lib/scalars/__generated__/review_with_date.req.gql.dart b/codegen/end_to_end_test/lib/scalars/__generated__/review_with_date.req.gql.dart index b9c59a10..abfc145d 100644 --- a/codegen/end_to_end_test/lib/scalars/__generated__/review_with_date.req.gql.dart +++ b/codegen/end_to_end_test/lib/scalars/__generated__/review_with_date.req.gql.dart @@ -18,7 +18,7 @@ abstract class GReviewWithDate implements Built { GReviewWithDate._(); - factory GReviewWithDate([Function(GReviewWithDateBuilder b) updates]) = + factory GReviewWithDate([void Function(GReviewWithDateBuilder b) updates]) = _$GReviewWithDate; static void _initializeBuilder(GReviewWithDateBuilder b) => b diff --git a/codegen/end_to_end_test/lib/scalars/__generated__/review_with_date.var.gql.dart b/codegen/end_to_end_test/lib/scalars/__generated__/review_with_date.var.gql.dart index 1e6ee798..f76367ed 100644 --- a/codegen/end_to_end_test/lib/scalars/__generated__/review_with_date.var.gql.dart +++ b/codegen/end_to_end_test/lib/scalars/__generated__/review_with_date.var.gql.dart @@ -16,7 +16,18 @@ abstract class GReviewWithDateVars GReviewWithDateVars._(); factory GReviewWithDateVars( - [Function(GReviewWithDateVarsBuilder b) updates]) = _$GReviewWithDateVars; + [void Function(GReviewWithDateVarsBuilder b) updates]) = + _$GReviewWithDateVars; + + factory GReviewWithDateVars.create({ + required _i1.GEpisode? episode, + required _i1.GReviewInput review, + required DateTime? createdAt, + }) => + GReviewWithDateVars((b) => b + ..episode = episode + ..review = review.toBuilder() + ..createdAt = createdAt); _i1.GEpisode? get episode; _i1.GReviewInput get review; diff --git a/codegen/end_to_end_test/lib/variables/__generated__/create_custom_field.data.gql.dart b/codegen/end_to_end_test/lib/variables/__generated__/create_custom_field.data.gql.dart index 7d378ae6..7f1c0a06 100644 --- a/codegen/end_to_end_test/lib/variables/__generated__/create_custom_field.data.gql.dart +++ b/codegen/end_to_end_test/lib/variables/__generated__/create_custom_field.data.gql.dart @@ -15,7 +15,7 @@ abstract class GCreateCustomFieldData GCreateCustomFieldData._(); factory GCreateCustomFieldData( - [Function(GCreateCustomFieldDataBuilder b) updates]) = + [void Function(GCreateCustomFieldDataBuilder b) updates]) = _$GCreateCustomFieldData; static void _initializeBuilder(GCreateCustomFieldDataBuilder b) => diff --git a/codegen/end_to_end_test/lib/variables/__generated__/create_custom_field.req.gql.dart b/codegen/end_to_end_test/lib/variables/__generated__/create_custom_field.req.gql.dart index e47d1b36..36b28dd0 100644 --- a/codegen/end_to_end_test/lib/variables/__generated__/create_custom_field.req.gql.dart +++ b/codegen/end_to_end_test/lib/variables/__generated__/create_custom_field.req.gql.dart @@ -18,7 +18,8 @@ abstract class GCreateCustomField implements Built { GCreateCustomField._(); - factory GCreateCustomField([Function(GCreateCustomFieldBuilder b) updates]) = + factory GCreateCustomField( + [void Function(GCreateCustomFieldBuilder b) updates]) = _$GCreateCustomField; static void _initializeBuilder(GCreateCustomFieldBuilder b) => b diff --git a/codegen/end_to_end_test/lib/variables/__generated__/create_custom_field.var.gql.dart b/codegen/end_to_end_test/lib/variables/__generated__/create_custom_field.var.gql.dart index c30c6d17..d5fe5027 100644 --- a/codegen/end_to_end_test/lib/variables/__generated__/create_custom_field.var.gql.dart +++ b/codegen/end_to_end_test/lib/variables/__generated__/create_custom_field.var.gql.dart @@ -16,9 +16,13 @@ abstract class GCreateCustomFieldVars GCreateCustomFieldVars._(); factory GCreateCustomFieldVars( - [Function(GCreateCustomFieldVarsBuilder b) updates]) = + [void Function(GCreateCustomFieldVarsBuilder b) updates]) = _$GCreateCustomFieldVars; + factory GCreateCustomFieldVars.create( + {required _i1.GCustomFieldInput input}) => + GCreateCustomFieldVars((b) => b..input = input.toBuilder()); + _i1.GCustomFieldInput get input; static Serializer get serializer => _$gCreateCustomFieldVarsSerializer; diff --git a/codegen/end_to_end_test/lib/variables/__generated__/create_review.data.gql.dart b/codegen/end_to_end_test/lib/variables/__generated__/create_review.data.gql.dart index 939332c3..d4ed4cc4 100644 --- a/codegen/end_to_end_test/lib/variables/__generated__/create_review.data.gql.dart +++ b/codegen/end_to_end_test/lib/variables/__generated__/create_review.data.gql.dart @@ -15,7 +15,8 @@ abstract class GCreateReviewData implements Built { GCreateReviewData._(); - factory GCreateReviewData([Function(GCreateReviewDataBuilder b) updates]) = + factory GCreateReviewData( + [void Function(GCreateReviewDataBuilder b) updates]) = _$GCreateReviewData; static void _initializeBuilder(GCreateReviewDataBuilder b) => @@ -46,7 +47,7 @@ abstract class GCreateReviewData_createReview GCreateReviewData_createReview._(); factory GCreateReviewData_createReview( - [Function(GCreateReviewData_createReviewBuilder b) updates]) = + [void Function(GCreateReviewData_createReviewBuilder b) updates]) = _$GCreateReviewData_createReview; static void _initializeBuilder(GCreateReviewData_createReviewBuilder b) => diff --git a/codegen/end_to_end_test/lib/variables/__generated__/create_review.req.gql.dart b/codegen/end_to_end_test/lib/variables/__generated__/create_review.req.gql.dart index 62f2b9e1..da0bf2a0 100644 --- a/codegen/end_to_end_test/lib/variables/__generated__/create_review.req.gql.dart +++ b/codegen/end_to_end_test/lib/variables/__generated__/create_review.req.gql.dart @@ -18,7 +18,7 @@ abstract class GCreateReview implements Built { GCreateReview._(); - factory GCreateReview([Function(GCreateReviewBuilder b) updates]) = + factory GCreateReview([void Function(GCreateReviewBuilder b) updates]) = _$GCreateReview; static void _initializeBuilder(GCreateReviewBuilder b) => b diff --git a/codegen/end_to_end_test/lib/variables/__generated__/create_review.var.gql.dart b/codegen/end_to_end_test/lib/variables/__generated__/create_review.var.gql.dart index b49c98ae..63e00968 100644 --- a/codegen/end_to_end_test/lib/variables/__generated__/create_review.var.gql.dart +++ b/codegen/end_to_end_test/lib/variables/__generated__/create_review.var.gql.dart @@ -15,9 +15,18 @@ abstract class GCreateReviewVars implements Built { GCreateReviewVars._(); - factory GCreateReviewVars([Function(GCreateReviewVarsBuilder b) updates]) = + factory GCreateReviewVars( + [void Function(GCreateReviewVarsBuilder b) updates]) = _$GCreateReviewVars; + factory GCreateReviewVars.create({ + required _i1.GEpisode? episode, + required _i1.GReviewInput review, + }) => + GCreateReviewVars((b) => b + ..episode = episode + ..review = review.toBuilder()); + _i1.GEpisode? get episode; _i1.GReviewInput get review; static Serializer get serializer => diff --git a/codegen/end_to_end_test/lib/variables/__generated__/human_with_args.data.gql.dart b/codegen/end_to_end_test/lib/variables/__generated__/human_with_args.data.gql.dart index 958823de..9f83c04d 100644 --- a/codegen/end_to_end_test/lib/variables/__generated__/human_with_args.data.gql.dart +++ b/codegen/end_to_end_test/lib/variables/__generated__/human_with_args.data.gql.dart @@ -13,7 +13,8 @@ abstract class GHumanWithArgsData implements Built { GHumanWithArgsData._(); - factory GHumanWithArgsData([Function(GHumanWithArgsDataBuilder b) updates]) = + factory GHumanWithArgsData( + [void Function(GHumanWithArgsDataBuilder b) updates]) = _$GHumanWithArgsData; static void _initializeBuilder(GHumanWithArgsDataBuilder b) => @@ -43,7 +44,7 @@ abstract class GHumanWithArgsData_human GHumanWithArgsData_human._(); factory GHumanWithArgsData_human( - [Function(GHumanWithArgsData_humanBuilder b) updates]) = + [void Function(GHumanWithArgsData_humanBuilder b) updates]) = _$GHumanWithArgsData_human; static void _initializeBuilder(GHumanWithArgsData_humanBuilder b) => diff --git a/codegen/end_to_end_test/lib/variables/__generated__/human_with_args.req.gql.dart b/codegen/end_to_end_test/lib/variables/__generated__/human_with_args.req.gql.dart index bb1c8949..0287cca6 100644 --- a/codegen/end_to_end_test/lib/variables/__generated__/human_with_args.req.gql.dart +++ b/codegen/end_to_end_test/lib/variables/__generated__/human_with_args.req.gql.dart @@ -18,7 +18,7 @@ abstract class GHumanWithArgs implements Built { GHumanWithArgs._(); - factory GHumanWithArgs([Function(GHumanWithArgsBuilder b) updates]) = + factory GHumanWithArgs([void Function(GHumanWithArgsBuilder b) updates]) = _$GHumanWithArgs; static void _initializeBuilder(GHumanWithArgsBuilder b) => b diff --git a/codegen/end_to_end_test/lib/variables/__generated__/human_with_args.var.gql.dart b/codegen/end_to_end_test/lib/variables/__generated__/human_with_args.var.gql.dart index 32d9434a..a4f7f476 100644 --- a/codegen/end_to_end_test/lib/variables/__generated__/human_with_args.var.gql.dart +++ b/codegen/end_to_end_test/lib/variables/__generated__/human_with_args.var.gql.dart @@ -13,9 +13,13 @@ abstract class GHumanWithArgsVars implements Built { GHumanWithArgsVars._(); - factory GHumanWithArgsVars([Function(GHumanWithArgsVarsBuilder b) updates]) = + factory GHumanWithArgsVars( + [void Function(GHumanWithArgsVarsBuilder b) updates]) = _$GHumanWithArgsVars; + factory GHumanWithArgsVars.create({required String id}) => + GHumanWithArgsVars((b) => b..id = id); + String get id; static Serializer get serializer => _$gHumanWithArgsVarsSerializer; diff --git a/codegen/end_to_end_test_tristate/build.yaml b/codegen/end_to_end_test_tristate/build.yaml index ba605c1e..34f5af92 100644 --- a/codegen/end_to_end_test_tristate/build.yaml +++ b/codegen/end_to_end_test_tristate/build.yaml @@ -52,6 +52,7 @@ targets: options: schema: end_to_end_test_tristate|lib/graphql/schema.graphql tristate_optionals: true + vars_create_factories: true type_overrides: Date: name: DateTime diff --git a/codegen/end_to_end_test_tristate/lib/aliases/__generated__/alias_var_fragment.data.gql.dart b/codegen/end_to_end_test_tristate/lib/aliases/__generated__/alias_var_fragment.data.gql.dart index f497c61b..8aa047a2 100644 --- a/codegen/end_to_end_test_tristate/lib/aliases/__generated__/alias_var_fragment.data.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/aliases/__generated__/alias_var_fragment.data.gql.dart @@ -13,7 +13,8 @@ part 'alias_var_fragment.data.gql.g.dart'; abstract class GPostsData implements Built { GPostsData._(); - factory GPostsData([Function(GPostsDataBuilder b) updates]) = _$GPostsData; + factory GPostsData([void Function(GPostsDataBuilder b) updates]) = + _$GPostsData; static void _initializeBuilder(GPostsDataBuilder b) => b..G__typename = 'Query'; @@ -39,7 +40,7 @@ abstract class GPostsData_posts implements Built, GPostFragment { GPostsData_posts._(); - factory GPostsData_posts([Function(GPostsData_postsBuilder b) updates]) = + factory GPostsData_posts([void Function(GPostsData_postsBuilder b) updates]) = _$GPostsData_posts; static void _initializeBuilder(GPostsData_postsBuilder b) => @@ -78,7 +79,7 @@ abstract class GPostsData_posts_isFavorited GPostsData_posts_isFavorited._(); factory GPostsData_posts_isFavorited( - [Function(GPostsData_posts_isFavoritedBuilder b) updates]) = + [void Function(GPostsData_posts_isFavoritedBuilder b) updates]) = _$GPostsData_posts_isFavorited; static void _initializeBuilder(GPostsData_posts_isFavoritedBuilder b) => @@ -112,7 +113,7 @@ abstract class GPostsData_posts_isLiked GPostsData_posts_isLiked._(); factory GPostsData_posts_isLiked( - [Function(GPostsData_posts_isLikedBuilder b) updates]) = + [void Function(GPostsData_posts_isLikedBuilder b) updates]) = _$GPostsData_posts_isLiked; static void _initializeBuilder(GPostsData_posts_isLikedBuilder b) => @@ -165,7 +166,8 @@ abstract class GPostFragmentData GPostFragment { GPostFragmentData._(); - factory GPostFragmentData([Function(GPostFragmentDataBuilder b) updates]) = + factory GPostFragmentData( + [void Function(GPostFragmentDataBuilder b) updates]) = _$GPostFragmentData; static void _initializeBuilder(GPostFragmentDataBuilder b) => @@ -204,7 +206,7 @@ abstract class GPostFragmentData_isFavorited GPostFragmentData_isFavorited._(); factory GPostFragmentData_isFavorited( - [Function(GPostFragmentData_isFavoritedBuilder b) updates]) = + [void Function(GPostFragmentData_isFavoritedBuilder b) updates]) = _$GPostFragmentData_isFavorited; static void _initializeBuilder(GPostFragmentData_isFavoritedBuilder b) => @@ -238,7 +240,7 @@ abstract class GPostFragmentData_isLiked GPostFragmentData_isLiked._(); factory GPostFragmentData_isLiked( - [Function(GPostFragmentData_isLikedBuilder b) updates]) = + [void Function(GPostFragmentData_isLikedBuilder b) updates]) = _$GPostFragmentData_isLiked; static void _initializeBuilder(GPostFragmentData_isLikedBuilder b) => diff --git a/codegen/end_to_end_test_tristate/lib/aliases/__generated__/alias_var_fragment.req.gql.dart b/codegen/end_to_end_test_tristate/lib/aliases/__generated__/alias_var_fragment.req.gql.dart index 68f84cee..fa735e7e 100644 --- a/codegen/end_to_end_test_tristate/lib/aliases/__generated__/alias_var_fragment.req.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/aliases/__generated__/alias_var_fragment.req.gql.dart @@ -17,7 +17,7 @@ part 'alias_var_fragment.req.gql.g.dart'; abstract class GPosts implements Built { GPosts._(); - factory GPosts([Function(GPostsBuilder b) updates]) = _$GPosts; + factory GPosts([void Function(GPostsBuilder b) updates]) = _$GPosts; static void _initializeBuilder(GPostsBuilder b) => b ..operation = _i1.Operation( diff --git a/codegen/end_to_end_test_tristate/lib/aliases/__generated__/alias_var_fragment.var.gql.dart b/codegen/end_to_end_test_tristate/lib/aliases/__generated__/alias_var_fragment.var.gql.dart index 719150a6..ee58d273 100644 --- a/codegen/end_to_end_test_tristate/lib/aliases/__generated__/alias_var_fragment.var.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/aliases/__generated__/alias_var_fragment.var.gql.dart @@ -12,7 +12,11 @@ part 'alias_var_fragment.var.gql.g.dart'; abstract class GPostsVars implements Built { GPostsVars._(); - factory GPostsVars([Function(GPostsVarsBuilder b) updates]) = _$GPostsVars; + factory GPostsVars([void Function(GPostsVarsBuilder b) updates]) = + _$GPostsVars; + + factory GPostsVars.create({required String userId}) => + GPostsVars((b) => b..userId = userId); String get userId; Map toJson() => (_i1.serializers.serializeWith( @@ -34,9 +38,13 @@ abstract class GPostFragmentVars implements Built { GPostFragmentVars._(); - factory GPostFragmentVars([Function(GPostFragmentVarsBuilder b) updates]) = + factory GPostFragmentVars( + [void Function(GPostFragmentVarsBuilder b) updates]) = _$GPostFragmentVars; + factory GPostFragmentVars.create({required String userId}) => + GPostFragmentVars((b) => b..userId = userId); + String get userId; Map toJson() => (_i1.serializers.serializeWith( GPostFragmentVars.serializer, diff --git a/codegen/end_to_end_test_tristate/lib/aliases/__generated__/aliased_hero.data.gql.dart b/codegen/end_to_end_test_tristate/lib/aliases/__generated__/aliased_hero.data.gql.dart index 344a78d6..2eb00bd7 100644 --- a/codegen/end_to_end_test_tristate/lib/aliases/__generated__/aliased_hero.data.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/aliases/__generated__/aliased_hero.data.gql.dart @@ -16,7 +16,7 @@ abstract class GAliasedHeroData implements Built { GAliasedHeroData._(); - factory GAliasedHeroData([Function(GAliasedHeroDataBuilder b) updates]) = + factory GAliasedHeroData([void Function(GAliasedHeroDataBuilder b) updates]) = _$GAliasedHeroData; static void _initializeBuilder(GAliasedHeroDataBuilder b) => @@ -47,7 +47,7 @@ abstract class GAliasedHeroData_empireHero GAliasedHeroData_empireHero._(); factory GAliasedHeroData_empireHero( - [Function(GAliasedHeroData_empireHeroBuilder b) updates]) = + [void Function(GAliasedHeroData_empireHeroBuilder b) updates]) = _$GAliasedHeroData_empireHero; static void _initializeBuilder(GAliasedHeroData_empireHeroBuilder b) => @@ -79,7 +79,7 @@ abstract class GAliasedHeroData_jediHero GAliasedHeroData_jediHero._(); factory GAliasedHeroData_jediHero( - [Function(GAliasedHeroData_jediHeroBuilder b) updates]) = + [void Function(GAliasedHeroData_jediHeroBuilder b) updates]) = _$GAliasedHeroData_jediHero; static void _initializeBuilder(GAliasedHeroData_jediHeroBuilder b) => diff --git a/codegen/end_to_end_test_tristate/lib/aliases/__generated__/aliased_hero.req.gql.dart b/codegen/end_to_end_test_tristate/lib/aliases/__generated__/aliased_hero.req.gql.dart index 3927344f..16a8a5c8 100644 --- a/codegen/end_to_end_test_tristate/lib/aliases/__generated__/aliased_hero.req.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/aliases/__generated__/aliased_hero.req.gql.dart @@ -18,7 +18,7 @@ abstract class GAliasedHero implements Built { GAliasedHero._(); - factory GAliasedHero([Function(GAliasedHeroBuilder b) updates]) = + factory GAliasedHero([void Function(GAliasedHeroBuilder b) updates]) = _$GAliasedHero; static void _initializeBuilder(GAliasedHeroBuilder b) => b diff --git a/codegen/end_to_end_test_tristate/lib/aliases/__generated__/aliased_hero.var.gql.dart b/codegen/end_to_end_test_tristate/lib/aliases/__generated__/aliased_hero.var.gql.dart index 8622fa1a..1c148125 100644 --- a/codegen/end_to_end_test_tristate/lib/aliases/__generated__/aliased_hero.var.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/aliases/__generated__/aliased_hero.var.gql.dart @@ -15,9 +15,12 @@ abstract class GAliasedHeroVars implements Built { GAliasedHeroVars._(); - factory GAliasedHeroVars([Function(GAliasedHeroVarsBuilder b) updates]) = + factory GAliasedHeroVars([void Function(GAliasedHeroVarsBuilder b) updates]) = _$GAliasedHeroVars; + factory GAliasedHeroVars.create({required _i1.GEpisode ep}) => + GAliasedHeroVars((b) => b..ep = ep); + _i1.GEpisode get ep; Map toJson() => (_i2.serializers.serializeWith( GAliasedHeroVars.serializer, diff --git a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/fragment_with_scalar_var.data.gql.dart b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/fragment_with_scalar_var.data.gql.dart index e0b8df54..e73ca323 100644 --- a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/fragment_with_scalar_var.data.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/fragment_with_scalar_var.data.gql.dart @@ -16,7 +16,7 @@ abstract class GPostsWithFixedVariableData GPostsWithFixedVariableData._(); factory GPostsWithFixedVariableData( - [Function(GPostsWithFixedVariableDataBuilder b) updates]) = + [void Function(GPostsWithFixedVariableDataBuilder b) updates]) = _$GPostsWithFixedVariableData; static void _initializeBuilder(GPostsWithFixedVariableDataBuilder b) => @@ -48,7 +48,7 @@ abstract class GPostsWithFixedVariableData_posts GPostsWithFixedVariableData_posts._(); factory GPostsWithFixedVariableData_posts( - [Function(GPostsWithFixedVariableData_postsBuilder b) updates]) = + [void Function(GPostsWithFixedVariableData_postsBuilder b) updates]) = _$GPostsWithFixedVariableData_posts; static void _initializeBuilder(GPostsWithFixedVariableData_postsBuilder b) => @@ -86,7 +86,7 @@ abstract class GPostsWithFixedVariableData_posts_favoritedUsers GPostsWithFixedVariableData_posts_favoritedUsers._(); factory GPostsWithFixedVariableData_posts_favoritedUsers( - [Function(GPostsWithFixedVariableData_posts_favoritedUsersBuilder b) + [void Function(GPostsWithFixedVariableData_posts_favoritedUsersBuilder b) updates]) = _$GPostsWithFixedVariableData_posts_favoritedUsers; static void _initializeBuilder( @@ -136,7 +136,7 @@ abstract class GPostFragmentForUser1Data GPostFragmentForUser1Data._(); factory GPostFragmentForUser1Data( - [Function(GPostFragmentForUser1DataBuilder b) updates]) = + [void Function(GPostFragmentForUser1DataBuilder b) updates]) = _$GPostFragmentForUser1Data; static void _initializeBuilder(GPostFragmentForUser1DataBuilder b) => @@ -173,7 +173,7 @@ abstract class GPostFragmentForUser1Data_favoritedUsers GPostFragmentForUser1Data_favoritedUsers._(); factory GPostFragmentForUser1Data_favoritedUsers( - [Function(GPostFragmentForUser1Data_favoritedUsersBuilder b) + [void Function(GPostFragmentForUser1Data_favoritedUsersBuilder b) updates]) = _$GPostFragmentForUser1Data_favoritedUsers; static void _initializeBuilder( diff --git a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/fragment_with_scalar_var.req.gql.dart b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/fragment_with_scalar_var.req.gql.dart index f4a8abda..8d997a6c 100644 --- a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/fragment_with_scalar_var.req.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/fragment_with_scalar_var.req.gql.dart @@ -19,7 +19,7 @@ abstract class GPostsWithFixedVariable GPostsWithFixedVariable._(); factory GPostsWithFixedVariable( - [Function(GPostsWithFixedVariableBuilder b) updates]) = + [void Function(GPostsWithFixedVariableBuilder b) updates]) = _$GPostsWithFixedVariable; static void _initializeBuilder(GPostsWithFixedVariableBuilder b) => b diff --git a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/fragment_with_scalar_var.var.gql.dart b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/fragment_with_scalar_var.var.gql.dart index 2d9fc4e4..f146e089 100644 --- a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/fragment_with_scalar_var.var.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/fragment_with_scalar_var.var.gql.dart @@ -18,9 +18,13 @@ abstract class GPostsWithFixedVariableVars GPostsWithFixedVariableVars._(); factory GPostsWithFixedVariableVars( - [Function(GPostsWithFixedVariableVarsBuilder b) updates]) = + [void Function(GPostsWithFixedVariableVarsBuilder b) updates]) = _$GPostsWithFixedVariableVars; + factory GPostsWithFixedVariableVars.create( + {required _i1.Value<_i2.GJson> filter}) => + GPostsWithFixedVariableVars((b) => b..filter = filter); + static void _initializeBuilder(GPostsWithFixedVariableVarsBuilder b) => b..filter = const _i1.AbsentValue(); @@ -47,9 +51,11 @@ abstract class GPostFragmentForUser1Vars GPostFragmentForUser1Vars._(); factory GPostFragmentForUser1Vars( - [Function(GPostFragmentForUser1VarsBuilder b) updates]) = + [void Function(GPostFragmentForUser1VarsBuilder b) updates]) = _$GPostFragmentForUser1Vars; + factory GPostFragmentForUser1Vars.create() => GPostFragmentForUser1Vars(); + Map toJson() => (_i3.serializers.serializeWith( GPostFragmentForUser1Vars.serializer, this, diff --git a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_fragments.data.gql.dart b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_fragments.data.gql.dart index 5c53a18b..0e518fa5 100644 --- a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_fragments.data.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_fragments.data.gql.dart @@ -15,7 +15,7 @@ abstract class GHeroWithFragmentsData GHeroWithFragmentsData._(); factory GHeroWithFragmentsData( - [Function(GHeroWithFragmentsDataBuilder b) updates]) = + [void Function(GHeroWithFragmentsDataBuilder b) updates]) = _$GHeroWithFragmentsData; static void _initializeBuilder(GHeroWithFragmentsDataBuilder b) => @@ -46,7 +46,7 @@ abstract class GHeroWithFragmentsData_hero GHeroWithFragmentsData_hero._(); factory GHeroWithFragmentsData_hero( - [Function(GHeroWithFragmentsData_heroBuilder b) updates]) = + [void Function(GHeroWithFragmentsData_heroBuilder b) updates]) = _$GHeroWithFragmentsData_hero; static void _initializeBuilder(GHeroWithFragmentsData_heroBuilder b) => @@ -85,7 +85,7 @@ abstract class GHeroWithFragmentsData_hero_friendsConnection GHeroWithFragmentsData_hero_friendsConnection._(); factory GHeroWithFragmentsData_hero_friendsConnection( - [Function(GHeroWithFragmentsData_hero_friendsConnectionBuilder b) + [void Function(GHeroWithFragmentsData_hero_friendsConnectionBuilder b) updates]) = _$GHeroWithFragmentsData_hero_friendsConnection; static void _initializeBuilder( @@ -124,7 +124,8 @@ abstract class GHeroWithFragmentsData_hero_friendsConnection_edges GHeroWithFragmentsData_hero_friendsConnection_edges._(); factory GHeroWithFragmentsData_hero_friendsConnection_edges( - [Function(GHeroWithFragmentsData_hero_friendsConnection_edgesBuilder b) + [void Function( + GHeroWithFragmentsData_hero_friendsConnection_edgesBuilder b) updates]) = _$GHeroWithFragmentsData_hero_friendsConnection_edges; static void _initializeBuilder( @@ -163,7 +164,7 @@ abstract class GHeroWithFragmentsData_hero_friendsConnection_edges_node GHeroWithFragmentsData_hero_friendsConnection_edges_node._(); factory GHeroWithFragmentsData_hero_friendsConnection_edges_node( - [Function( + [void Function( GHeroWithFragmentsData_hero_friendsConnection_edges_nodeBuilder b) updates]) = _$GHeroWithFragmentsData_hero_friendsConnection_edges_node; @@ -204,7 +205,7 @@ abstract class GheroDataData implements Built, GheroData { GheroDataData._(); - factory GheroDataData([Function(GheroDataDataBuilder b) updates]) = + factory GheroDataData([void Function(GheroDataDataBuilder b) updates]) = _$GheroDataData; static void _initializeBuilder(GheroDataDataBuilder b) => @@ -272,7 +273,7 @@ abstract class GcomparisonFieldsData GcomparisonFieldsData._(); factory GcomparisonFieldsData( - [Function(GcomparisonFieldsDataBuilder b) updates]) = + [void Function(GcomparisonFieldsDataBuilder b) updates]) = _$GcomparisonFieldsData; static void _initializeBuilder(GcomparisonFieldsDataBuilder b) => @@ -311,7 +312,7 @@ abstract class GcomparisonFieldsData_friendsConnection GcomparisonFieldsData_friendsConnection._(); factory GcomparisonFieldsData_friendsConnection( - [Function(GcomparisonFieldsData_friendsConnectionBuilder b) + [void Function(GcomparisonFieldsData_friendsConnectionBuilder b) updates]) = _$GcomparisonFieldsData_friendsConnection; static void _initializeBuilder( @@ -350,7 +351,7 @@ abstract class GcomparisonFieldsData_friendsConnection_edges GcomparisonFieldsData_friendsConnection_edges._(); factory GcomparisonFieldsData_friendsConnection_edges( - [Function(GcomparisonFieldsData_friendsConnection_edgesBuilder b) + [void Function(GcomparisonFieldsData_friendsConnection_edgesBuilder b) updates]) = _$GcomparisonFieldsData_friendsConnection_edges; static void _initializeBuilder( @@ -388,7 +389,8 @@ abstract class GcomparisonFieldsData_friendsConnection_edges_node GcomparisonFieldsData_friendsConnection_edges_node._(); factory GcomparisonFieldsData_friendsConnection_edges_node( - [Function(GcomparisonFieldsData_friendsConnection_edges_nodeBuilder b) + [void Function( + GcomparisonFieldsData_friendsConnection_edges_nodeBuilder b) updates]) = _$GcomparisonFieldsData_friendsConnection_edges_node; static void _initializeBuilder( diff --git a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_fragments.req.gql.dart b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_fragments.req.gql.dart index beae8325..49d605aa 100644 --- a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_fragments.req.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_fragments.req.gql.dart @@ -18,7 +18,8 @@ abstract class GHeroWithFragments implements Built { GHeroWithFragments._(); - factory GHeroWithFragments([Function(GHeroWithFragmentsBuilder b) updates]) = + factory GHeroWithFragments( + [void Function(GHeroWithFragmentsBuilder b) updates]) = _$GHeroWithFragments; static void _initializeBuilder(GHeroWithFragmentsBuilder b) => b diff --git a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_fragments.var.gql.dart b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_fragments.var.gql.dart index 5d7c50cb..bdc57124 100644 --- a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_fragments.var.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_fragments.var.gql.dart @@ -15,9 +15,12 @@ abstract class GHeroWithFragmentsVars GHeroWithFragmentsVars._(); factory GHeroWithFragmentsVars( - [Function(GHeroWithFragmentsVarsBuilder b) updates]) = + [void Function(GHeroWithFragmentsVarsBuilder b) updates]) = _$GHeroWithFragmentsVars; + factory GHeroWithFragmentsVars.create({required _i1.Value first}) => + GHeroWithFragmentsVars((b) => b..first = first); + static void _initializeBuilder(GHeroWithFragmentsVarsBuilder b) => b..first = const _i1.AbsentValue(); @@ -42,9 +45,11 @@ abstract class GheroDataVars implements Built { GheroDataVars._(); - factory GheroDataVars([Function(GheroDataVarsBuilder b) updates]) = + factory GheroDataVars([void Function(GheroDataVarsBuilder b) updates]) = _$GheroDataVars; + factory GheroDataVars.create() => GheroDataVars(); + Map toJson() => (_i2.serializers.serializeWith( GheroDataVars.serializer, this, @@ -65,9 +70,12 @@ abstract class GcomparisonFieldsVars GcomparisonFieldsVars._(); factory GcomparisonFieldsVars( - [Function(GcomparisonFieldsVarsBuilder b) updates]) = + [void Function(GcomparisonFieldsVarsBuilder b) updates]) = _$GcomparisonFieldsVars; + factory GcomparisonFieldsVars.create({required int? first}) => + GcomparisonFieldsVars((b) => b..first = first); + int? get first; Map toJson() => (_i2.serializers.serializeWith( GcomparisonFieldsVars.serializer, diff --git a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.data.gql.dart b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.data.gql.dart index f31c56fb..556761b7 100644 --- a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.data.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.data.gql.dart @@ -19,7 +19,7 @@ abstract class GHeroWithInterfaceSubTypedFragmentsData GHeroWithInterfaceSubTypedFragmentsData._(); factory GHeroWithInterfaceSubTypedFragmentsData( - [Function(GHeroWithInterfaceSubTypedFragmentsDataBuilder b) + [void Function(GHeroWithInterfaceSubTypedFragmentsDataBuilder b) updates]) = _$GHeroWithInterfaceSubTypedFragmentsData; static void _initializeBuilder( @@ -53,7 +53,7 @@ abstract class GHeroWithInterfaceSubTypedFragmentsData_hero GHeroWithInterfaceSubTypedFragmentsData_hero._(); factory GHeroWithInterfaceSubTypedFragmentsData_hero( - [Function(GHeroWithInterfaceSubTypedFragmentsData_heroBuilder b) + [void Function(GHeroWithInterfaceSubTypedFragmentsData_heroBuilder b) updates]) = _$GHeroWithInterfaceSubTypedFragmentsData_hero; static void _initializeBuilder( @@ -315,7 +315,7 @@ abstract class GheroFieldsFragmentData__base GheroFieldsFragmentData__base._(); factory GheroFieldsFragmentData__base( - [Function(GheroFieldsFragmentData__baseBuilder b) updates]) = + [void Function(GheroFieldsFragmentData__baseBuilder b) updates]) = _$GheroFieldsFragmentData__base; static void _initializeBuilder(GheroFieldsFragmentData__baseBuilder b) => @@ -353,7 +353,7 @@ abstract class GheroFieldsFragmentData__asHuman GheroFieldsFragmentData__asHuman._(); factory GheroFieldsFragmentData__asHuman( - [Function(GheroFieldsFragmentData__asHumanBuilder b) updates]) = + [void Function(GheroFieldsFragmentData__asHumanBuilder b) updates]) = _$GheroFieldsFragmentData__asHuman; static void _initializeBuilder(GheroFieldsFragmentData__asHumanBuilder b) => @@ -464,7 +464,7 @@ abstract class GheroFieldsFragmentData__asHuman_friends__base GheroFieldsFragmentData__asHuman_friends__base._(); factory GheroFieldsFragmentData__asHuman_friends__base( - [Function(GheroFieldsFragmentData__asHuman_friends__baseBuilder b) + [void Function(GheroFieldsFragmentData__asHuman_friends__baseBuilder b) updates]) = _$GheroFieldsFragmentData__asHuman_friends__base; static void _initializeBuilder( @@ -500,7 +500,7 @@ abstract class GheroFieldsFragmentData__asHuman_friends__asDroid GheroFieldsFragmentData__asHuman_friends__asDroid._(); factory GheroFieldsFragmentData__asHuman_friends__asDroid( - [Function(GheroFieldsFragmentData__asHuman_friends__asDroidBuilder b) + [void Function(GheroFieldsFragmentData__asHuman_friends__asDroidBuilder b) updates]) = _$GheroFieldsFragmentData__asHuman_friends__asDroid; static void _initializeBuilder( @@ -540,7 +540,7 @@ abstract class GheroFieldsFragmentData__asHuman_friends__asHuman GheroFieldsFragmentData__asHuman_friends__asHuman._(); factory GheroFieldsFragmentData__asHuman_friends__asHuman( - [Function(GheroFieldsFragmentData__asHuman_friends__asHumanBuilder b) + [void Function(GheroFieldsFragmentData__asHuman_friends__asHumanBuilder b) updates]) = _$GheroFieldsFragmentData__asHuman_friends__asHuman; static void _initializeBuilder( @@ -580,7 +580,7 @@ abstract class GheroFieldsFragmentData__asDroid GheroFieldsFragmentData__asDroid._(); factory GheroFieldsFragmentData__asDroid( - [Function(GheroFieldsFragmentData__asDroidBuilder b) updates]) = + [void Function(GheroFieldsFragmentData__asDroidBuilder b) updates]) = _$GheroFieldsFragmentData__asDroid; static void _initializeBuilder(GheroFieldsFragmentData__asDroidBuilder b) => @@ -698,7 +698,7 @@ abstract class GhumanFieldsFragmentData GhumanFieldsFragmentData._(); factory GhumanFieldsFragmentData( - [Function(GhumanFieldsFragmentDataBuilder b) updates]) = + [void Function(GhumanFieldsFragmentDataBuilder b) updates]) = _$GhumanFieldsFragmentData; static void _initializeBuilder(GhumanFieldsFragmentDataBuilder b) => @@ -800,8 +800,8 @@ abstract class GhumanFieldsFragmentData_friends__base GhumanFieldsFragmentData_friends__base._(); factory GhumanFieldsFragmentData_friends__base( - [Function(GhumanFieldsFragmentData_friends__baseBuilder b) updates]) = - _$GhumanFieldsFragmentData_friends__base; + [void Function(GhumanFieldsFragmentData_friends__baseBuilder b) + updates]) = _$GhumanFieldsFragmentData_friends__base; static void _initializeBuilder( GhumanFieldsFragmentData_friends__baseBuilder b) => @@ -836,7 +836,7 @@ abstract class GhumanFieldsFragmentData_friends__asDroid GhumanFieldsFragmentData_friends__asDroid._(); factory GhumanFieldsFragmentData_friends__asDroid( - [Function(GhumanFieldsFragmentData_friends__asDroidBuilder b) + [void Function(GhumanFieldsFragmentData_friends__asDroidBuilder b) updates]) = _$GhumanFieldsFragmentData_friends__asDroid; static void _initializeBuilder( @@ -875,7 +875,7 @@ abstract class GhumanFieldsFragmentData_friends__asHuman GhumanFieldsFragmentData_friends__asHuman._(); factory GhumanFieldsFragmentData_friends__asHuman( - [Function(GhumanFieldsFragmentData_friends__asHumanBuilder b) + [void Function(GhumanFieldsFragmentData_friends__asHumanBuilder b) updates]) = _$GhumanFieldsFragmentData_friends__asHuman; static void _initializeBuilder( @@ -918,7 +918,7 @@ abstract class GdroidFieldsFragmentData GdroidFieldsFragmentData._(); factory GdroidFieldsFragmentData( - [Function(GdroidFieldsFragmentDataBuilder b) updates]) = + [void Function(GdroidFieldsFragmentDataBuilder b) updates]) = _$GdroidFieldsFragmentData; static void _initializeBuilder(GdroidFieldsFragmentDataBuilder b) => diff --git a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.req.gql.dart b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.req.gql.dart index d99721e8..7791e760 100644 --- a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.req.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.req.gql.dart @@ -21,8 +21,8 @@ abstract class GHeroWithInterfaceSubTypedFragments GHeroWithInterfaceSubTypedFragments._(); factory GHeroWithInterfaceSubTypedFragments( - [Function(GHeroWithInterfaceSubTypedFragmentsBuilder b) updates]) = - _$GHeroWithInterfaceSubTypedFragments; + [void Function(GHeroWithInterfaceSubTypedFragmentsBuilder b) + updates]) = _$GHeroWithInterfaceSubTypedFragments; static void _initializeBuilder( GHeroWithInterfaceSubTypedFragmentsBuilder b) => diff --git a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.var.gql.dart b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.var.gql.dart index b83eb2c6..debbb36e 100644 --- a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.var.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/hero_with_interface_subtyped_fragments.var.gql.dart @@ -18,9 +18,13 @@ abstract class GHeroWithInterfaceSubTypedFragmentsVars GHeroWithInterfaceSubTypedFragmentsVars._(); factory GHeroWithInterfaceSubTypedFragmentsVars( - [Function(GHeroWithInterfaceSubTypedFragmentsVarsBuilder b) + [void Function(GHeroWithInterfaceSubTypedFragmentsVarsBuilder b) updates]) = _$GHeroWithInterfaceSubTypedFragmentsVars; + factory GHeroWithInterfaceSubTypedFragmentsVars.create( + {required _i1.GEpisode episode}) => + GHeroWithInterfaceSubTypedFragmentsVars((b) => b..episode = episode); + _i1.GEpisode get episode; Map toJson() => (_i2.serializers.serializeWith( GHeroWithInterfaceSubTypedFragmentsVars.serializer, @@ -44,9 +48,11 @@ abstract class GheroFieldsFragmentVars GheroFieldsFragmentVars._(); factory GheroFieldsFragmentVars( - [Function(GheroFieldsFragmentVarsBuilder b) updates]) = + [void Function(GheroFieldsFragmentVarsBuilder b) updates]) = _$GheroFieldsFragmentVars; + factory GheroFieldsFragmentVars.create() => GheroFieldsFragmentVars(); + Map toJson() => (_i2.serializers.serializeWith( GheroFieldsFragmentVars.serializer, this, @@ -69,9 +75,11 @@ abstract class GhumanFieldsFragmentVars GhumanFieldsFragmentVars._(); factory GhumanFieldsFragmentVars( - [Function(GhumanFieldsFragmentVarsBuilder b) updates]) = + [void Function(GhumanFieldsFragmentVarsBuilder b) updates]) = _$GhumanFieldsFragmentVars; + factory GhumanFieldsFragmentVars.create() => GhumanFieldsFragmentVars(); + Map toJson() => (_i2.serializers.serializeWith( GhumanFieldsFragmentVars.serializer, this, @@ -94,9 +102,11 @@ abstract class GdroidFieldsFragmentVars GdroidFieldsFragmentVars._(); factory GdroidFieldsFragmentVars( - [Function(GdroidFieldsFragmentVarsBuilder b) updates]) = + [void Function(GdroidFieldsFragmentVarsBuilder b) updates]) = _$GdroidFieldsFragmentVars; + factory GdroidFieldsFragmentVars.create() => GdroidFieldsFragmentVars(); + Map toJson() => (_i2.serializers.serializeWith( GdroidFieldsFragmentVars.serializer, this, diff --git a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/multiple_fragments.data.gql.dart b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/multiple_fragments.data.gql.dart index d4a49c2f..ac276aca 100644 --- a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/multiple_fragments.data.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/multiple_fragments.data.gql.dart @@ -14,7 +14,7 @@ abstract class GHeroWith2FragmentsData GHeroWith2FragmentsData._(); factory GHeroWith2FragmentsData( - [Function(GHeroWith2FragmentsDataBuilder b) updates]) = + [void Function(GHeroWith2FragmentsDataBuilder b) updates]) = _$GHeroWith2FragmentsData; static void _initializeBuilder(GHeroWith2FragmentsDataBuilder b) => @@ -47,7 +47,7 @@ abstract class GHeroWith2FragmentsData_hero GHeroWith2FragmentsData_hero._(); factory GHeroWith2FragmentsData_hero( - [Function(GHeroWith2FragmentsData_heroBuilder b) updates]) = + [void Function(GHeroWith2FragmentsData_heroBuilder b) updates]) = _$GHeroWith2FragmentsData_hero; static void _initializeBuilder(GHeroWith2FragmentsData_heroBuilder b) => @@ -86,7 +86,7 @@ abstract class GheroNameData implements Built, GheroName { GheroNameData._(); - factory GheroNameData([Function(GheroNameDataBuilder b) updates]) = + factory GheroNameData([void Function(GheroNameDataBuilder b) updates]) = _$GheroNameData; static void _initializeBuilder(GheroNameDataBuilder b) => @@ -122,7 +122,8 @@ abstract class GheroIdData implements Built, GheroId { GheroIdData._(); - factory GheroIdData([Function(GheroIdDataBuilder b) updates]) = _$GheroIdData; + factory GheroIdData([void Function(GheroIdDataBuilder b) updates]) = + _$GheroIdData; static void _initializeBuilder(GheroIdDataBuilder b) => b..G__typename = 'Character'; diff --git a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/multiple_fragments.req.gql.dart b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/multiple_fragments.req.gql.dart index a6c9f01f..6a339960 100644 --- a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/multiple_fragments.req.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/multiple_fragments.req.gql.dart @@ -19,7 +19,8 @@ abstract class GHeroWith2Fragments GHeroWith2Fragments._(); factory GHeroWith2Fragments( - [Function(GHeroWith2FragmentsBuilder b) updates]) = _$GHeroWith2Fragments; + [void Function(GHeroWith2FragmentsBuilder b) updates]) = + _$GHeroWith2Fragments; static void _initializeBuilder(GHeroWith2FragmentsBuilder b) => b ..operation = _i1.Operation( diff --git a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/multiple_fragments.var.gql.dart b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/multiple_fragments.var.gql.dart index 78637683..6541e00d 100644 --- a/codegen/end_to_end_test_tristate/lib/fragments/__generated__/multiple_fragments.var.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/fragments/__generated__/multiple_fragments.var.gql.dart @@ -15,9 +15,12 @@ abstract class GHeroWith2FragmentsVars GHeroWith2FragmentsVars._(); factory GHeroWith2FragmentsVars( - [Function(GHeroWith2FragmentsVarsBuilder b) updates]) = + [void Function(GHeroWith2FragmentsVarsBuilder b) updates]) = _$GHeroWith2FragmentsVars; + factory GHeroWith2FragmentsVars.create({required _i1.Value first}) => + GHeroWith2FragmentsVars((b) => b..first = first); + static void _initializeBuilder(GHeroWith2FragmentsVarsBuilder b) => b..first = const _i1.AbsentValue(); @@ -42,9 +45,11 @@ abstract class GheroNameVars implements Built { GheroNameVars._(); - factory GheroNameVars([Function(GheroNameVarsBuilder b) updates]) = + factory GheroNameVars([void Function(GheroNameVarsBuilder b) updates]) = _$GheroNameVars; + factory GheroNameVars.create() => GheroNameVars(); + Map toJson() => (_i2.serializers.serializeWith( GheroNameVars.serializer, this, @@ -63,7 +68,10 @@ abstract class GheroNameVars abstract class GheroIdVars implements Built { GheroIdVars._(); - factory GheroIdVars([Function(GheroIdVarsBuilder b) updates]) = _$GheroIdVars; + factory GheroIdVars([void Function(GheroIdVarsBuilder b) updates]) = + _$GheroIdVars; + + factory GheroIdVars.create() => GheroIdVars(); Map toJson() => (_i2.serializers.serializeWith( GheroIdVars.serializer, diff --git a/codegen/end_to_end_test_tristate/lib/graphql/__generated__/schema.schema.gql.dart b/codegen/end_to_end_test_tristate/lib/graphql/__generated__/schema.schema.gql.dart index dba14ab1..a4d268dc 100644 --- a/codegen/end_to_end_test_tristate/lib/graphql/__generated__/schema.schema.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/graphql/__generated__/schema.schema.gql.dart @@ -52,7 +52,7 @@ abstract class GReviewInput implements Built { GReviewInput._(); - factory GReviewInput([Function(GReviewInputBuilder b) updates]) = + factory GReviewInput([void Function(GReviewInputBuilder b) updates]) = _$GReviewInput; static void _initializeBuilder(GReviewInputBuilder b) => b @@ -158,7 +158,8 @@ abstract class GCustomFieldInput implements Built { GCustomFieldInput._(); - factory GCustomFieldInput([Function(GCustomFieldInputBuilder b) updates]) = + factory GCustomFieldInput( + [void Function(GCustomFieldInputBuilder b) updates]) = _$GCustomFieldInput; static void _initializeBuilder(GCustomFieldInputBuilder b) => @@ -238,7 +239,8 @@ final class GCustomFieldInputSerializer abstract class GColorInput implements Built { GColorInput._(); - factory GColorInput([Function(GColorInputBuilder b) updates]) = _$GColorInput; + factory GColorInput([void Function(GColorInputBuilder b) updates]) = + _$GColorInput; int get red; int get green; @@ -318,7 +320,7 @@ abstract class GPostLikesInput implements Built { GPostLikesInput._(); - factory GPostLikesInput([Function(GPostLikesInputBuilder b) updates]) = + factory GPostLikesInput([void Function(GPostLikesInputBuilder b) updates]) = _$GPostLikesInput; String get id; @@ -384,7 +386,8 @@ abstract class GPostFavoritesInput GPostFavoritesInput._(); factory GPostFavoritesInput( - [Function(GPostFavoritesInputBuilder b) updates]) = _$GPostFavoritesInput; + [void Function(GPostFavoritesInputBuilder b) updates]) = + _$GPostFavoritesInput; String get id; Map toJson() => (_i3.serializers.serializeWith( diff --git a/codegen/end_to_end_test_tristate/lib/interfaces/__generated__/hero_for_episode.data.gql.dart b/codegen/end_to_end_test_tristate/lib/interfaces/__generated__/hero_for_episode.data.gql.dart index 655d9736..abe7e1bb 100644 --- a/codegen/end_to_end_test_tristate/lib/interfaces/__generated__/hero_for_episode.data.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/interfaces/__generated__/hero_for_episode.data.gql.dart @@ -17,7 +17,8 @@ abstract class GHeroForEpisodeData GHeroForEpisodeData._(); factory GHeroForEpisodeData( - [Function(GHeroForEpisodeDataBuilder b) updates]) = _$GHeroForEpisodeData; + [void Function(GHeroForEpisodeDataBuilder b) updates]) = + _$GHeroForEpisodeData; static void _initializeBuilder(GHeroForEpisodeDataBuilder b) => b..G__typename = 'Query'; @@ -100,7 +101,7 @@ abstract class GHeroForEpisodeData_hero__base GHeroForEpisodeData_hero__base._(); factory GHeroForEpisodeData_hero__base( - [Function(GHeroForEpisodeData_hero__baseBuilder b) updates]) = + [void Function(GHeroForEpisodeData_hero__baseBuilder b) updates]) = _$GHeroForEpisodeData_hero__base; static void _initializeBuilder(GHeroForEpisodeData_hero__baseBuilder b) => @@ -137,8 +138,8 @@ abstract class GHeroForEpisodeData_hero__base_friends GHeroForEpisodeData_hero__base_friends._(); factory GHeroForEpisodeData_hero__base_friends( - [Function(GHeroForEpisodeData_hero__base_friendsBuilder b) updates]) = - _$GHeroForEpisodeData_hero__base_friends; + [void Function(GHeroForEpisodeData_hero__base_friendsBuilder b) + updates]) = _$GHeroForEpisodeData_hero__base_friends; static void _initializeBuilder( GHeroForEpisodeData_hero__base_friendsBuilder b) => @@ -175,7 +176,7 @@ abstract class GHeroForEpisodeData_hero__asDroid GHeroForEpisodeData_hero__asDroid._(); factory GHeroForEpisodeData_hero__asDroid( - [Function(GHeroForEpisodeData_hero__asDroidBuilder b) updates]) = + [void Function(GHeroForEpisodeData_hero__asDroidBuilder b) updates]) = _$GHeroForEpisodeData_hero__asDroid; static void _initializeBuilder(GHeroForEpisodeData_hero__asDroidBuilder b) => @@ -215,7 +216,7 @@ abstract class GHeroForEpisodeData_hero__asDroid_friends GHeroForEpisodeData_hero__asDroid_friends._(); factory GHeroForEpisodeData_hero__asDroid_friends( - [Function(GHeroForEpisodeData_hero__asDroid_friendsBuilder b) + [void Function(GHeroForEpisodeData_hero__asDroid_friendsBuilder b) updates]) = _$GHeroForEpisodeData_hero__asDroid_friends; static void _initializeBuilder( @@ -262,7 +263,8 @@ abstract class GDroidFragmentData GDroidFragment { GDroidFragmentData._(); - factory GDroidFragmentData([Function(GDroidFragmentDataBuilder b) updates]) = + factory GDroidFragmentData( + [void Function(GDroidFragmentDataBuilder b) updates]) = _$GDroidFragmentData; static void _initializeBuilder(GDroidFragmentDataBuilder b) => diff --git a/codegen/end_to_end_test_tristate/lib/interfaces/__generated__/hero_for_episode.req.gql.dart b/codegen/end_to_end_test_tristate/lib/interfaces/__generated__/hero_for_episode.req.gql.dart index 87df0316..6c6a971d 100644 --- a/codegen/end_to_end_test_tristate/lib/interfaces/__generated__/hero_for_episode.req.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/interfaces/__generated__/hero_for_episode.req.gql.dart @@ -18,7 +18,7 @@ abstract class GHeroForEpisode implements Built { GHeroForEpisode._(); - factory GHeroForEpisode([Function(GHeroForEpisodeBuilder b) updates]) = + factory GHeroForEpisode([void Function(GHeroForEpisodeBuilder b) updates]) = _$GHeroForEpisode; static void _initializeBuilder(GHeroForEpisodeBuilder b) => b diff --git a/codegen/end_to_end_test_tristate/lib/interfaces/__generated__/hero_for_episode.var.gql.dart b/codegen/end_to_end_test_tristate/lib/interfaces/__generated__/hero_for_episode.var.gql.dart index 4f793ed6..7c3fa668 100644 --- a/codegen/end_to_end_test_tristate/lib/interfaces/__generated__/hero_for_episode.var.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/interfaces/__generated__/hero_for_episode.var.gql.dart @@ -16,7 +16,11 @@ abstract class GHeroForEpisodeVars GHeroForEpisodeVars._(); factory GHeroForEpisodeVars( - [Function(GHeroForEpisodeVarsBuilder b) updates]) = _$GHeroForEpisodeVars; + [void Function(GHeroForEpisodeVarsBuilder b) updates]) = + _$GHeroForEpisodeVars; + + factory GHeroForEpisodeVars.create({required _i1.GEpisode ep}) => + GHeroForEpisodeVars((b) => b..ep = ep); _i1.GEpisode get ep; Map toJson() => (_i2.serializers.serializeWith( @@ -39,9 +43,12 @@ abstract class GDroidFragmentVars implements Built { GDroidFragmentVars._(); - factory GDroidFragmentVars([Function(GDroidFragmentVarsBuilder b) updates]) = + factory GDroidFragmentVars( + [void Function(GDroidFragmentVarsBuilder b) updates]) = _$GDroidFragmentVars; + factory GDroidFragmentVars.create() => GDroidFragmentVars(); + Map toJson() => (_i2.serializers.serializeWith( GDroidFragmentVars.serializer, this, diff --git a/codegen/end_to_end_test_tristate/lib/no_vars/__generated__/hero_no_vars.data.gql.dart b/codegen/end_to_end_test_tristate/lib/no_vars/__generated__/hero_no_vars.data.gql.dart index 797e9c1c..6a89e040 100644 --- a/codegen/end_to_end_test_tristate/lib/no_vars/__generated__/hero_no_vars.data.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/no_vars/__generated__/hero_no_vars.data.gql.dart @@ -13,7 +13,7 @@ abstract class GHeroNoVarsData implements Built { GHeroNoVarsData._(); - factory GHeroNoVarsData([Function(GHeroNoVarsDataBuilder b) updates]) = + factory GHeroNoVarsData([void Function(GHeroNoVarsDataBuilder b) updates]) = _$GHeroNoVarsData; static void _initializeBuilder(GHeroNoVarsDataBuilder b) => @@ -42,7 +42,7 @@ abstract class GHeroNoVarsData_hero GHeroNoVarsData_hero._(); factory GHeroNoVarsData_hero( - [Function(GHeroNoVarsData_heroBuilder b) updates]) = + [void Function(GHeroNoVarsData_heroBuilder b) updates]) = _$GHeroNoVarsData_hero; static void _initializeBuilder(GHeroNoVarsData_heroBuilder b) => diff --git a/codegen/end_to_end_test_tristate/lib/no_vars/__generated__/hero_no_vars.req.gql.dart b/codegen/end_to_end_test_tristate/lib/no_vars/__generated__/hero_no_vars.req.gql.dart index b30afa94..a713cd30 100644 --- a/codegen/end_to_end_test_tristate/lib/no_vars/__generated__/hero_no_vars.req.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/no_vars/__generated__/hero_no_vars.req.gql.dart @@ -17,7 +17,8 @@ part 'hero_no_vars.req.gql.g.dart'; abstract class GHeroNoVars implements Built { GHeroNoVars._(); - factory GHeroNoVars([Function(GHeroNoVarsBuilder b) updates]) = _$GHeroNoVars; + factory GHeroNoVars([void Function(GHeroNoVarsBuilder b) updates]) = + _$GHeroNoVars; static void _initializeBuilder(GHeroNoVarsBuilder b) => b ..operation = _i1.Operation( diff --git a/codegen/end_to_end_test_tristate/lib/no_vars/__generated__/hero_no_vars.var.gql.dart b/codegen/end_to_end_test_tristate/lib/no_vars/__generated__/hero_no_vars.var.gql.dart index 57b58b74..4e3f2df5 100644 --- a/codegen/end_to_end_test_tristate/lib/no_vars/__generated__/hero_no_vars.var.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/no_vars/__generated__/hero_no_vars.var.gql.dart @@ -13,9 +13,11 @@ abstract class GHeroNoVarsVars implements Built { GHeroNoVarsVars._(); - factory GHeroNoVarsVars([Function(GHeroNoVarsVarsBuilder b) updates]) = + factory GHeroNoVarsVars([void Function(GHeroNoVarsVarsBuilder b) updates]) = _$GHeroNoVarsVars; + factory GHeroNoVarsVars.create() => GHeroNoVarsVars(); + Map toJson() => (_i1.serializers.serializeWith( GHeroNoVarsVars.serializer, this, diff --git a/codegen/end_to_end_test_tristate/lib/scalars/__generated__/review_with_date.data.gql.dart b/codegen/end_to_end_test_tristate/lib/scalars/__generated__/review_with_date.data.gql.dart index 67eb3098..b11081be 100644 --- a/codegen/end_to_end_test_tristate/lib/scalars/__generated__/review_with_date.data.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/scalars/__generated__/review_with_date.data.gql.dart @@ -18,7 +18,8 @@ abstract class GReviewWithDateData GReviewWithDateData._(); factory GReviewWithDateData( - [Function(GReviewWithDateDataBuilder b) updates]) = _$GReviewWithDateData; + [void Function(GReviewWithDateDataBuilder b) updates]) = + _$GReviewWithDateData; static void _initializeBuilder(GReviewWithDateDataBuilder b) => b..G__typename = 'Mutation'; @@ -48,7 +49,7 @@ abstract class GReviewWithDateData_createReview GReviewWithDateData_createReview._(); factory GReviewWithDateData_createReview( - [Function(GReviewWithDateData_createReviewBuilder b) updates]) = + [void Function(GReviewWithDateData_createReviewBuilder b) updates]) = _$GReviewWithDateData_createReview; static void _initializeBuilder(GReviewWithDateData_createReviewBuilder b) => diff --git a/codegen/end_to_end_test_tristate/lib/scalars/__generated__/review_with_date.req.gql.dart b/codegen/end_to_end_test_tristate/lib/scalars/__generated__/review_with_date.req.gql.dart index ddf707dd..0765741c 100644 --- a/codegen/end_to_end_test_tristate/lib/scalars/__generated__/review_with_date.req.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/scalars/__generated__/review_with_date.req.gql.dart @@ -18,7 +18,7 @@ abstract class GReviewWithDate implements Built { GReviewWithDate._(); - factory GReviewWithDate([Function(GReviewWithDateBuilder b) updates]) = + factory GReviewWithDate([void Function(GReviewWithDateBuilder b) updates]) = _$GReviewWithDate; static void _initializeBuilder(GReviewWithDateBuilder b) => b diff --git a/codegen/end_to_end_test_tristate/lib/scalars/__generated__/review_with_date.var.gql.dart b/codegen/end_to_end_test_tristate/lib/scalars/__generated__/review_with_date.var.gql.dart index 0445a4b1..6420eef9 100644 --- a/codegen/end_to_end_test_tristate/lib/scalars/__generated__/review_with_date.var.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/scalars/__generated__/review_with_date.var.gql.dart @@ -17,7 +17,18 @@ abstract class GReviewWithDateVars GReviewWithDateVars._(); factory GReviewWithDateVars( - [Function(GReviewWithDateVarsBuilder b) updates]) = _$GReviewWithDateVars; + [void Function(GReviewWithDateVarsBuilder b) updates]) = + _$GReviewWithDateVars; + + factory GReviewWithDateVars.create({ + required _i1.Value<_i2.GEpisode> episode, + required _i2.GReviewInput review, + required _i1.Value createdAt, + }) => + GReviewWithDateVars((b) => b + ..episode = episode + ..review = review.toBuilder() + ..createdAt = createdAt); static void _initializeBuilder(GReviewWithDateVarsBuilder b) => b ..episode = const _i1.AbsentValue() diff --git a/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_custom_field.data.gql.dart b/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_custom_field.data.gql.dart index dd4675a7..695daa4a 100644 --- a/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_custom_field.data.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_custom_field.data.gql.dart @@ -15,7 +15,7 @@ abstract class GCreateCustomFieldData GCreateCustomFieldData._(); factory GCreateCustomFieldData( - [Function(GCreateCustomFieldDataBuilder b) updates]) = + [void Function(GCreateCustomFieldDataBuilder b) updates]) = _$GCreateCustomFieldData; static void _initializeBuilder(GCreateCustomFieldDataBuilder b) => diff --git a/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_custom_field.req.gql.dart b/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_custom_field.req.gql.dart index a4446b6a..4a5d8040 100644 --- a/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_custom_field.req.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_custom_field.req.gql.dart @@ -18,7 +18,8 @@ abstract class GCreateCustomField implements Built { GCreateCustomField._(); - factory GCreateCustomField([Function(GCreateCustomFieldBuilder b) updates]) = + factory GCreateCustomField( + [void Function(GCreateCustomFieldBuilder b) updates]) = _$GCreateCustomField; static void _initializeBuilder(GCreateCustomFieldBuilder b) => b diff --git a/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_custom_field.var.gql.dart b/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_custom_field.var.gql.dart index 31341818..e0f59213 100644 --- a/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_custom_field.var.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_custom_field.var.gql.dart @@ -16,9 +16,13 @@ abstract class GCreateCustomFieldVars GCreateCustomFieldVars._(); factory GCreateCustomFieldVars( - [Function(GCreateCustomFieldVarsBuilder b) updates]) = + [void Function(GCreateCustomFieldVarsBuilder b) updates]) = _$GCreateCustomFieldVars; + factory GCreateCustomFieldVars.create( + {required _i1.GCustomFieldInput input}) => + GCreateCustomFieldVars((b) => b..input = input.toBuilder()); + _i1.GCustomFieldInput get input; Map toJson() => (_i2.serializers.serializeWith( GCreateCustomFieldVars.serializer, diff --git a/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_review.data.gql.dart b/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_review.data.gql.dart index 5cfd60b1..bcfb2e8c 100644 --- a/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_review.data.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_review.data.gql.dart @@ -15,7 +15,8 @@ abstract class GCreateReviewData implements Built { GCreateReviewData._(); - factory GCreateReviewData([Function(GCreateReviewDataBuilder b) updates]) = + factory GCreateReviewData( + [void Function(GCreateReviewDataBuilder b) updates]) = _$GCreateReviewData; static void _initializeBuilder(GCreateReviewDataBuilder b) => @@ -46,7 +47,7 @@ abstract class GCreateReviewData_createReview GCreateReviewData_createReview._(); factory GCreateReviewData_createReview( - [Function(GCreateReviewData_createReviewBuilder b) updates]) = + [void Function(GCreateReviewData_createReviewBuilder b) updates]) = _$GCreateReviewData_createReview; static void _initializeBuilder(GCreateReviewData_createReviewBuilder b) => diff --git a/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_review.req.gql.dart b/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_review.req.gql.dart index 3bd20468..086b7cc0 100644 --- a/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_review.req.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_review.req.gql.dart @@ -18,7 +18,7 @@ abstract class GCreateReview implements Built { GCreateReview._(); - factory GCreateReview([Function(GCreateReviewBuilder b) updates]) = + factory GCreateReview([void Function(GCreateReviewBuilder b) updates]) = _$GCreateReview; static void _initializeBuilder(GCreateReviewBuilder b) => b diff --git a/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_review.var.gql.dart b/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_review.var.gql.dart index 26f14312..b4ae7205 100644 --- a/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_review.var.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/variables/__generated__/create_review.var.gql.dart @@ -16,9 +16,18 @@ abstract class GCreateReviewVars implements Built { GCreateReviewVars._(); - factory GCreateReviewVars([Function(GCreateReviewVarsBuilder b) updates]) = + factory GCreateReviewVars( + [void Function(GCreateReviewVarsBuilder b) updates]) = _$GCreateReviewVars; + factory GCreateReviewVars.create({ + required _i1.Value<_i2.GEpisode> episode, + required _i2.GReviewInput review, + }) => + GCreateReviewVars((b) => b + ..episode = episode + ..review = review.toBuilder()); + static void _initializeBuilder(GCreateReviewVarsBuilder b) => b..episode = const _i1.AbsentValue(); diff --git a/codegen/end_to_end_test_tristate/lib/variables/__generated__/human_with_args.data.gql.dart b/codegen/end_to_end_test_tristate/lib/variables/__generated__/human_with_args.data.gql.dart index 361241c4..8b5eb8c8 100644 --- a/codegen/end_to_end_test_tristate/lib/variables/__generated__/human_with_args.data.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/variables/__generated__/human_with_args.data.gql.dart @@ -13,7 +13,8 @@ abstract class GHumanWithArgsData implements Built { GHumanWithArgsData._(); - factory GHumanWithArgsData([Function(GHumanWithArgsDataBuilder b) updates]) = + factory GHumanWithArgsData( + [void Function(GHumanWithArgsDataBuilder b) updates]) = _$GHumanWithArgsData; static void _initializeBuilder(GHumanWithArgsDataBuilder b) => @@ -43,7 +44,7 @@ abstract class GHumanWithArgsData_human GHumanWithArgsData_human._(); factory GHumanWithArgsData_human( - [Function(GHumanWithArgsData_humanBuilder b) updates]) = + [void Function(GHumanWithArgsData_humanBuilder b) updates]) = _$GHumanWithArgsData_human; static void _initializeBuilder(GHumanWithArgsData_humanBuilder b) => diff --git a/codegen/end_to_end_test_tristate/lib/variables/__generated__/human_with_args.req.gql.dart b/codegen/end_to_end_test_tristate/lib/variables/__generated__/human_with_args.req.gql.dart index 07044a79..b17bbac4 100644 --- a/codegen/end_to_end_test_tristate/lib/variables/__generated__/human_with_args.req.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/variables/__generated__/human_with_args.req.gql.dart @@ -18,7 +18,7 @@ abstract class GHumanWithArgs implements Built { GHumanWithArgs._(); - factory GHumanWithArgs([Function(GHumanWithArgsBuilder b) updates]) = + factory GHumanWithArgs([void Function(GHumanWithArgsBuilder b) updates]) = _$GHumanWithArgs; static void _initializeBuilder(GHumanWithArgsBuilder b) => b diff --git a/codegen/end_to_end_test_tristate/lib/variables/__generated__/human_with_args.var.gql.dart b/codegen/end_to_end_test_tristate/lib/variables/__generated__/human_with_args.var.gql.dart index bc1ca5a3..d220ae30 100644 --- a/codegen/end_to_end_test_tristate/lib/variables/__generated__/human_with_args.var.gql.dart +++ b/codegen/end_to_end_test_tristate/lib/variables/__generated__/human_with_args.var.gql.dart @@ -13,9 +13,13 @@ abstract class GHumanWithArgsVars implements Built { GHumanWithArgsVars._(); - factory GHumanWithArgsVars([Function(GHumanWithArgsVarsBuilder b) updates]) = + factory GHumanWithArgsVars( + [void Function(GHumanWithArgsVarsBuilder b) updates]) = _$GHumanWithArgsVars; + factory GHumanWithArgsVars.create({required String id}) => + GHumanWithArgsVars((b) => b..id = id); + String get id; Map toJson() => (_i1.serializers.serializeWith( GHumanWithArgsVars.serializer, diff --git a/codegen/gql_build/README.md b/codegen/gql_build/README.md index d402d08e..f8868a9a 100644 --- a/codegen/gql_build/README.md +++ b/codegen/gql_build/README.md @@ -18,7 +18,7 @@ [github-forks-link]: https://github.com/gql-dart/gql/network/members [discord-badge]: https://img.shields.io/discord/559455668810153989.svg?style=for-the-badge&logo=discord&logoColor=ffffff -[discord-link]: https://discord.gg/NryjpVa +[discord-link]: https://discord.gg/YBFCTXNbwY A package for Dart code generation from GraphQL source. diff --git a/codegen/gql_build/lib/gql_build.dart b/codegen/gql_build/lib/gql_build.dart index cb4bf28b..9cc5da91 100644 --- a/codegen/gql_build/lib/gql_build.dart +++ b/codegen/gql_build/lib/gql_build.dart @@ -47,7 +47,8 @@ Builder varBuilder( options.config["schema"] as String, ), typeOverrideMap(options.config["type_overrides"]), - triStateOptionalsConfig(options.config)); + triStateOptionalsConfig(options.config), + varsCreateFactoriesConfig(options.config)); /// Builds GraphQL schema types Builder schemaBuilder( diff --git a/codegen/gql_build/lib/src/utils/config.dart b/codegen/gql_build/lib/src/utils/config.dart index d5b7b7b0..b7911ff9 100644 --- a/codegen/gql_build/lib/src/utils/config.dart +++ b/codegen/gql_build/lib/src/utils/config.dart @@ -84,3 +84,6 @@ TriStateValueConfig triStateOptionalsConfig(Map config) { return TriStateValueConfig.never; } + +bool varsCreateFactoriesConfig(Map config) => + config["vars_create_factories"] as bool? ?? false; diff --git a/codegen/gql_build/lib/src/var_builder.dart b/codegen/gql_build/lib/src/var_builder.dart index bbd1317c..74a29c1e 100644 --- a/codegen/gql_build/lib/src/var_builder.dart +++ b/codegen/gql_build/lib/src/var_builder.dart @@ -15,11 +15,13 @@ class VarBuilder implements Builder { final AssetId schemaId; final Map typeOverrides; final TriStateValueConfig triStateValueConfig; + final bool varsCreateFactoriesConfig; VarBuilder( this.schemaId, this.typeOverrides, this.triStateValueConfig, + this.varsCreateFactoriesConfig, ); @override @@ -51,6 +53,7 @@ class VarBuilder implements Builder { typeOverrides, allocator, triStateValueConfig, + varsCreateFactoriesConfig, ); return writeDocument( diff --git a/codegen/gql_code_builder/README.md b/codegen/gql_code_builder/README.md index 64ec14e5..caa2796d 100644 --- a/codegen/gql_code_builder/README.md +++ b/codegen/gql_code_builder/README.md @@ -18,7 +18,7 @@ [github-forks-link]: https://github.com/gql-dart/gql/network/members [discord-badge]: https://img.shields.io/discord/559455668810153989.svg?style=for-the-badge&logo=discord&logoColor=ffffff -[discord-link]: https://discord.gg/NryjpVa +[discord-link]: https://discord.gg/YBFCTXNbwY Dart code builders taking `*.graphql` documents and SDL to build useful classes. diff --git a/codegen/gql_code_builder/lib/src/built_class.dart b/codegen/gql_code_builder/lib/src/built_class.dart index bb7e8020..2a2bdb2a 100644 --- a/codegen/gql_code_builder/lib/src/built_class.dart +++ b/codegen/gql_code_builder/lib/src/built_class.dart @@ -7,6 +7,7 @@ import "./utils/to_camel_case.dart"; /// Generates a class that implements [Built], along with its serializers Class builtClass({ required String name, + Iterable? constructors, Iterable? getters, Map? initializers, Map superclassSelections = const {}, @@ -51,14 +52,17 @@ Class builtClass({ (b) => b ..factory = true ..optionalParameters.add( - Parameter( - (b) => b - ..name = "updates" - ..type = refer("Function(${className}Builder b)"), - ), + Parameter((b) => b + ..name = "updates" + ..type = FunctionType((b) => b + ..requiredParameters.add( + refer("${className}Builder b"), + ) + ..returnType = refer("void"))), ) ..redirect = refer("_\$${className}"), ), + if (constructors != null && constructors.isNotEmpty) ...constructors ], ) ..methods = ListBuilder([ diff --git a/codegen/gql_code_builder/lib/src/common.dart b/codegen/gql_code_builder/lib/src/common.dart index 8f942131..4197daf4 100644 --- a/codegen/gql_code_builder/lib/src/common.dart +++ b/codegen/gql_code_builder/lib/src/common.dart @@ -91,6 +91,7 @@ const defaultTypeMap = { Reference _typeRef(TypeNode type, Map typeMap) { if (type is NamedTypeNode) { final ref = typeMap[type.name.value] ?? Reference(type.name.value); + assert(ref.symbol != null, "Symbol for ${ref} must not be null"); return TypeReference( (b) => b ..url = ref.url diff --git a/codegen/gql_code_builder/lib/src/inline_fragment_classes.dart b/codegen/gql_code_builder/lib/src/inline_fragment_classes.dart index 7b168ca6..37fe603c 100644 --- a/codegen/gql_code_builder/lib/src/inline_fragment_classes.dart +++ b/codegen/gql_code_builder/lib/src/inline_fragment_classes.dart @@ -3,9 +3,9 @@ import "package:gql/ast.dart"; import "package:gql_code_builder/src/config/when_extension_config.dart"; import "package:gql_code_builder/src/when_extension.dart"; +import "../source.dart"; import "./common.dart"; import "./operation/data.dart"; -import "../source.dart"; /// Builds the following classes for inline fragments: /// 1. An abstract root class that will be implemented by each instantiable diff --git a/codegen/gql_code_builder/lib/src/required_vars_constructor.dart b/codegen/gql_code_builder/lib/src/required_vars_constructor.dart new file mode 100644 index 00000000..56e91478 --- /dev/null +++ b/codegen/gql_code_builder/lib/src/required_vars_constructor.dart @@ -0,0 +1,60 @@ +import "package:built_collection/built_collection.dart"; +import "package:code_builder/code_builder.dart"; +import "package:gql/ast.dart"; +import "package:gql_code_builder/source.dart"; +import "package:gql_code_builder/src/common.dart"; + +Constructor builtCreateConstructor({ + required String name, + required Iterable getters, + required SourceNode schemaSource, +}) { + final className = builtClassName(name); + + /// Getters that are excluded from the create constructor + /// because they are system getters that are not part of the data + final excludedGettersFromCreateConstructor = ["G__typename"]; + + // Filter out excluded getters + final filteredGetters = getters.where( + (g) => !excludedGettersFromCreateConstructor.contains(g.name), + ); + + // Create parameters for the factory constructor + final factoryParameters = filteredGetters.map( + (g) => Parameter( + (b) => b + ..name = g.name! + ..named = true + ..required = true + ..type = g.returns, + ), + ); + + final assignments = filteredGetters.map((g) { + final typeDefinitionNode = getTypeDefinitionNode( + schemaSource.document, g.returns!.symbol!.replaceFirst("G", "")); + final isBuiltType = typeDefinitionNode is InputObjectTypeDefinitionNode || + typeDefinitionNode is ScalarTypeDefinitionNode; + + // Check if the type is nullable + final isNullable = (g.returns! as TypeReference).isNullable ?? false; + final assignment = isBuiltType + ? "${g.name} = ${g.name}${isNullable ? '?' : ''}.toBuilder()" + : "${g.name} = ${g.name}"; + + return assignment; + }); + + // Construct the factory method + return Constructor( + (b) => b + ..factory = true + ..name = "create" + ..lambda = true + ..optionalParameters = ListBuilder(factoryParameters) + ..body = assignments.isEmpty + ? refer(className).call([]).code + : Code("${className}((b) => b..${assignments.join('..')})"), + ); +} diff --git a/codegen/gql_code_builder/lib/src/schema.dart b/codegen/gql_code_builder/lib/src/schema.dart index f0b2bcdc..c28bee89 100644 --- a/codegen/gql_code_builder/lib/src/schema.dart +++ b/codegen/gql_code_builder/lib/src/schema.dart @@ -2,11 +2,11 @@ import "package:code_builder/code_builder.dart"; import "package:gql/ast.dart"; import "package:gql_code_builder/src/tristate_optionals.dart"; +import "../schema.dart"; +import "../source.dart"; import "./schema/enum.dart"; import "./schema/input.dart"; import "./schema/scalar.dart"; -import "../schema.dart"; -import "../source.dart"; /// Build input types, enums and scalars from schema Spec? buildSchema( diff --git a/codegen/gql_code_builder/lib/var.dart b/codegen/gql_code_builder/lib/var.dart index 5c3e32c7..5d7db904 100644 --- a/codegen/gql_code_builder/lib/var.dart +++ b/codegen/gql_code_builder/lib/var.dart @@ -7,6 +7,7 @@ import "./source.dart"; import "./src/built_class.dart"; import "./src/common.dart"; import "./src/frag_vars.dart"; +import "./src/required_vars_constructor.dart"; export "./src/config/tristate_optionals_config.dart"; @@ -16,34 +17,53 @@ Library buildVarLibrary( String partUrl, Map typeOverrides, Allocator allocator, - TriStateValueConfig useTriStateValueForNullableTypes) { + TriStateValueConfig useTriStateValueForNullableTypes, + bool generateVarsCreateFactories) { final hasCustomSerializer = useTriStateValueForNullableTypes == TriStateValueConfig.onAllNullableFields; final operationVarClasses = docSource.document.definitions .whereType() .map((op) => builtClass( - name: "${op.name!.value}Vars", - getters: op.variableDefinitions.map( - (node) => buildOptionalGetter( - nameNode: node.variable.name, - typeNode: node.type, + name: "${op.name!.value}Vars", + getters: op.variableDefinitions.map( + (node) => buildOptionalGetter( + nameNode: node.variable.name, + typeNode: node.type, + schemaSource: schemaSource, + typeOverrides: typeOverrides, + useTriStateValueForNullableTypes: + useTriStateValueForNullableTypes, + ), + ), + hasCustomSerializer: hasCustomSerializer, + constructors: [ + if (generateVarsCreateFactories) + builtCreateConstructor( + name: "${op.name!.value}Vars", + getters: op.variableDefinitions.map( + (node) => buildOptionalGetter( + nameNode: node.variable.name, + typeNode: node.type, + schemaSource: schemaSource, + typeOverrides: typeOverrides, + useTriStateValueForNullableTypes: + useTriStateValueForNullableTypes, + ), + ), schemaSource: schemaSource, - typeOverrides: typeOverrides, - useTriStateValueForNullableTypes: - useTriStateValueForNullableTypes, ), - ), - hasCustomSerializer: hasCustomSerializer, - initializers: switch (useTriStateValueForNullableTypes) { - TriStateValueConfig.onAllNullableFields => - _varClassValueInitializers(op), - TriStateValueConfig.never => {}, - }, - methods: [ - if (hasCustomSerializer) - nullAwareJsonSerializerField(op, "G${op.name!.value}Vars"), - ])) + ], + initializers: switch (useTriStateValueForNullableTypes) { + TriStateValueConfig.onAllNullableFields => + _varClassValueInitializers(op), + TriStateValueConfig.never => {}, + }, + methods: [ + if (hasCustomSerializer) + nullAwareJsonSerializerField(op, "G${op.name!.value}Vars"), + ], + )) .toList(); Map _fragmentMap(SourceNode source) => { @@ -76,6 +96,21 @@ Library buildVarLibrary( if (hasCustomSerializer) nullAwareJsonSerializerField(frag, "G${frag.name.value}Vars"), ], + constructors: [ + if (generateVarsCreateFactories) + builtCreateConstructor( + name: "${frag.name.value}Vars", + getters: varTypes.entries.map( + (entry) => buildOptionalGetter( + nameNode: entry.key, + typeNode: entry.value, + schemaSource: schemaSource, + typeOverrides: typeOverrides, + ), + ), + schemaSource: schemaSource, + ), + ], ); }).toList(); diff --git a/examples/gql_example_build/lib/__generated__/schema.schema.gql.dart b/examples/gql_example_build/lib/__generated__/schema.schema.gql.dart index bdf87d25..754f98da 100644 --- a/examples/gql_example_build/lib/__generated__/schema.schema.gql.dart +++ b/examples/gql_example_build/lib/__generated__/schema.schema.gql.dart @@ -41,7 +41,7 @@ class GEnum extends EnumClass { abstract class GInput implements Built { GInput._(); - factory GInput([Function(GInputBuilder b) updates]) = _$GInput; + factory GInput([void Function(GInputBuilder b) updates]) = _$GInput; String? get id; @BuiltValueField(wireName: 'bool') diff --git a/examples/gql_example_build/lib/fragments/__generated__/shape.data.gql.dart b/examples/gql_example_build/lib/fragments/__generated__/shape.data.gql.dart index 5d9cac59..554e3409 100644 --- a/examples/gql_example_build/lib/fragments/__generated__/shape.data.gql.dart +++ b/examples/gql_example_build/lib/fragments/__generated__/shape.data.gql.dart @@ -13,7 +13,8 @@ part 'shape.data.gql.g.dart'; abstract class GShapeData implements Built { GShapeData._(); - factory GShapeData([Function(GShapeDataBuilder b) updates]) = _$GShapeData; + factory GShapeData([void Function(GShapeDataBuilder b) updates]) = + _$GShapeData; static void _initializeBuilder(GShapeDataBuilder b) => b..G__typename = 'Query'; @@ -104,7 +105,7 @@ abstract class GShapeData_shape__base GShapeData_shape__base._(); factory GShapeData_shape__base( - [Function(GShapeData_shape__baseBuilder b) updates]) = + [void Function(GShapeData_shape__baseBuilder b) updates]) = _$GShapeData_shape__base; static void _initializeBuilder(GShapeData_shape__baseBuilder b) => @@ -138,7 +139,7 @@ abstract class GShapeData_shape__asSquare GShapeData_shape__asSquare._(); factory GShapeData_shape__asSquare( - [Function(GShapeData_shape__asSquareBuilder b) updates]) = + [void Function(GShapeData_shape__asSquareBuilder b) updates]) = _$GShapeData_shape__asSquare; static void _initializeBuilder(GShapeData_shape__asSquareBuilder b) => @@ -174,7 +175,7 @@ abstract class GShapeData_shape__asRectangle GShapeData_shape__asRectangle._(); factory GShapeData_shape__asRectangle( - [Function(GShapeData_shape__asRectangleBuilder b) updates]) = + [void Function(GShapeData_shape__asRectangleBuilder b) updates]) = _$GShapeData_shape__asRectangle; static void _initializeBuilder(GShapeData_shape__asRectangleBuilder b) => diff --git a/examples/gql_example_build/lib/fragments/__generated__/shape.req.gql.dart b/examples/gql_example_build/lib/fragments/__generated__/shape.req.gql.dart index 19882388..5da28919 100644 --- a/examples/gql_example_build/lib/fragments/__generated__/shape.req.gql.dart +++ b/examples/gql_example_build/lib/fragments/__generated__/shape.req.gql.dart @@ -16,7 +16,7 @@ part 'shape.req.gql.g.dart'; abstract class GShape implements Built { GShape._(); - factory GShape([Function(GShapeBuilder b) updates]) = _$GShape; + factory GShape([void Function(GShapeBuilder b) updates]) = _$GShape; static void _initializeBuilder(GShapeBuilder b) => b ..operation = _i1.Operation( diff --git a/examples/gql_example_build/lib/fragments/__generated__/shape.var.gql.dart b/examples/gql_example_build/lib/fragments/__generated__/shape.var.gql.dart index a5657021..46c97723 100644 --- a/examples/gql_example_build/lib/fragments/__generated__/shape.var.gql.dart +++ b/examples/gql_example_build/lib/fragments/__generated__/shape.var.gql.dart @@ -11,7 +11,8 @@ part 'shape.var.gql.g.dart'; abstract class GShapeVars implements Built { GShapeVars._(); - factory GShapeVars([Function(GShapeVarsBuilder b) updates]) = _$GShapeVars; + factory GShapeVars([void Function(GShapeVarsBuilder b) updates]) = + _$GShapeVars; static Serializer get serializer => _$gShapeVarsSerializer; diff --git a/examples/gql_example_build/lib/kitchen_sink/__generated__/query.data.gql.dart b/examples/gql_example_build/lib/kitchen_sink/__generated__/query.data.gql.dart index e2ccbe94..5049404d 100644 --- a/examples/gql_example_build/lib/kitchen_sink/__generated__/query.data.gql.dart +++ b/examples/gql_example_build/lib/kitchen_sink/__generated__/query.data.gql.dart @@ -14,7 +14,8 @@ abstract class GQueryOperationData GQueryOperationData._(); factory GQueryOperationData( - [Function(GQueryOperationDataBuilder b) updates]) = _$GQueryOperationData; + [void Function(GQueryOperationDataBuilder b) updates]) = + _$GQueryOperationData; static void _initializeBuilder(GQueryOperationDataBuilder b) => b..G__typename = 'Query'; @@ -43,7 +44,7 @@ abstract class GQueryOperationData_field GQueryOperationData_field._(); factory GQueryOperationData_field( - [Function(GQueryOperationData_fieldBuilder b) updates]) = + [void Function(GQueryOperationData_fieldBuilder b) updates]) = _$GQueryOperationData_field; static void _initializeBuilder(GQueryOperationData_fieldBuilder b) => @@ -92,7 +93,7 @@ abstract class GQueryOperationData_field_field GQueryOperationData_field_field._(); factory GQueryOperationData_field_field( - [Function(GQueryOperationData_field_fieldBuilder b) updates]) = + [void Function(GQueryOperationData_field_fieldBuilder b) updates]) = _$GQueryOperationData_field_field; static void _initializeBuilder(GQueryOperationData_field_fieldBuilder b) => @@ -123,7 +124,7 @@ abstract class GQueryOperationData_field_fieldRequired GQueryOperationData_field_fieldRequired._(); factory GQueryOperationData_field_fieldRequired( - [Function(GQueryOperationData_field_fieldRequiredBuilder b) + [void Function(GQueryOperationData_field_fieldRequiredBuilder b) updates]) = _$GQueryOperationData_field_fieldRequired; static void _initializeBuilder( diff --git a/examples/gql_example_build/lib/kitchen_sink/__generated__/query.req.gql.dart b/examples/gql_example_build/lib/kitchen_sink/__generated__/query.req.gql.dart index 2e6418a8..d297d449 100644 --- a/examples/gql_example_build/lib/kitchen_sink/__generated__/query.req.gql.dart +++ b/examples/gql_example_build/lib/kitchen_sink/__generated__/query.req.gql.dart @@ -17,7 +17,7 @@ abstract class GQueryOperation implements Built { GQueryOperation._(); - factory GQueryOperation([Function(GQueryOperationBuilder b) updates]) = + factory GQueryOperation([void Function(GQueryOperationBuilder b) updates]) = _$GQueryOperation; static void _initializeBuilder(GQueryOperationBuilder b) => b diff --git a/examples/gql_example_build/lib/kitchen_sink/__generated__/query.var.gql.dart b/examples/gql_example_build/lib/kitchen_sink/__generated__/query.var.gql.dart index 12541eba..a1b8a12a 100644 --- a/examples/gql_example_build/lib/kitchen_sink/__generated__/query.var.gql.dart +++ b/examples/gql_example_build/lib/kitchen_sink/__generated__/query.var.gql.dart @@ -14,7 +14,8 @@ abstract class GQueryOperationVars GQueryOperationVars._(); factory GQueryOperationVars( - [Function(GQueryOperationVarsBuilder b) updates]) = _$GQueryOperationVars; + [void Function(GQueryOperationVarsBuilder b) updates]) = + _$GQueryOperationVars; String? get id; @BuiltValueField(wireName: 'bool') diff --git a/examples/gql_example_cli/lib/__generated__/dimensions.data.gql.dart b/examples/gql_example_cli/lib/__generated__/dimensions.data.gql.dart index 833573ec..98b82ee7 100644 --- a/examples/gql_example_cli/lib/__generated__/dimensions.data.gql.dart +++ b/examples/gql_example_cli/lib/__generated__/dimensions.data.gql.dart @@ -19,7 +19,7 @@ abstract class GDimensionsData implements Built, GDimensions { GDimensionsData._(); - factory GDimensionsData([Function(GDimensionsDataBuilder b) updates]) = + factory GDimensionsData([void Function(GDimensionsDataBuilder b) updates]) = _$GDimensionsData; static void _initializeBuilder(GDimensionsDataBuilder b) => diff --git a/examples/gql_example_cli/lib/__generated__/dimensions.var.gql.dart b/examples/gql_example_cli/lib/__generated__/dimensions.var.gql.dart index 0db83a41..eafd5d01 100644 --- a/examples/gql_example_cli/lib/__generated__/dimensions.var.gql.dart +++ b/examples/gql_example_cli/lib/__generated__/dimensions.var.gql.dart @@ -12,7 +12,7 @@ abstract class GDimensionsVars implements Built { GDimensionsVars._(); - factory GDimensionsVars([Function(GDimensionsVarsBuilder b) updates]) = + factory GDimensionsVars([void Function(GDimensionsVarsBuilder b) updates]) = _$GDimensionsVars; static Serializer get serializer => diff --git a/examples/gql_example_cli/lib/__generated__/find_pokemon.data.gql.dart b/examples/gql_example_cli/lib/__generated__/find_pokemon.data.gql.dart index b4b93b79..8ba3a075 100644 --- a/examples/gql_example_cli/lib/__generated__/find_pokemon.data.gql.dart +++ b/examples/gql_example_cli/lib/__generated__/find_pokemon.data.gql.dart @@ -13,7 +13,7 @@ abstract class GFindPokemonData implements Built { GFindPokemonData._(); - factory GFindPokemonData([Function(GFindPokemonDataBuilder b) updates]) = + factory GFindPokemonData([void Function(GFindPokemonDataBuilder b) updates]) = _$GFindPokemonData; static void _initializeBuilder(GFindPokemonDataBuilder b) => @@ -43,7 +43,7 @@ abstract class GFindPokemonData_pokemon GFindPokemonData_pokemon._(); factory GFindPokemonData_pokemon( - [Function(GFindPokemonData_pokemonBuilder b) updates]) = + [void Function(GFindPokemonData_pokemonBuilder b) updates]) = _$GFindPokemonData_pokemon; static void _initializeBuilder(GFindPokemonData_pokemonBuilder b) => @@ -78,7 +78,7 @@ abstract class GFindPokemonData_pokemon_weight GFindPokemonData_pokemon_weight._(); factory GFindPokemonData_pokemon_weight( - [Function(GFindPokemonData_pokemon_weightBuilder b) updates]) = + [void Function(GFindPokemonData_pokemon_weightBuilder b) updates]) = _$GFindPokemonData_pokemon_weight; static void _initializeBuilder(GFindPokemonData_pokemon_weightBuilder b) => @@ -115,7 +115,7 @@ abstract class GFindPokemonData_pokemon_height GFindPokemonData_pokemon_height._(); factory GFindPokemonData_pokemon_height( - [Function(GFindPokemonData_pokemon_heightBuilder b) updates]) = + [void Function(GFindPokemonData_pokemon_heightBuilder b) updates]) = _$GFindPokemonData_pokemon_height; static void _initializeBuilder(GFindPokemonData_pokemon_heightBuilder b) => diff --git a/examples/gql_example_cli/lib/__generated__/find_pokemon.req.gql.dart b/examples/gql_example_cli/lib/__generated__/find_pokemon.req.gql.dart index bf238a3f..5adfb450 100644 --- a/examples/gql_example_cli/lib/__generated__/find_pokemon.req.gql.dart +++ b/examples/gql_example_cli/lib/__generated__/find_pokemon.req.gql.dart @@ -15,7 +15,7 @@ abstract class GFindPokemon implements Built { GFindPokemon._(); - factory GFindPokemon([Function(GFindPokemonBuilder b) updates]) = + factory GFindPokemon([void Function(GFindPokemonBuilder b) updates]) = _$GFindPokemon; static void _initializeBuilder(GFindPokemonBuilder b) => b diff --git a/examples/gql_example_cli/lib/__generated__/find_pokemon.var.gql.dart b/examples/gql_example_cli/lib/__generated__/find_pokemon.var.gql.dart index 7e08ca08..2dee7be7 100644 --- a/examples/gql_example_cli/lib/__generated__/find_pokemon.var.gql.dart +++ b/examples/gql_example_cli/lib/__generated__/find_pokemon.var.gql.dart @@ -12,7 +12,7 @@ abstract class GFindPokemonVars implements Built { GFindPokemonVars._(); - factory GFindPokemonVars([Function(GFindPokemonVarsBuilder b) updates]) = + factory GFindPokemonVars([void Function(GFindPokemonVarsBuilder b) updates]) = _$GFindPokemonVars; String get name; diff --git a/examples/gql_example_cli/lib/__generated__/list_pokemon.data.gql.dart b/examples/gql_example_cli/lib/__generated__/list_pokemon.data.gql.dart index 325d50be..9677fe39 100644 --- a/examples/gql_example_cli/lib/__generated__/list_pokemon.data.gql.dart +++ b/examples/gql_example_cli/lib/__generated__/list_pokemon.data.gql.dart @@ -13,7 +13,7 @@ abstract class GListPokemonData implements Built { GListPokemonData._(); - factory GListPokemonData([Function(GListPokemonDataBuilder b) updates]) = + factory GListPokemonData([void Function(GListPokemonDataBuilder b) updates]) = _$GListPokemonData; static void _initializeBuilder(GListPokemonDataBuilder b) => @@ -43,7 +43,7 @@ abstract class GListPokemonData_pokemons GListPokemonData_pokemons._(); factory GListPokemonData_pokemons( - [Function(GListPokemonData_pokemonsBuilder b) updates]) = + [void Function(GListPokemonData_pokemonsBuilder b) updates]) = _$GListPokemonData_pokemons; static void _initializeBuilder(GListPokemonData_pokemonsBuilder b) => diff --git a/examples/gql_example_cli/lib/__generated__/list_pokemon.req.gql.dart b/examples/gql_example_cli/lib/__generated__/list_pokemon.req.gql.dart index d3c04e3f..c7faae8f 100644 --- a/examples/gql_example_cli/lib/__generated__/list_pokemon.req.gql.dart +++ b/examples/gql_example_cli/lib/__generated__/list_pokemon.req.gql.dart @@ -15,7 +15,7 @@ abstract class GListPokemon implements Built { GListPokemon._(); - factory GListPokemon([Function(GListPokemonBuilder b) updates]) = + factory GListPokemon([void Function(GListPokemonBuilder b) updates]) = _$GListPokemon; static void _initializeBuilder(GListPokemonBuilder b) => b diff --git a/examples/gql_example_cli/lib/__generated__/list_pokemon.var.gql.dart b/examples/gql_example_cli/lib/__generated__/list_pokemon.var.gql.dart index cf0fe9e4..566798c6 100644 --- a/examples/gql_example_cli/lib/__generated__/list_pokemon.var.gql.dart +++ b/examples/gql_example_cli/lib/__generated__/list_pokemon.var.gql.dart @@ -12,7 +12,7 @@ abstract class GListPokemonVars implements Built { GListPokemonVars._(); - factory GListPokemonVars([Function(GListPokemonVarsBuilder b) updates]) = + factory GListPokemonVars([void Function(GListPokemonVarsBuilder b) updates]) = _$GListPokemonVars; int get count; diff --git a/examples/gql_example_cli_github/lib/__generated__/add_star.data.gql.dart b/examples/gql_example_cli_github/lib/__generated__/add_star.data.gql.dart index c92d48dc..648f4014 100644 --- a/examples/gql_example_cli_github/lib/__generated__/add_star.data.gql.dart +++ b/examples/gql_example_cli_github/lib/__generated__/add_star.data.gql.dart @@ -13,7 +13,7 @@ abstract class GAddStarData implements Built { GAddStarData._(); - factory GAddStarData([Function(GAddStarDataBuilder b) updates]) = + factory GAddStarData([void Function(GAddStarDataBuilder b) updates]) = _$GAddStarData; static void _initializeBuilder(GAddStarDataBuilder b) => @@ -41,7 +41,8 @@ abstract class GAddStarData_action GAddStarData_action._(); factory GAddStarData_action( - [Function(GAddStarData_actionBuilder b) updates]) = _$GAddStarData_action; + [void Function(GAddStarData_actionBuilder b) updates]) = + _$GAddStarData_action; static void _initializeBuilder(GAddStarData_actionBuilder b) => b..G__typename = 'AddStarPayload'; @@ -71,7 +72,7 @@ abstract class GAddStarData_action_starrable GAddStarData_action_starrable._(); factory GAddStarData_action_starrable( - [Function(GAddStarData_action_starrableBuilder b) updates]) = + [void Function(GAddStarData_action_starrableBuilder b) updates]) = _$GAddStarData_action_starrable; static void _initializeBuilder(GAddStarData_action_starrableBuilder b) => diff --git a/examples/gql_example_cli_github/lib/__generated__/add_star.req.gql.dart b/examples/gql_example_cli_github/lib/__generated__/add_star.req.gql.dart index a87cce17..8c24e2f0 100644 --- a/examples/gql_example_cli_github/lib/__generated__/add_star.req.gql.dart +++ b/examples/gql_example_cli_github/lib/__generated__/add_star.req.gql.dart @@ -17,7 +17,7 @@ part 'add_star.req.gql.g.dart'; abstract class GAddStar implements Built { GAddStar._(); - factory GAddStar([Function(GAddStarBuilder b) updates]) = _$GAddStar; + factory GAddStar([void Function(GAddStarBuilder b) updates]) = _$GAddStar; static void _initializeBuilder(GAddStarBuilder b) => b ..operation = _i1.Operation( diff --git a/examples/gql_example_cli_github/lib/__generated__/add_star.var.gql.dart b/examples/gql_example_cli_github/lib/__generated__/add_star.var.gql.dart index b172faa4..5cfcca5d 100644 --- a/examples/gql_example_cli_github/lib/__generated__/add_star.var.gql.dart +++ b/examples/gql_example_cli_github/lib/__generated__/add_star.var.gql.dart @@ -13,7 +13,7 @@ abstract class GAddStarVars implements Built { GAddStarVars._(); - factory GAddStarVars([Function(GAddStarVarsBuilder b) updates]) = + factory GAddStarVars([void Function(GAddStarVarsBuilder b) updates]) = _$GAddStarVars; String get starrableId; diff --git a/examples/gql_example_cli_github/lib/__generated__/read_repos.data.gql.dart b/examples/gql_example_cli_github/lib/__generated__/read_repos.data.gql.dart index 4fe20874..e6aaa362 100644 --- a/examples/gql_example_cli_github/lib/__generated__/read_repos.data.gql.dart +++ b/examples/gql_example_cli_github/lib/__generated__/read_repos.data.gql.dart @@ -17,7 +17,7 @@ abstract class GReadRepositoriesData GReadRepositoriesData._(); factory GReadRepositoriesData( - [Function(GReadRepositoriesDataBuilder b) updates]) = + [void Function(GReadRepositoriesDataBuilder b) updates]) = _$GReadRepositoriesData; static void _initializeBuilder(GReadRepositoriesDataBuilder b) => @@ -48,7 +48,7 @@ abstract class GReadRepositoriesData_viewer GReadRepositoriesData_viewer._(); factory GReadRepositoriesData_viewer( - [Function(GReadRepositoriesData_viewerBuilder b) updates]) = + [void Function(GReadRepositoriesData_viewerBuilder b) updates]) = _$GReadRepositoriesData_viewer; static void _initializeBuilder(GReadRepositoriesData_viewerBuilder b) => @@ -79,7 +79,7 @@ abstract class GReadRepositoriesData_viewer_repositories GReadRepositoriesData_viewer_repositories._(); factory GReadRepositoriesData_viewer_repositories( - [Function(GReadRepositoriesData_viewer_repositoriesBuilder b) + [void Function(GReadRepositoriesData_viewer_repositoriesBuilder b) updates]) = _$GReadRepositoriesData_viewer_repositories; static void _initializeBuilder( @@ -112,7 +112,7 @@ abstract class GReadRepositoriesData_viewer_repositories_nodes GReadRepositoriesData_viewer_repositories_nodes._(); factory GReadRepositoriesData_viewer_repositories_nodes( - [Function(GReadRepositoriesData_viewer_repositories_nodesBuilder b) + [void Function(GReadRepositoriesData_viewer_repositories_nodesBuilder b) updates]) = _$GReadRepositoriesData_viewer_repositories_nodes; static void _initializeBuilder( diff --git a/examples/gql_example_cli_github/lib/__generated__/read_repos.req.gql.dart b/examples/gql_example_cli_github/lib/__generated__/read_repos.req.gql.dart index 968cbb58..acc22602 100644 --- a/examples/gql_example_cli_github/lib/__generated__/read_repos.req.gql.dart +++ b/examples/gql_example_cli_github/lib/__generated__/read_repos.req.gql.dart @@ -18,7 +18,8 @@ abstract class GReadRepositories implements Built { GReadRepositories._(); - factory GReadRepositories([Function(GReadRepositoriesBuilder b) updates]) = + factory GReadRepositories( + [void Function(GReadRepositoriesBuilder b) updates]) = _$GReadRepositories; static void _initializeBuilder(GReadRepositoriesBuilder b) => b diff --git a/examples/gql_example_cli_github/lib/__generated__/read_repos.var.gql.dart b/examples/gql_example_cli_github/lib/__generated__/read_repos.var.gql.dart index 6c5fa1c1..0c56d7be 100644 --- a/examples/gql_example_cli_github/lib/__generated__/read_repos.var.gql.dart +++ b/examples/gql_example_cli_github/lib/__generated__/read_repos.var.gql.dart @@ -14,7 +14,7 @@ abstract class GReadRepositoriesVars GReadRepositoriesVars._(); factory GReadRepositoriesVars( - [Function(GReadRepositoriesVarsBuilder b) updates]) = + [void Function(GReadRepositoriesVarsBuilder b) updates]) = _$GReadRepositoriesVars; int get nRepositories; diff --git a/examples/gql_example_cli_github/lib/__generated__/remove_star.data.gql.dart b/examples/gql_example_cli_github/lib/__generated__/remove_star.data.gql.dart index cf4c2f72..e144f026 100644 --- a/examples/gql_example_cli_github/lib/__generated__/remove_star.data.gql.dart +++ b/examples/gql_example_cli_github/lib/__generated__/remove_star.data.gql.dart @@ -13,7 +13,7 @@ abstract class GRemoveStarData implements Built { GRemoveStarData._(); - factory GRemoveStarData([Function(GRemoveStarDataBuilder b) updates]) = + factory GRemoveStarData([void Function(GRemoveStarDataBuilder b) updates]) = _$GRemoveStarData; static void _initializeBuilder(GRemoveStarDataBuilder b) => @@ -42,7 +42,7 @@ abstract class GRemoveStarData_action GRemoveStarData_action._(); factory GRemoveStarData_action( - [Function(GRemoveStarData_actionBuilder b) updates]) = + [void Function(GRemoveStarData_actionBuilder b) updates]) = _$GRemoveStarData_action; static void _initializeBuilder(GRemoveStarData_actionBuilder b) => @@ -73,7 +73,7 @@ abstract class GRemoveStarData_action_starrable GRemoveStarData_action_starrable._(); factory GRemoveStarData_action_starrable( - [Function(GRemoveStarData_action_starrableBuilder b) updates]) = + [void Function(GRemoveStarData_action_starrableBuilder b) updates]) = _$GRemoveStarData_action_starrable; static void _initializeBuilder(GRemoveStarData_action_starrableBuilder b) => diff --git a/examples/gql_example_cli_github/lib/__generated__/remove_star.req.gql.dart b/examples/gql_example_cli_github/lib/__generated__/remove_star.req.gql.dart index 7536366d..4ecf56d1 100644 --- a/examples/gql_example_cli_github/lib/__generated__/remove_star.req.gql.dart +++ b/examples/gql_example_cli_github/lib/__generated__/remove_star.req.gql.dart @@ -17,7 +17,8 @@ part 'remove_star.req.gql.g.dart'; abstract class GRemoveStar implements Built { GRemoveStar._(); - factory GRemoveStar([Function(GRemoveStarBuilder b) updates]) = _$GRemoveStar; + factory GRemoveStar([void Function(GRemoveStarBuilder b) updates]) = + _$GRemoveStar; static void _initializeBuilder(GRemoveStarBuilder b) => b ..operation = _i1.Operation( diff --git a/examples/gql_example_cli_github/lib/__generated__/remove_star.var.gql.dart b/examples/gql_example_cli_github/lib/__generated__/remove_star.var.gql.dart index c84a189c..f4d6805c 100644 --- a/examples/gql_example_cli_github/lib/__generated__/remove_star.var.gql.dart +++ b/examples/gql_example_cli_github/lib/__generated__/remove_star.var.gql.dart @@ -13,7 +13,7 @@ abstract class GRemoveStarVars implements Built { GRemoveStarVars._(); - factory GRemoveStarVars([Function(GRemoveStarVarsBuilder b) updates]) = + factory GRemoveStarVars([void Function(GRemoveStarVarsBuilder b) updates]) = _$GRemoveStarVars; String get starrableId; diff --git a/examples/gql_example_cli_github/lib/__generated__/schema.schema.gql.dart b/examples/gql_example_cli_github/lib/__generated__/schema.schema.gql.dart index cf9f1851..ac7577a5 100644 --- a/examples/gql_example_cli_github/lib/__generated__/schema.schema.gql.dart +++ b/examples/gql_example_cli_github/lib/__generated__/schema.schema.gql.dart @@ -19,7 +19,7 @@ abstract class GAcceptEnterpriseAdministratorInvitationInput GAcceptEnterpriseAdministratorInvitationInput._(); factory GAcceptEnterpriseAdministratorInvitationInput( - [Function(GAcceptEnterpriseAdministratorInvitationInputBuilder b) + [void Function(GAcceptEnterpriseAdministratorInvitationInputBuilder b) updates]) = _$GAcceptEnterpriseAdministratorInvitationInput; String? get clientMutationId; @@ -47,7 +47,7 @@ abstract class GAcceptTopicSuggestionInput GAcceptTopicSuggestionInput._(); factory GAcceptTopicSuggestionInput( - [Function(GAcceptTopicSuggestionInputBuilder b) updates]) = + [void Function(GAcceptTopicSuggestionInputBuilder b) updates]) = _$GAcceptTopicSuggestionInput; String? get clientMutationId; @@ -100,7 +100,7 @@ abstract class GAddAssigneesToAssignableInput GAddAssigneesToAssignableInput._(); factory GAddAssigneesToAssignableInput( - [Function(GAddAssigneesToAssignableInputBuilder b) updates]) = + [void Function(GAddAssigneesToAssignableInputBuilder b) updates]) = _$GAddAssigneesToAssignableInput; String get assignableId; @@ -125,7 +125,7 @@ abstract class GAddCommentInput implements Built { GAddCommentInput._(); - factory GAddCommentInput([Function(GAddCommentInputBuilder b) updates]) = + factory GAddCommentInput([void Function(GAddCommentInputBuilder b) updates]) = _$GAddCommentInput; String get body; @@ -152,7 +152,7 @@ abstract class GAddLabelsToLabelableInput GAddLabelsToLabelableInput._(); factory GAddLabelsToLabelableInput( - [Function(GAddLabelsToLabelableInputBuilder b) updates]) = + [void Function(GAddLabelsToLabelableInputBuilder b) updates]) = _$GAddLabelsToLabelableInput; String? get clientMutationId; @@ -178,7 +178,7 @@ abstract class GAddProjectCardInput GAddProjectCardInput._(); factory GAddProjectCardInput( - [Function(GAddProjectCardInputBuilder b) updates]) = + [void Function(GAddProjectCardInputBuilder b) updates]) = _$GAddProjectCardInput; String? get clientMutationId; @@ -205,7 +205,7 @@ abstract class GAddProjectColumnInput GAddProjectColumnInput._(); factory GAddProjectColumnInput( - [Function(GAddProjectColumnInputBuilder b) updates]) = + [void Function(GAddProjectColumnInputBuilder b) updates]) = _$GAddProjectColumnInput; String? get clientMutationId; @@ -233,7 +233,7 @@ abstract class GAddPullRequestReviewCommentInput GAddPullRequestReviewCommentInput._(); factory GAddPullRequestReviewCommentInput( - [Function(GAddPullRequestReviewCommentInputBuilder b) updates]) = + [void Function(GAddPullRequestReviewCommentInputBuilder b) updates]) = _$GAddPullRequestReviewCommentInput; String get body; @@ -266,7 +266,7 @@ abstract class GAddPullRequestReviewInput GAddPullRequestReviewInput._(); factory GAddPullRequestReviewInput( - [Function(GAddPullRequestReviewInputBuilder b) updates]) = + [void Function(GAddPullRequestReviewInputBuilder b) updates]) = _$GAddPullRequestReviewInput; String? get body; @@ -294,7 +294,8 @@ abstract class GAddReactionInput implements Built { GAddReactionInput._(); - factory GAddReactionInput([Function(GAddReactionInputBuilder b) updates]) = + factory GAddReactionInput( + [void Function(GAddReactionInputBuilder b) updates]) = _$GAddReactionInput; String? get clientMutationId; @@ -319,7 +320,7 @@ abstract class GAddStarInput implements Built { GAddStarInput._(); - factory GAddStarInput([Function(GAddStarInputBuilder b) updates]) = + factory GAddStarInput([void Function(GAddStarInputBuilder b) updates]) = _$GAddStarInput; String? get clientMutationId; @@ -343,7 +344,7 @@ abstract class GArchiveRepositoryInput GArchiveRepositoryInput._(); factory GArchiveRepositoryInput( - [Function(GArchiveRepositoryInputBuilder b) updates]) = + [void Function(GArchiveRepositoryInputBuilder b) updates]) = _$GArchiveRepositoryInput; String? get clientMutationId; @@ -367,7 +368,7 @@ abstract class GAuditLogOrder implements Built { GAuditLogOrder._(); - factory GAuditLogOrder([Function(GAuditLogOrderBuilder b) updates]) = + factory GAuditLogOrder([void Function(GAuditLogOrderBuilder b) updates]) = _$GAuditLogOrder; GOrderDirection? get direction; @@ -409,8 +410,8 @@ abstract class GCancelEnterpriseAdminInvitationInput GCancelEnterpriseAdminInvitationInput._(); factory GCancelEnterpriseAdminInvitationInput( - [Function(GCancelEnterpriseAdminInvitationInputBuilder b) updates]) = - _$GCancelEnterpriseAdminInvitationInput; + [void Function(GCancelEnterpriseAdminInvitationInputBuilder b) + updates]) = _$GCancelEnterpriseAdminInvitationInput; String? get clientMutationId; String get invitationId; @@ -435,7 +436,7 @@ abstract class GChangeUserStatusInput GChangeUserStatusInput._(); factory GChangeUserStatusInput( - [Function(GChangeUserStatusInputBuilder b) updates]) = + [void Function(GChangeUserStatusInputBuilder b) updates]) = _$GChangeUserStatusInput; String? get clientMutationId; @@ -466,7 +467,7 @@ abstract class GClearLabelsFromLabelableInput GClearLabelsFromLabelableInput._(); factory GClearLabelsFromLabelableInput( - [Function(GClearLabelsFromLabelableInputBuilder b) updates]) = + [void Function(GClearLabelsFromLabelableInputBuilder b) updates]) = _$GClearLabelsFromLabelableInput; String? get clientMutationId; @@ -490,7 +491,8 @@ abstract class GCloneProjectInput implements Built { GCloneProjectInput._(); - factory GCloneProjectInput([Function(GCloneProjectInputBuilder b) updates]) = + factory GCloneProjectInput( + [void Function(GCloneProjectInputBuilder b) updates]) = _$GCloneProjectInput; String? get body; @@ -522,7 +524,7 @@ abstract class GCloneTemplateRepositoryInput GCloneTemplateRepositoryInput._(); factory GCloneTemplateRepositoryInput( - [Function(GCloneTemplateRepositoryInputBuilder b) updates]) = + [void Function(GCloneTemplateRepositoryInputBuilder b) updates]) = _$GCloneTemplateRepositoryInput; String? get clientMutationId; @@ -550,7 +552,7 @@ abstract class GCloseIssueInput implements Built { GCloseIssueInput._(); - factory GCloseIssueInput([Function(GCloseIssueInputBuilder b) updates]) = + factory GCloseIssueInput([void Function(GCloseIssueInputBuilder b) updates]) = _$GCloseIssueInput; String? get clientMutationId; @@ -575,7 +577,7 @@ abstract class GClosePullRequestInput GClosePullRequestInput._(); factory GClosePullRequestInput( - [Function(GClosePullRequestInputBuilder b) updates]) = + [void Function(GClosePullRequestInputBuilder b) updates]) = _$GClosePullRequestInput; String? get clientMutationId; @@ -687,7 +689,7 @@ abstract class GCommitAuthor implements Built { GCommitAuthor._(); - factory GCommitAuthor([Function(GCommitAuthorBuilder b) updates]) = + factory GCommitAuthor([void Function(GCommitAuthorBuilder b) updates]) = _$GCommitAuthor; BuiltList? get emails; @@ -712,7 +714,7 @@ abstract class GCommitContributionOrder GCommitContributionOrder._(); factory GCommitContributionOrder( - [Function(GCommitContributionOrderBuilder b) updates]) = + [void Function(GCommitContributionOrderBuilder b) updates]) = _$GCommitContributionOrder; GOrderDirection get direction; @@ -755,7 +757,8 @@ abstract class GContributionOrder implements Built { GContributionOrder._(); - factory GContributionOrder([Function(GContributionOrderBuilder b) updates]) = + factory GContributionOrder( + [void Function(GContributionOrderBuilder b) updates]) = _$GContributionOrder; GOrderDirection get direction; @@ -798,8 +801,8 @@ abstract class GConvertProjectCardNoteToIssueInput GConvertProjectCardNoteToIssueInput._(); factory GConvertProjectCardNoteToIssueInput( - [Function(GConvertProjectCardNoteToIssueInputBuilder b) updates]) = - _$GConvertProjectCardNoteToIssueInput; + [void Function(GConvertProjectCardNoteToIssueInputBuilder b) + updates]) = _$GConvertProjectCardNoteToIssueInput; String? get body; String? get clientMutationId; @@ -829,7 +832,7 @@ abstract class GCreateBranchProtectionRuleInput GCreateBranchProtectionRuleInput._(); factory GCreateBranchProtectionRuleInput( - [Function(GCreateBranchProtectionRuleInputBuilder b) updates]) = + [void Function(GCreateBranchProtectionRuleInputBuilder b) updates]) = _$GCreateBranchProtectionRuleInput; String? get clientMutationId; @@ -871,8 +874,8 @@ abstract class GCreateEnterpriseOrganizationInput GCreateEnterpriseOrganizationInput._(); factory GCreateEnterpriseOrganizationInput( - [Function(GCreateEnterpriseOrganizationInputBuilder b) updates]) = - _$GCreateEnterpriseOrganizationInput; + [void Function(GCreateEnterpriseOrganizationInputBuilder b) + updates]) = _$GCreateEnterpriseOrganizationInput; BuiltList get adminLogins; String get billingEmail; @@ -900,7 +903,8 @@ abstract class GCreateIssueInput implements Built { GCreateIssueInput._(); - factory GCreateIssueInput([Function(GCreateIssueInputBuilder b) updates]) = + factory GCreateIssueInput( + [void Function(GCreateIssueInputBuilder b) updates]) = _$GCreateIssueInput; BuiltList? get assigneeIds; @@ -931,7 +935,8 @@ abstract class GCreateProjectInput GCreateProjectInput._(); factory GCreateProjectInput( - [Function(GCreateProjectInputBuilder b) updates]) = _$GCreateProjectInput; + [void Function(GCreateProjectInputBuilder b) updates]) = + _$GCreateProjectInput; String? get body; String? get clientMutationId; @@ -959,7 +964,7 @@ abstract class GCreatePullRequestInput GCreatePullRequestInput._(); factory GCreatePullRequestInput( - [Function(GCreatePullRequestInputBuilder b) updates]) = + [void Function(GCreatePullRequestInputBuilder b) updates]) = _$GCreatePullRequestInput; String get baseRefName; @@ -988,7 +993,7 @@ abstract class GCreateRefInput implements Built { GCreateRefInput._(); - factory GCreateRefInput([Function(GCreateRefInputBuilder b) updates]) = + factory GCreateRefInput([void Function(GCreateRefInputBuilder b) updates]) = _$GCreateRefInput; String? get clientMutationId; @@ -1015,7 +1020,7 @@ abstract class GCreateRepositoryInput GCreateRepositoryInput._(); factory GCreateRepositoryInput( - [Function(GCreateRepositoryInputBuilder b) updates]) = + [void Function(GCreateRepositoryInputBuilder b) updates]) = _$GCreateRepositoryInput; String? get clientMutationId; @@ -1050,7 +1055,7 @@ abstract class GCreateTeamDiscussionCommentInput GCreateTeamDiscussionCommentInput._(); factory GCreateTeamDiscussionCommentInput( - [Function(GCreateTeamDiscussionCommentInputBuilder b) updates]) = + [void Function(GCreateTeamDiscussionCommentInputBuilder b) updates]) = _$GCreateTeamDiscussionCommentInput; String get body; @@ -1078,7 +1083,7 @@ abstract class GCreateTeamDiscussionInput GCreateTeamDiscussionInput._(); factory GCreateTeamDiscussionInput( - [Function(GCreateTeamDiscussionInputBuilder b) updates]) = + [void Function(GCreateTeamDiscussionInputBuilder b) updates]) = _$GCreateTeamDiscussionInput; String get body; @@ -1133,7 +1138,7 @@ abstract class GDeclineTopicSuggestionInput GDeclineTopicSuggestionInput._(); factory GDeclineTopicSuggestionInput( - [Function(GDeclineTopicSuggestionInputBuilder b) updates]) = + [void Function(GDeclineTopicSuggestionInputBuilder b) updates]) = _$GDeclineTopicSuggestionInput; String? get clientMutationId; @@ -1187,7 +1192,7 @@ abstract class GDeleteBranchProtectionRuleInput GDeleteBranchProtectionRuleInput._(); factory GDeleteBranchProtectionRuleInput( - [Function(GDeleteBranchProtectionRuleInputBuilder b) updates]) = + [void Function(GDeleteBranchProtectionRuleInputBuilder b) updates]) = _$GDeleteBranchProtectionRuleInput; String get branchProtectionRuleId; @@ -1213,7 +1218,7 @@ abstract class GDeleteDeploymentInput GDeleteDeploymentInput._(); factory GDeleteDeploymentInput( - [Function(GDeleteDeploymentInputBuilder b) updates]) = + [void Function(GDeleteDeploymentInputBuilder b) updates]) = _$GDeleteDeploymentInput; String? get clientMutationId; @@ -1239,7 +1244,7 @@ abstract class GDeleteIssueCommentInput GDeleteIssueCommentInput._(); factory GDeleteIssueCommentInput( - [Function(GDeleteIssueCommentInputBuilder b) updates]) = + [void Function(GDeleteIssueCommentInputBuilder b) updates]) = _$GDeleteIssueCommentInput; String? get clientMutationId; @@ -1263,7 +1268,8 @@ abstract class GDeleteIssueInput implements Built { GDeleteIssueInput._(); - factory GDeleteIssueInput([Function(GDeleteIssueInputBuilder b) updates]) = + factory GDeleteIssueInput( + [void Function(GDeleteIssueInputBuilder b) updates]) = _$GDeleteIssueInput; String? get clientMutationId; @@ -1288,7 +1294,7 @@ abstract class GDeleteProjectCardInput GDeleteProjectCardInput._(); factory GDeleteProjectCardInput( - [Function(GDeleteProjectCardInputBuilder b) updates]) = + [void Function(GDeleteProjectCardInputBuilder b) updates]) = _$GDeleteProjectCardInput; String get cardId; @@ -1314,7 +1320,7 @@ abstract class GDeleteProjectColumnInput GDeleteProjectColumnInput._(); factory GDeleteProjectColumnInput( - [Function(GDeleteProjectColumnInputBuilder b) updates]) = + [void Function(GDeleteProjectColumnInputBuilder b) updates]) = _$GDeleteProjectColumnInput; String? get clientMutationId; @@ -1339,7 +1345,8 @@ abstract class GDeleteProjectInput GDeleteProjectInput._(); factory GDeleteProjectInput( - [Function(GDeleteProjectInputBuilder b) updates]) = _$GDeleteProjectInput; + [void Function(GDeleteProjectInputBuilder b) updates]) = + _$GDeleteProjectInput; String? get clientMutationId; String get projectId; @@ -1365,8 +1372,8 @@ abstract class GDeletePullRequestReviewCommentInput GDeletePullRequestReviewCommentInput._(); factory GDeletePullRequestReviewCommentInput( - [Function(GDeletePullRequestReviewCommentInputBuilder b) updates]) = - _$GDeletePullRequestReviewCommentInput; + [void Function(GDeletePullRequestReviewCommentInputBuilder b) + updates]) = _$GDeletePullRequestReviewCommentInput; String? get clientMutationId; String get id; @@ -1393,7 +1400,7 @@ abstract class GDeletePullRequestReviewInput GDeletePullRequestReviewInput._(); factory GDeletePullRequestReviewInput( - [Function(GDeletePullRequestReviewInputBuilder b) updates]) = + [void Function(GDeletePullRequestReviewInputBuilder b) updates]) = _$GDeletePullRequestReviewInput; String? get clientMutationId; @@ -1417,7 +1424,7 @@ abstract class GDeleteRefInput implements Built { GDeleteRefInput._(); - factory GDeleteRefInput([Function(GDeleteRefInputBuilder b) updates]) = + factory GDeleteRefInput([void Function(GDeleteRefInputBuilder b) updates]) = _$GDeleteRefInput; String? get clientMutationId; @@ -1444,7 +1451,7 @@ abstract class GDeleteTeamDiscussionCommentInput GDeleteTeamDiscussionCommentInput._(); factory GDeleteTeamDiscussionCommentInput( - [Function(GDeleteTeamDiscussionCommentInputBuilder b) updates]) = + [void Function(GDeleteTeamDiscussionCommentInputBuilder b) updates]) = _$GDeleteTeamDiscussionCommentInput; String? get clientMutationId; @@ -1471,7 +1478,7 @@ abstract class GDeleteTeamDiscussionInput GDeleteTeamDiscussionInput._(); factory GDeleteTeamDiscussionInput( - [Function(GDeleteTeamDiscussionInputBuilder b) updates]) = + [void Function(GDeleteTeamDiscussionInputBuilder b) updates]) = _$GDeleteTeamDiscussionInput; String? get clientMutationId; @@ -1495,7 +1502,7 @@ abstract class GDeploymentOrder implements Built { GDeploymentOrder._(); - factory GDeploymentOrder([Function(GDeploymentOrderBuilder b) updates]) = + factory GDeploymentOrder([void Function(GDeploymentOrderBuilder b) updates]) = _$GDeploymentOrder; GOrderDirection get direction; @@ -1597,7 +1604,7 @@ abstract class GDismissPullRequestReviewInput GDismissPullRequestReviewInput._(); factory GDismissPullRequestReviewInput( - [Function(GDismissPullRequestReviewInputBuilder b) updates]) = + [void Function(GDismissPullRequestReviewInputBuilder b) updates]) = _$GDismissPullRequestReviewInput; String? get clientMutationId; @@ -1625,7 +1632,7 @@ abstract class GDraftPullRequestReviewComment GDraftPullRequestReviewComment._(); factory GDraftPullRequestReviewComment( - [Function(GDraftPullRequestReviewCommentBuilder b) updates]) = + [void Function(GDraftPullRequestReviewCommentBuilder b) updates]) = _$GDraftPullRequestReviewComment; String get body; @@ -1653,7 +1660,7 @@ abstract class GEnterpriseAdministratorInvitationOrder GEnterpriseAdministratorInvitationOrder._(); factory GEnterpriseAdministratorInvitationOrder( - [Function(GEnterpriseAdministratorInvitationOrderBuilder b) + [void Function(GEnterpriseAdministratorInvitationOrderBuilder b) updates]) = _$GEnterpriseAdministratorInvitationOrder; GOrderDirection get direction; @@ -1788,7 +1795,7 @@ abstract class GEnterpriseMemberOrder GEnterpriseMemberOrder._(); factory GEnterpriseMemberOrder( - [Function(GEnterpriseMemberOrderBuilder b) updates]) = + [void Function(GEnterpriseMemberOrderBuilder b) updates]) = _$GEnterpriseMemberOrder; GOrderDirection get direction; @@ -1886,8 +1893,8 @@ abstract class GEnterpriseServerInstallationOrder GEnterpriseServerInstallationOrder._(); factory GEnterpriseServerInstallationOrder( - [Function(GEnterpriseServerInstallationOrderBuilder b) updates]) = - _$GEnterpriseServerInstallationOrder; + [void Function(GEnterpriseServerInstallationOrderBuilder b) + updates]) = _$GEnterpriseServerInstallationOrder; GOrderDirection get direction; GEnterpriseServerInstallationOrderField get field; @@ -1936,8 +1943,8 @@ abstract class GEnterpriseServerUserAccountEmailOrder GEnterpriseServerUserAccountEmailOrder._(); factory GEnterpriseServerUserAccountEmailOrder( - [Function(GEnterpriseServerUserAccountEmailOrderBuilder b) updates]) = - _$GEnterpriseServerUserAccountEmailOrder; + [void Function(GEnterpriseServerUserAccountEmailOrderBuilder b) + updates]) = _$GEnterpriseServerUserAccountEmailOrder; GOrderDirection get direction; GEnterpriseServerUserAccountEmailOrderField get field; @@ -1981,7 +1988,7 @@ abstract class GEnterpriseServerUserAccountOrder GEnterpriseServerUserAccountOrder._(); factory GEnterpriseServerUserAccountOrder( - [Function(GEnterpriseServerUserAccountOrderBuilder b) updates]) = + [void Function(GEnterpriseServerUserAccountOrderBuilder b) updates]) = _$GEnterpriseServerUserAccountOrder; GOrderDirection get direction; @@ -2028,7 +2035,7 @@ abstract class GEnterpriseServerUserAccountsUploadOrder GEnterpriseServerUserAccountsUploadOrder._(); factory GEnterpriseServerUserAccountsUploadOrder( - [Function(GEnterpriseServerUserAccountsUploadOrderBuilder b) + [void Function(GEnterpriseServerUserAccountsUploadOrderBuilder b) updates]) = _$GEnterpriseServerUserAccountsUploadOrder; GOrderDirection get direction; @@ -2133,7 +2140,7 @@ abstract class GFollowUserInput implements Built { GFollowUserInput._(); - factory GFollowUserInput([Function(GFollowUserInputBuilder b) updates]) = + factory GFollowUserInput([void Function(GFollowUserInputBuilder b) updates]) = _$GFollowUserInput; String? get clientMutationId; @@ -2190,7 +2197,8 @@ class GFundingPlatform extends EnumClass { abstract class GGistOrder implements Built { GGistOrder._(); - factory GGistOrder([Function(GGistOrderBuilder b) updates]) = _$GGistOrder; + factory GGistOrder([void Function(GGistOrderBuilder b) updates]) = + _$GGistOrder; GOrderDirection get direction; GGistOrderField get field; @@ -2377,7 +2385,7 @@ abstract class GInviteEnterpriseAdminInput GInviteEnterpriseAdminInput._(); factory GInviteEnterpriseAdminInput( - [Function(GInviteEnterpriseAdminInputBuilder b) updates]) = + [void Function(GInviteEnterpriseAdminInputBuilder b) updates]) = _$GInviteEnterpriseAdminInput; String? get clientMutationId; @@ -2404,7 +2412,7 @@ abstract class GIssueFilters implements Built { GIssueFilters._(); - factory GIssueFilters([Function(GIssueFiltersBuilder b) updates]) = + factory GIssueFilters([void Function(GIssueFiltersBuilder b) updates]) = _$GIssueFilters; String? get assignee; @@ -2432,7 +2440,8 @@ abstract class GIssueFilters abstract class GIssueOrder implements Built { GIssueOrder._(); - factory GIssueOrder([Function(GIssueOrderBuilder b) updates]) = _$GIssueOrder; + factory GIssueOrder([void Function(GIssueOrderBuilder b) updates]) = + _$GIssueOrder; GOrderDirection get direction; GIssueOrderField get field; @@ -2588,7 +2597,8 @@ class GIssueTimelineItemsItemType extends EnumClass { abstract class GLabelOrder implements Built { GLabelOrder._(); - factory GLabelOrder([Function(GLabelOrderBuilder b) updates]) = _$GLabelOrder; + factory GLabelOrder([void Function(GLabelOrderBuilder b) updates]) = + _$GLabelOrder; GOrderDirection get direction; GLabelOrderField get field; @@ -2626,7 +2636,7 @@ abstract class GLanguageOrder implements Built { GLanguageOrder._(); - factory GLanguageOrder([Function(GLanguageOrderBuilder b) updates]) = + factory GLanguageOrder([void Function(GLanguageOrderBuilder b) updates]) = _$GLanguageOrder; GOrderDirection get direction; @@ -2668,7 +2678,7 @@ abstract class GLinkRepositoryToProjectInput GLinkRepositoryToProjectInput._(); factory GLinkRepositoryToProjectInput( - [Function(GLinkRepositoryToProjectInputBuilder b) updates]) = + [void Function(GLinkRepositoryToProjectInputBuilder b) updates]) = _$GLinkRepositoryToProjectInput; String? get clientMutationId; @@ -2693,7 +2703,8 @@ abstract class GLockLockableInput implements Built { GLockLockableInput._(); - factory GLockLockableInput([Function(GLockLockableInputBuilder b) updates]) = + factory GLockLockableInput( + [void Function(GLockLockableInputBuilder b) updates]) = _$GLockLockableInput; String? get clientMutationId; @@ -2736,7 +2747,8 @@ abstract class GMergeBranchInput implements Built { GMergeBranchInput._(); - factory GMergeBranchInput([Function(GMergeBranchInputBuilder b) updates]) = + factory GMergeBranchInput( + [void Function(GMergeBranchInputBuilder b) updates]) = _$GMergeBranchInput; String get base; @@ -2764,7 +2776,7 @@ abstract class GMergePullRequestInput GMergePullRequestInput._(); factory GMergePullRequestInput( - [Function(GMergePullRequestInputBuilder b) updates]) = + [void Function(GMergePullRequestInputBuilder b) updates]) = _$GMergePullRequestInput; String? get clientMutationId; @@ -2809,7 +2821,7 @@ abstract class GMilestoneOrder implements Built { GMilestoneOrder._(); - factory GMilestoneOrder([Function(GMilestoneOrderBuilder b) updates]) = + factory GMilestoneOrder([void Function(GMilestoneOrderBuilder b) updates]) = _$GMilestoneOrder; GOrderDirection get direction; @@ -2872,7 +2884,7 @@ abstract class GMoveProjectCardInput GMoveProjectCardInput._(); factory GMoveProjectCardInput( - [Function(GMoveProjectCardInputBuilder b) updates]) = + [void Function(GMoveProjectCardInputBuilder b) updates]) = _$GMoveProjectCardInput; String? get afterCardId; @@ -2899,7 +2911,7 @@ abstract class GMoveProjectColumnInput GMoveProjectColumnInput._(); factory GMoveProjectColumnInput( - [Function(GMoveProjectColumnInputBuilder b) updates]) = + [void Function(GMoveProjectColumnInputBuilder b) updates]) = _$GMoveProjectColumnInput; String? get afterColumnId; @@ -3328,7 +3340,8 @@ abstract class GOrganizationOrder implements Built { GOrganizationOrder._(); - factory GOrganizationOrder([Function(GOrganizationOrderBuilder b) updates]) = + factory GOrganizationOrder( + [void Function(GOrganizationOrderBuilder b) updates]) = _$GOrganizationOrder; GOrderDirection get direction; @@ -3469,7 +3482,7 @@ abstract class GProjectOrder implements Built { GProjectOrder._(); - factory GProjectOrder([Function(GProjectOrderBuilder b) updates]) = + factory GProjectOrder([void Function(GProjectOrderBuilder b) updates]) = _$GProjectOrder; GOrderDirection get direction; @@ -3565,7 +3578,8 @@ abstract class GPullRequestOrder implements Built { GPullRequestOrder._(); - factory GPullRequestOrder([Function(GPullRequestOrderBuilder b) updates]) = + factory GPullRequestOrder( + [void Function(GPullRequestOrderBuilder b) updates]) = _$GPullRequestOrder; GOrderDirection get direction; @@ -3900,7 +3914,7 @@ abstract class GReactionOrder implements Built { GReactionOrder._(); - factory GReactionOrder([Function(GReactionOrderBuilder b) updates]) = + factory GReactionOrder([void Function(GReactionOrderBuilder b) updates]) = _$GReactionOrder; GOrderDirection get direction; @@ -3938,7 +3952,7 @@ class GReactionOrderField extends EnumClass { abstract class GRefOrder implements Built { GRefOrder._(); - factory GRefOrder([Function(GRefOrderBuilder b) updates]) = _$GRefOrder; + factory GRefOrder([void Function(GRefOrderBuilder b) updates]) = _$GRefOrder; GOrderDirection get direction; GRefOrderField get field; @@ -3978,7 +3992,7 @@ abstract class GRegenerateEnterpriseIdentityProviderRecoveryCodesInput GRegenerateEnterpriseIdentityProviderRecoveryCodesInput._(); factory GRegenerateEnterpriseIdentityProviderRecoveryCodesInput( - [Function( + [void Function( GRegenerateEnterpriseIdentityProviderRecoveryCodesInputBuilder b) updates]) = _$GRegenerateEnterpriseIdentityProviderRecoveryCodesInput; @@ -4038,7 +4052,7 @@ abstract class GRegistryPackageMetadatum GRegistryPackageMetadatum._(); factory GRegistryPackageMetadatum( - [Function(GRegistryPackageMetadatumBuilder b) updates]) = + [void Function(GRegistryPackageMetadatumBuilder b) updates]) = _$GRegistryPackageMetadatum; String get name; @@ -4091,7 +4105,7 @@ abstract class GReleaseOrder implements Built { GReleaseOrder._(); - factory GReleaseOrder([Function(GReleaseOrderBuilder b) updates]) = + factory GReleaseOrder([void Function(GReleaseOrderBuilder b) updates]) = _$GReleaseOrder; GOrderDirection get direction; @@ -4133,8 +4147,8 @@ abstract class GRemoveAssigneesFromAssignableInput GRemoveAssigneesFromAssignableInput._(); factory GRemoveAssigneesFromAssignableInput( - [Function(GRemoveAssigneesFromAssignableInputBuilder b) updates]) = - _$GRemoveAssigneesFromAssignableInput; + [void Function(GRemoveAssigneesFromAssignableInputBuilder b) + updates]) = _$GRemoveAssigneesFromAssignableInput; String get assignableId; BuiltList get assigneeIds; @@ -4161,7 +4175,7 @@ abstract class GRemoveEnterpriseAdminInput GRemoveEnterpriseAdminInput._(); factory GRemoveEnterpriseAdminInput( - [Function(GRemoveEnterpriseAdminInputBuilder b) updates]) = + [void Function(GRemoveEnterpriseAdminInputBuilder b) updates]) = _$GRemoveEnterpriseAdminInput; String? get clientMutationId; @@ -4189,8 +4203,8 @@ abstract class GRemoveEnterpriseOrganizationInput GRemoveEnterpriseOrganizationInput._(); factory GRemoveEnterpriseOrganizationInput( - [Function(GRemoveEnterpriseOrganizationInputBuilder b) updates]) = - _$GRemoveEnterpriseOrganizationInput; + [void Function(GRemoveEnterpriseOrganizationInputBuilder b) + updates]) = _$GRemoveEnterpriseOrganizationInput; String? get clientMutationId; String get enterpriseId; @@ -4218,7 +4232,7 @@ abstract class GRemoveLabelsFromLabelableInput GRemoveLabelsFromLabelableInput._(); factory GRemoveLabelsFromLabelableInput( - [Function(GRemoveLabelsFromLabelableInputBuilder b) updates]) = + [void Function(GRemoveLabelsFromLabelableInputBuilder b) updates]) = _$GRemoveLabelsFromLabelableInput; String? get clientMutationId; @@ -4246,7 +4260,7 @@ abstract class GRemoveOutsideCollaboratorInput GRemoveOutsideCollaboratorInput._(); factory GRemoveOutsideCollaboratorInput( - [Function(GRemoveOutsideCollaboratorInputBuilder b) updates]) = + [void Function(GRemoveOutsideCollaboratorInputBuilder b) updates]) = _$GRemoveOutsideCollaboratorInput; String? get clientMutationId; @@ -4272,7 +4286,7 @@ abstract class GRemoveReactionInput GRemoveReactionInput._(); factory GRemoveReactionInput( - [Function(GRemoveReactionInputBuilder b) updates]) = + [void Function(GRemoveReactionInputBuilder b) updates]) = _$GRemoveReactionInput; String? get clientMutationId; @@ -4297,7 +4311,7 @@ abstract class GRemoveStarInput implements Built { GRemoveStarInput._(); - factory GRemoveStarInput([Function(GRemoveStarInputBuilder b) updates]) = + factory GRemoveStarInput([void Function(GRemoveStarInputBuilder b) updates]) = _$GRemoveStarInput; String? get clientMutationId; @@ -4321,7 +4335,8 @@ abstract class GReopenIssueInput implements Built { GReopenIssueInput._(); - factory GReopenIssueInput([Function(GReopenIssueInputBuilder b) updates]) = + factory GReopenIssueInput( + [void Function(GReopenIssueInputBuilder b) updates]) = _$GReopenIssueInput; String? get clientMutationId; @@ -4346,7 +4361,7 @@ abstract class GReopenPullRequestInput GReopenPullRequestInput._(); factory GReopenPullRequestInput( - [Function(GReopenPullRequestInputBuilder b) updates]) = + [void Function(GReopenPullRequestInputBuilder b) updates]) = _$GReopenPullRequestInput; String? get clientMutationId; @@ -4575,7 +4590,7 @@ abstract class GRepositoryInvitationOrder GRepositoryInvitationOrder._(); factory GRepositoryInvitationOrder( - [Function(GRepositoryInvitationOrderBuilder b) updates]) = + [void Function(GRepositoryInvitationOrderBuilder b) updates]) = _$GRepositoryInvitationOrder; GOrderDirection get direction; @@ -4640,7 +4655,7 @@ abstract class GRepositoryOrder implements Built { GRepositoryOrder._(); - factory GRepositoryOrder([Function(GRepositoryOrderBuilder b) updates]) = + factory GRepositoryOrder([void Function(GRepositoryOrderBuilder b) updates]) = _$GRepositoryOrder; GOrderDirection get direction; @@ -4750,7 +4765,7 @@ abstract class GRequestReviewsInput GRequestReviewsInput._(); factory GRequestReviewsInput( - [Function(GRequestReviewsInputBuilder b) updates]) = + [void Function(GRequestReviewsInputBuilder b) updates]) = _$GRequestReviewsInput; String? get clientMutationId; @@ -4779,7 +4794,7 @@ abstract class GResolveReviewThreadInput GResolveReviewThreadInput._(); factory GResolveReviewThreadInput( - [Function(GResolveReviewThreadInputBuilder b) updates]) = + [void Function(GResolveReviewThreadInputBuilder b) updates]) = _$GResolveReviewThreadInput; String? get clientMutationId; @@ -4849,7 +4864,7 @@ abstract class GSavedReplyOrder implements Built { GSavedReplyOrder._(); - factory GSavedReplyOrder([Function(GSavedReplyOrderBuilder b) updates]) = + factory GSavedReplyOrder([void Function(GSavedReplyOrderBuilder b) updates]) = _$GSavedReplyOrder; GOrderDirection get direction; @@ -4937,7 +4952,7 @@ abstract class GSecurityAdvisoryIdentifierFilter GSecurityAdvisoryIdentifierFilter._(); factory GSecurityAdvisoryIdentifierFilter( - [Function(GSecurityAdvisoryIdentifierFilterBuilder b) updates]) = + [void Function(GSecurityAdvisoryIdentifierFilterBuilder b) updates]) = _$GSecurityAdvisoryIdentifierFilter; GSecurityAdvisoryIdentifierType get type; @@ -4982,7 +4997,7 @@ abstract class GSecurityAdvisoryOrder GSecurityAdvisoryOrder._(); factory GSecurityAdvisoryOrder( - [Function(GSecurityAdvisoryOrderBuilder b) updates]) = + [void Function(GSecurityAdvisoryOrderBuilder b) updates]) = _$GSecurityAdvisoryOrder; GOrderDirection get direction; @@ -5050,7 +5065,7 @@ abstract class GSecurityVulnerabilityOrder GSecurityVulnerabilityOrder._(); factory GSecurityVulnerabilityOrder( - [Function(GSecurityVulnerabilityOrderBuilder b) updates]) = + [void Function(GSecurityVulnerabilityOrderBuilder b) updates]) = _$GSecurityVulnerabilityOrder; GOrderDirection get direction; @@ -5090,7 +5105,8 @@ abstract class GSponsorsTierOrder implements Built { GSponsorsTierOrder._(); - factory GSponsorsTierOrder([Function(GSponsorsTierOrderBuilder b) updates]) = + factory GSponsorsTierOrder( + [void Function(GSponsorsTierOrderBuilder b) updates]) = _$GSponsorsTierOrder; GOrderDirection get direction; @@ -5133,7 +5149,8 @@ abstract class GSponsorshipOrder implements Built { GSponsorshipOrder._(); - factory GSponsorshipOrder([Function(GSponsorshipOrderBuilder b) updates]) = + factory GSponsorshipOrder( + [void Function(GSponsorshipOrderBuilder b) updates]) = _$GSponsorshipOrder; GOrderDirection get direction; @@ -5189,7 +5206,8 @@ class GSponsorshipPrivacy extends EnumClass { abstract class GStarOrder implements Built { GStarOrder._(); - factory GStarOrder([Function(GStarOrderBuilder b) updates]) = _$GStarOrder; + factory GStarOrder([void Function(GStarOrderBuilder b) updates]) = + _$GStarOrder; GOrderDirection get direction; GStarOrderField get field; @@ -5247,7 +5265,7 @@ abstract class GSubmitPullRequestReviewInput GSubmitPullRequestReviewInput._(); factory GSubmitPullRequestReviewInput( - [Function(GSubmitPullRequestReviewInputBuilder b) updates]) = + [void Function(GSubmitPullRequestReviewInputBuilder b) updates]) = _$GSubmitPullRequestReviewInput; String? get body; @@ -5295,7 +5313,7 @@ abstract class GTeamDiscussionCommentOrder GTeamDiscussionCommentOrder._(); factory GTeamDiscussionCommentOrder( - [Function(GTeamDiscussionCommentOrderBuilder b) updates]) = + [void Function(GTeamDiscussionCommentOrderBuilder b) updates]) = _$GTeamDiscussionCommentOrder; GOrderDirection get direction; @@ -5336,7 +5354,7 @@ abstract class GTeamDiscussionOrder GTeamDiscussionOrder._(); factory GTeamDiscussionOrder( - [Function(GTeamDiscussionOrderBuilder b) updates]) = + [void Function(GTeamDiscussionOrderBuilder b) updates]) = _$GTeamDiscussionOrder; GOrderDirection get direction; @@ -5376,7 +5394,7 @@ abstract class GTeamMemberOrder implements Built { GTeamMemberOrder._(); - factory GTeamMemberOrder([Function(GTeamMemberOrderBuilder b) updates]) = + factory GTeamMemberOrder([void Function(GTeamMemberOrderBuilder b) updates]) = _$GTeamMemberOrder; GOrderDirection get direction; @@ -5451,7 +5469,8 @@ class GTeamMembershipType extends EnumClass { abstract class GTeamOrder implements Built { GTeamOrder._(); - factory GTeamOrder([Function(GTeamOrderBuilder b) updates]) = _$GTeamOrder; + factory GTeamOrder([void Function(GTeamOrderBuilder b) updates]) = + _$GTeamOrder; GOrderDirection get direction; GTeamOrderField get field; @@ -5501,7 +5520,7 @@ abstract class GTeamRepositoryOrder GTeamRepositoryOrder._(); factory GTeamRepositoryOrder( - [Function(GTeamRepositoryOrderBuilder b) updates]) = + [void Function(GTeamRepositoryOrderBuilder b) updates]) = _$GTeamRepositoryOrder; GOrderDirection get direction; @@ -5595,7 +5614,8 @@ abstract class GTransferIssueInput GTransferIssueInput._(); factory GTransferIssueInput( - [Function(GTransferIssueInputBuilder b) updates]) = _$GTransferIssueInput; + [void Function(GTransferIssueInputBuilder b) updates]) = + _$GTransferIssueInput; String? get clientMutationId; String get issueId; @@ -5633,7 +5653,7 @@ abstract class GUnarchiveRepositoryInput GUnarchiveRepositoryInput._(); factory GUnarchiveRepositoryInput( - [Function(GUnarchiveRepositoryInputBuilder b) updates]) = + [void Function(GUnarchiveRepositoryInputBuilder b) updates]) = _$GUnarchiveRepositoryInput; String? get clientMutationId; @@ -5657,7 +5677,8 @@ abstract class GUnfollowUserInput implements Built { GUnfollowUserInput._(); - factory GUnfollowUserInput([Function(GUnfollowUserInputBuilder b) updates]) = + factory GUnfollowUserInput( + [void Function(GUnfollowUserInputBuilder b) updates]) = _$GUnfollowUserInput; String? get clientMutationId; @@ -5684,7 +5705,7 @@ abstract class GUnlinkRepositoryFromProjectInput GUnlinkRepositoryFromProjectInput._(); factory GUnlinkRepositoryFromProjectInput( - [Function(GUnlinkRepositoryFromProjectInputBuilder b) updates]) = + [void Function(GUnlinkRepositoryFromProjectInputBuilder b) updates]) = _$GUnlinkRepositoryFromProjectInput; String? get clientMutationId; @@ -5711,7 +5732,7 @@ abstract class GUnlockLockableInput GUnlockLockableInput._(); factory GUnlockLockableInput( - [Function(GUnlockLockableInputBuilder b) updates]) = + [void Function(GUnlockLockableInputBuilder b) updates]) = _$GUnlockLockableInput; String? get clientMutationId; @@ -5738,7 +5759,7 @@ abstract class GUnmarkIssueAsDuplicateInput GUnmarkIssueAsDuplicateInput._(); factory GUnmarkIssueAsDuplicateInput( - [Function(GUnmarkIssueAsDuplicateInputBuilder b) updates]) = + [void Function(GUnmarkIssueAsDuplicateInputBuilder b) updates]) = _$GUnmarkIssueAsDuplicateInput; String get canonicalId; @@ -5765,7 +5786,7 @@ abstract class GUnresolveReviewThreadInput GUnresolveReviewThreadInput._(); factory GUnresolveReviewThreadInput( - [Function(GUnresolveReviewThreadInputBuilder b) updates]) = + [void Function(GUnresolveReviewThreadInputBuilder b) updates]) = _$GUnresolveReviewThreadInput; String? get clientMutationId; @@ -5792,7 +5813,7 @@ abstract class GUpdateBranchProtectionRuleInput GUpdateBranchProtectionRuleInput._(); factory GUpdateBranchProtectionRuleInput( - [Function(GUpdateBranchProtectionRuleInputBuilder b) updates]) = + [void Function(GUpdateBranchProtectionRuleInputBuilder b) updates]) = _$GUpdateBranchProtectionRuleInput; String get branchProtectionRuleId; @@ -5834,7 +5855,8 @@ abstract class GUpdateEnterpriseActionExecutionCapabilitySettingInput GUpdateEnterpriseActionExecutionCapabilitySettingInput._(); factory GUpdateEnterpriseActionExecutionCapabilitySettingInput( - [Function(GUpdateEnterpriseActionExecutionCapabilitySettingInputBuilder b) + [void Function( + GUpdateEnterpriseActionExecutionCapabilitySettingInputBuilder b) updates]) = _$GUpdateEnterpriseActionExecutionCapabilitySettingInput; GActionExecutionCapabilitySetting get capability; @@ -5864,7 +5886,7 @@ abstract class GUpdateEnterpriseAdministratorRoleInput GUpdateEnterpriseAdministratorRoleInput._(); factory GUpdateEnterpriseAdministratorRoleInput( - [Function(GUpdateEnterpriseAdministratorRoleInputBuilder b) + [void Function(GUpdateEnterpriseAdministratorRoleInputBuilder b) updates]) = _$GUpdateEnterpriseAdministratorRoleInput; String? get clientMutationId; @@ -5894,7 +5916,7 @@ abstract class GUpdateEnterpriseAllowPrivateRepositoryForkingSettingInput GUpdateEnterpriseAllowPrivateRepositoryForkingSettingInput._(); factory GUpdateEnterpriseAllowPrivateRepositoryForkingSettingInput( - [Function( + [void Function( GUpdateEnterpriseAllowPrivateRepositoryForkingSettingInputBuilder b) updates]) = _$GUpdateEnterpriseAllowPrivateRepositoryForkingSettingInput; @@ -5926,7 +5948,7 @@ abstract class GUpdateEnterpriseDefaultRepositoryPermissionSettingInput GUpdateEnterpriseDefaultRepositoryPermissionSettingInput._(); factory GUpdateEnterpriseDefaultRepositoryPermissionSettingInput( - [Function( + [void Function( GUpdateEnterpriseDefaultRepositoryPermissionSettingInputBuilder b) updates]) = _$GUpdateEnterpriseDefaultRepositoryPermissionSettingInput; @@ -5957,7 +5979,7 @@ abstract class GUpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingInput GUpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingInput._(); factory GUpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingInput( - [Function( + [void Function( GUpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingInputBuilder b) updates]) = @@ -5992,7 +6014,7 @@ abstract class GUpdateEnterpriseMembersCanCreateRepositoriesSettingInput GUpdateEnterpriseMembersCanCreateRepositoriesSettingInput._(); factory GUpdateEnterpriseMembersCanCreateRepositoriesSettingInput( - [Function( + [void Function( GUpdateEnterpriseMembersCanCreateRepositoriesSettingInputBuilder b) updates]) = _$GUpdateEnterpriseMembersCanCreateRepositoriesSettingInput; @@ -6028,7 +6050,8 @@ abstract class GUpdateEnterpriseMembersCanDeleteIssuesSettingInput GUpdateEnterpriseMembersCanDeleteIssuesSettingInput._(); factory GUpdateEnterpriseMembersCanDeleteIssuesSettingInput( - [Function(GUpdateEnterpriseMembersCanDeleteIssuesSettingInputBuilder b) + [void Function( + GUpdateEnterpriseMembersCanDeleteIssuesSettingInputBuilder b) updates]) = _$GUpdateEnterpriseMembersCanDeleteIssuesSettingInput; String? get clientMutationId; @@ -6058,7 +6081,7 @@ abstract class GUpdateEnterpriseMembersCanDeleteRepositoriesSettingInput GUpdateEnterpriseMembersCanDeleteRepositoriesSettingInput._(); factory GUpdateEnterpriseMembersCanDeleteRepositoriesSettingInput( - [Function( + [void Function( GUpdateEnterpriseMembersCanDeleteRepositoriesSettingInputBuilder b) updates]) = _$GUpdateEnterpriseMembersCanDeleteRepositoriesSettingInput; @@ -6090,7 +6113,7 @@ abstract class GUpdateEnterpriseMembersCanInviteCollaboratorsSettingInput GUpdateEnterpriseMembersCanInviteCollaboratorsSettingInput._(); factory GUpdateEnterpriseMembersCanInviteCollaboratorsSettingInput( - [Function( + [void Function( GUpdateEnterpriseMembersCanInviteCollaboratorsSettingInputBuilder b) updates]) = _$GUpdateEnterpriseMembersCanInviteCollaboratorsSettingInput; @@ -6122,7 +6145,8 @@ abstract class GUpdateEnterpriseMembersCanMakePurchasesSettingInput GUpdateEnterpriseMembersCanMakePurchasesSettingInput._(); factory GUpdateEnterpriseMembersCanMakePurchasesSettingInput( - [Function(GUpdateEnterpriseMembersCanMakePurchasesSettingInputBuilder b) + [void Function( + GUpdateEnterpriseMembersCanMakePurchasesSettingInputBuilder b) updates]) = _$GUpdateEnterpriseMembersCanMakePurchasesSettingInput; String? get clientMutationId; @@ -6152,7 +6176,7 @@ abstract class GUpdateEnterpriseMembersCanUpdateProtectedBranchesSettingInput GUpdateEnterpriseMembersCanUpdateProtectedBranchesSettingInput._(); factory GUpdateEnterpriseMembersCanUpdateProtectedBranchesSettingInput( - [Function( + [void Function( GUpdateEnterpriseMembersCanUpdateProtectedBranchesSettingInputBuilder b) updates]) = @@ -6187,7 +6211,7 @@ abstract class GUpdateEnterpriseMembersCanViewDependencyInsightsSettingInput GUpdateEnterpriseMembersCanViewDependencyInsightsSettingInput._(); factory GUpdateEnterpriseMembersCanViewDependencyInsightsSettingInput( - [Function( + [void Function( GUpdateEnterpriseMembersCanViewDependencyInsightsSettingInputBuilder b) updates]) = @@ -6222,7 +6246,7 @@ abstract class GUpdateEnterpriseOrganizationProjectsSettingInput GUpdateEnterpriseOrganizationProjectsSettingInput._(); factory GUpdateEnterpriseOrganizationProjectsSettingInput( - [Function(GUpdateEnterpriseOrganizationProjectsSettingInputBuilder b) + [void Function(GUpdateEnterpriseOrganizationProjectsSettingInputBuilder b) updates]) = _$GUpdateEnterpriseOrganizationProjectsSettingInput; String? get clientMutationId; @@ -6252,7 +6276,7 @@ abstract class GUpdateEnterpriseProfileInput GUpdateEnterpriseProfileInput._(); factory GUpdateEnterpriseProfileInput( - [Function(GUpdateEnterpriseProfileInputBuilder b) updates]) = + [void Function(GUpdateEnterpriseProfileInputBuilder b) updates]) = _$GUpdateEnterpriseProfileInput; String? get clientMutationId; @@ -6283,7 +6307,7 @@ abstract class GUpdateEnterpriseRepositoryProjectsSettingInput GUpdateEnterpriseRepositoryProjectsSettingInput._(); factory GUpdateEnterpriseRepositoryProjectsSettingInput( - [Function(GUpdateEnterpriseRepositoryProjectsSettingInputBuilder b) + [void Function(GUpdateEnterpriseRepositoryProjectsSettingInputBuilder b) updates]) = _$GUpdateEnterpriseRepositoryProjectsSettingInput; String? get clientMutationId; @@ -6313,7 +6337,7 @@ abstract class GUpdateEnterpriseTeamDiscussionsSettingInput GUpdateEnterpriseTeamDiscussionsSettingInput._(); factory GUpdateEnterpriseTeamDiscussionsSettingInput( - [Function(GUpdateEnterpriseTeamDiscussionsSettingInputBuilder b) + [void Function(GUpdateEnterpriseTeamDiscussionsSettingInputBuilder b) updates]) = _$GUpdateEnterpriseTeamDiscussionsSettingInput; String? get clientMutationId; @@ -6343,7 +6367,7 @@ abstract class GUpdateEnterpriseTwoFactorAuthenticationRequiredSettingInput GUpdateEnterpriseTwoFactorAuthenticationRequiredSettingInput._(); factory GUpdateEnterpriseTwoFactorAuthenticationRequiredSettingInput( - [Function( + [void Function( GUpdateEnterpriseTwoFactorAuthenticationRequiredSettingInputBuilder b) updates]) = @@ -6376,7 +6400,7 @@ abstract class GUpdateIssueCommentInput GUpdateIssueCommentInput._(); factory GUpdateIssueCommentInput( - [Function(GUpdateIssueCommentInputBuilder b) updates]) = + [void Function(GUpdateIssueCommentInputBuilder b) updates]) = _$GUpdateIssueCommentInput; String get body; @@ -6401,7 +6425,8 @@ abstract class GUpdateIssueInput implements Built { GUpdateIssueInput._(); - factory GUpdateIssueInput([Function(GUpdateIssueInputBuilder b) updates]) = + factory GUpdateIssueInput( + [void Function(GUpdateIssueInputBuilder b) updates]) = _$GUpdateIssueInput; BuiltList? get assigneeIds; @@ -6433,7 +6458,7 @@ abstract class GUpdateProjectCardInput GUpdateProjectCardInput._(); factory GUpdateProjectCardInput( - [Function(GUpdateProjectCardInputBuilder b) updates]) = + [void Function(GUpdateProjectCardInputBuilder b) updates]) = _$GUpdateProjectCardInput; String? get clientMutationId; @@ -6461,7 +6486,7 @@ abstract class GUpdateProjectColumnInput GUpdateProjectColumnInput._(); factory GUpdateProjectColumnInput( - [Function(GUpdateProjectColumnInputBuilder b) updates]) = + [void Function(GUpdateProjectColumnInputBuilder b) updates]) = _$GUpdateProjectColumnInput; String? get clientMutationId; @@ -6487,7 +6512,8 @@ abstract class GUpdateProjectInput GUpdateProjectInput._(); factory GUpdateProjectInput( - [Function(GUpdateProjectInputBuilder b) updates]) = _$GUpdateProjectInput; + [void Function(GUpdateProjectInputBuilder b) updates]) = + _$GUpdateProjectInput; String? get body; String? get clientMutationId; @@ -6515,7 +6541,7 @@ abstract class GUpdatePullRequestInput GUpdatePullRequestInput._(); factory GUpdatePullRequestInput( - [Function(GUpdatePullRequestInputBuilder b) updates]) = + [void Function(GUpdatePullRequestInputBuilder b) updates]) = _$GUpdatePullRequestInput; BuiltList? get assigneeIds; @@ -6551,8 +6577,8 @@ abstract class GUpdatePullRequestReviewCommentInput GUpdatePullRequestReviewCommentInput._(); factory GUpdatePullRequestReviewCommentInput( - [Function(GUpdatePullRequestReviewCommentInputBuilder b) updates]) = - _$GUpdatePullRequestReviewCommentInput; + [void Function(GUpdatePullRequestReviewCommentInputBuilder b) + updates]) = _$GUpdatePullRequestReviewCommentInput; String get body; String? get clientMutationId; @@ -6580,7 +6606,7 @@ abstract class GUpdatePullRequestReviewInput GUpdatePullRequestReviewInput._(); factory GUpdatePullRequestReviewInput( - [Function(GUpdatePullRequestReviewInputBuilder b) updates]) = + [void Function(GUpdatePullRequestReviewInputBuilder b) updates]) = _$GUpdatePullRequestReviewInput; String get body; @@ -6605,7 +6631,7 @@ abstract class GUpdateRefInput implements Built { GUpdateRefInput._(); - factory GUpdateRefInput([Function(GUpdateRefInputBuilder b) updates]) = + factory GUpdateRefInput([void Function(GUpdateRefInputBuilder b) updates]) = _$GUpdateRefInput; String? get clientMutationId; @@ -6632,7 +6658,7 @@ abstract class GUpdateRepositoryInput GUpdateRepositoryInput._(); factory GUpdateRepositoryInput( - [Function(GUpdateRepositoryInputBuilder b) updates]) = + [void Function(GUpdateRepositoryInputBuilder b) updates]) = _$GUpdateRepositoryInput; String? get clientMutationId; @@ -6665,7 +6691,7 @@ abstract class GUpdateSubscriptionInput GUpdateSubscriptionInput._(); factory GUpdateSubscriptionInput( - [Function(GUpdateSubscriptionInputBuilder b) updates]) = + [void Function(GUpdateSubscriptionInputBuilder b) updates]) = _$GUpdateSubscriptionInput; String? get clientMutationId; @@ -6693,7 +6719,7 @@ abstract class GUpdateTeamDiscussionCommentInput GUpdateTeamDiscussionCommentInput._(); factory GUpdateTeamDiscussionCommentInput( - [Function(GUpdateTeamDiscussionCommentInputBuilder b) updates]) = + [void Function(GUpdateTeamDiscussionCommentInputBuilder b) updates]) = _$GUpdateTeamDiscussionCommentInput; String get body; @@ -6722,7 +6748,7 @@ abstract class GUpdateTeamDiscussionInput GUpdateTeamDiscussionInput._(); factory GUpdateTeamDiscussionInput( - [Function(GUpdateTeamDiscussionInputBuilder b) updates]) = + [void Function(GUpdateTeamDiscussionInputBuilder b) updates]) = _$GUpdateTeamDiscussionInput; String? get body; @@ -6750,7 +6776,8 @@ abstract class GUpdateTopicsInput implements Built { GUpdateTopicsInput._(); - factory GUpdateTopicsInput([Function(GUpdateTopicsInputBuilder b) updates]) = + factory GUpdateTopicsInput( + [void Function(GUpdateTopicsInputBuilder b) updates]) = _$GUpdateTopicsInput; String? get clientMutationId; @@ -6797,7 +6824,7 @@ abstract class GUserStatusOrder implements Built { GUserStatusOrder._(); - factory GUserStatusOrder([Function(GUserStatusOrderBuilder b) updates]) = + factory GUserStatusOrder([void Function(GUserStatusOrderBuilder b) updates]) = _$GUserStatusOrder; GOrderDirection get direction; diff --git a/examples/gql_example_flutter/lib/src/all_pokemon/graphql/__generated__/all_pokemon.data.gql.dart b/examples/gql_example_flutter/lib/src/all_pokemon/graphql/__generated__/all_pokemon.data.gql.dart index 802d5b42..cde03f0d 100644 --- a/examples/gql_example_flutter/lib/src/all_pokemon/graphql/__generated__/all_pokemon.data.gql.dart +++ b/examples/gql_example_flutter/lib/src/all_pokemon/graphql/__generated__/all_pokemon.data.gql.dart @@ -16,7 +16,7 @@ abstract class GAllPokemonData implements Built { GAllPokemonData._(); - factory GAllPokemonData([Function(GAllPokemonDataBuilder b) updates]) = + factory GAllPokemonData([void Function(GAllPokemonDataBuilder b) updates]) = _$GAllPokemonData; static void _initializeBuilder(GAllPokemonDataBuilder b) => @@ -47,7 +47,7 @@ abstract class GAllPokemonData_pokemons GAllPokemonData_pokemons._(); factory GAllPokemonData_pokemons( - [Function(GAllPokemonData_pokemonsBuilder b) updates]) = + [void Function(GAllPokemonData_pokemonsBuilder b) updates]) = _$GAllPokemonData_pokemons; static void _initializeBuilder(GAllPokemonData_pokemonsBuilder b) => diff --git a/examples/gql_example_flutter/lib/src/all_pokemon/graphql/__generated__/all_pokemon.req.gql.dart b/examples/gql_example_flutter/lib/src/all_pokemon/graphql/__generated__/all_pokemon.req.gql.dart index 72b29d9e..3d8a4fb1 100644 --- a/examples/gql_example_flutter/lib/src/all_pokemon/graphql/__generated__/all_pokemon.req.gql.dart +++ b/examples/gql_example_flutter/lib/src/all_pokemon/graphql/__generated__/all_pokemon.req.gql.dart @@ -17,7 +17,8 @@ part 'all_pokemon.req.gql.g.dart'; abstract class GAllPokemon implements Built { GAllPokemon._(); - factory GAllPokemon([Function(GAllPokemonBuilder b) updates]) = _$GAllPokemon; + factory GAllPokemon([void Function(GAllPokemonBuilder b) updates]) = + _$GAllPokemon; static void _initializeBuilder(GAllPokemonBuilder b) => b ..operation = _i1.Operation( diff --git a/examples/gql_example_flutter/lib/src/all_pokemon/graphql/__generated__/all_pokemon.var.gql.dart b/examples/gql_example_flutter/lib/src/all_pokemon/graphql/__generated__/all_pokemon.var.gql.dart index ad061ff9..28905771 100644 --- a/examples/gql_example_flutter/lib/src/all_pokemon/graphql/__generated__/all_pokemon.var.gql.dart +++ b/examples/gql_example_flutter/lib/src/all_pokemon/graphql/__generated__/all_pokemon.var.gql.dart @@ -13,7 +13,7 @@ abstract class GAllPokemonVars implements Built { GAllPokemonVars._(); - factory GAllPokemonVars([Function(GAllPokemonVarsBuilder b) updates]) = + factory GAllPokemonVars([void Function(GAllPokemonVarsBuilder b) updates]) = _$GAllPokemonVars; int get first; diff --git a/examples/gql_example_flutter/lib/src/pokemon_card/graphql/__generated__/nested_fragment.data.gql.dart b/examples/gql_example_flutter/lib/src/pokemon_card/graphql/__generated__/nested_fragment.data.gql.dart index d1dbff1f..3df5e63c 100644 --- a/examples/gql_example_flutter/lib/src/pokemon_card/graphql/__generated__/nested_fragment.data.gql.dart +++ b/examples/gql_example_flutter/lib/src/pokemon_card/graphql/__generated__/nested_fragment.data.gql.dart @@ -23,7 +23,8 @@ abstract class GNestedFragmentData GNestedFragmentData._(); factory GNestedFragmentData( - [Function(GNestedFragmentDataBuilder b) updates]) = _$GNestedFragmentData; + [void Function(GNestedFragmentDataBuilder b) updates]) = + _$GNestedFragmentData; static void _initializeBuilder(GNestedFragmentDataBuilder b) => b..G__typename = 'Pokemon'; diff --git a/examples/gql_example_flutter/lib/src/pokemon_card/graphql/__generated__/nested_fragment.var.gql.dart b/examples/gql_example_flutter/lib/src/pokemon_card/graphql/__generated__/nested_fragment.var.gql.dart index a280311f..77d7e482 100644 --- a/examples/gql_example_flutter/lib/src/pokemon_card/graphql/__generated__/nested_fragment.var.gql.dart +++ b/examples/gql_example_flutter/lib/src/pokemon_card/graphql/__generated__/nested_fragment.var.gql.dart @@ -14,7 +14,8 @@ abstract class GNestedFragmentVars GNestedFragmentVars._(); factory GNestedFragmentVars( - [Function(GNestedFragmentVarsBuilder b) updates]) = _$GNestedFragmentVars; + [void Function(GNestedFragmentVarsBuilder b) updates]) = + _$GNestedFragmentVars; static Serializer get serializer => _$gNestedFragmentVarsSerializer; diff --git a/examples/gql_example_flutter/lib/src/pokemon_card/graphql/__generated__/pokemon_card_fragment.data.gql.dart b/examples/gql_example_flutter/lib/src/pokemon_card/graphql/__generated__/pokemon_card_fragment.data.gql.dart index 126d5358..6f502c1a 100644 --- a/examples/gql_example_flutter/lib/src/pokemon_card/graphql/__generated__/pokemon_card_fragment.data.gql.dart +++ b/examples/gql_example_flutter/lib/src/pokemon_card/graphql/__generated__/pokemon_card_fragment.data.gql.dart @@ -31,7 +31,7 @@ abstract class GPokemonCardData _i1.GNestedFragment { GPokemonCardData._(); - factory GPokemonCardData([Function(GPokemonCardDataBuilder b) updates]) = + factory GPokemonCardData([void Function(GPokemonCardDataBuilder b) updates]) = _$GPokemonCardData; static void _initializeBuilder(GPokemonCardDataBuilder b) => diff --git a/examples/gql_example_flutter/lib/src/pokemon_card/graphql/__generated__/pokemon_card_fragment.var.gql.dart b/examples/gql_example_flutter/lib/src/pokemon_card/graphql/__generated__/pokemon_card_fragment.var.gql.dart index 8128d3ce..7b17bcb0 100644 --- a/examples/gql_example_flutter/lib/src/pokemon_card/graphql/__generated__/pokemon_card_fragment.var.gql.dart +++ b/examples/gql_example_flutter/lib/src/pokemon_card/graphql/__generated__/pokemon_card_fragment.var.gql.dart @@ -13,7 +13,7 @@ abstract class GPokemonCardVars implements Built { GPokemonCardVars._(); - factory GPokemonCardVars([Function(GPokemonCardVarsBuilder b) updates]) = + factory GPokemonCardVars([void Function(GPokemonCardVarsBuilder b) updates]) = _$GPokemonCardVars; static Serializer get serializer => diff --git a/examples/gql_example_flutter/lib/src/pokemon_detail/graphql/__generated__/pokemon_detail.data.gql.dart b/examples/gql_example_flutter/lib/src/pokemon_detail/graphql/__generated__/pokemon_detail.data.gql.dart index afe60c22..d9995455 100644 --- a/examples/gql_example_flutter/lib/src/pokemon_detail/graphql/__generated__/pokemon_detail.data.gql.dart +++ b/examples/gql_example_flutter/lib/src/pokemon_detail/graphql/__generated__/pokemon_detail.data.gql.dart @@ -15,7 +15,8 @@ abstract class GPokemonDetailData implements Built { GPokemonDetailData._(); - factory GPokemonDetailData([Function(GPokemonDetailDataBuilder b) updates]) = + factory GPokemonDetailData( + [void Function(GPokemonDetailDataBuilder b) updates]) = _$GPokemonDetailData; static void _initializeBuilder(GPokemonDetailDataBuilder b) => @@ -46,7 +47,7 @@ abstract class GPokemonDetailData_pokemon GPokemonDetailData_pokemon._(); factory GPokemonDetailData_pokemon( - [Function(GPokemonDetailData_pokemonBuilder b) updates]) = + [void Function(GPokemonDetailData_pokemonBuilder b) updates]) = _$GPokemonDetailData_pokemon; static void _initializeBuilder(GPokemonDetailData_pokemonBuilder b) => @@ -88,7 +89,7 @@ abstract class GPokemonDetailData_pokemon_weight GPokemonDetailData_pokemon_weight._(); factory GPokemonDetailData_pokemon_weight( - [Function(GPokemonDetailData_pokemon_weightBuilder b) updates]) = + [void Function(GPokemonDetailData_pokemon_weightBuilder b) updates]) = _$GPokemonDetailData_pokemon_weight; static void _initializeBuilder(GPokemonDetailData_pokemon_weightBuilder b) => @@ -121,7 +122,7 @@ abstract class GPokemonDetailData_pokemon_height GPokemonDetailData_pokemon_height._(); factory GPokemonDetailData_pokemon_height( - [Function(GPokemonDetailData_pokemon_heightBuilder b) updates]) = + [void Function(GPokemonDetailData_pokemon_heightBuilder b) updates]) = _$GPokemonDetailData_pokemon_height; static void _initializeBuilder(GPokemonDetailData_pokemon_heightBuilder b) => diff --git a/examples/gql_example_flutter/lib/src/pokemon_detail/graphql/__generated__/pokemon_detail.req.gql.dart b/examples/gql_example_flutter/lib/src/pokemon_detail/graphql/__generated__/pokemon_detail.req.gql.dart index e98fc233..662f0cb0 100644 --- a/examples/gql_example_flutter/lib/src/pokemon_detail/graphql/__generated__/pokemon_detail.req.gql.dart +++ b/examples/gql_example_flutter/lib/src/pokemon_detail/graphql/__generated__/pokemon_detail.req.gql.dart @@ -18,7 +18,7 @@ abstract class GPokemonDetail implements Built { GPokemonDetail._(); - factory GPokemonDetail([Function(GPokemonDetailBuilder b) updates]) = + factory GPokemonDetail([void Function(GPokemonDetailBuilder b) updates]) = _$GPokemonDetail; static void _initializeBuilder(GPokemonDetailBuilder b) => b diff --git a/examples/gql_example_flutter/lib/src/pokemon_detail/graphql/__generated__/pokemon_detail.var.gql.dart b/examples/gql_example_flutter/lib/src/pokemon_detail/graphql/__generated__/pokemon_detail.var.gql.dart index f49b9547..34fa3248 100644 --- a/examples/gql_example_flutter/lib/src/pokemon_detail/graphql/__generated__/pokemon_detail.var.gql.dart +++ b/examples/gql_example_flutter/lib/src/pokemon_detail/graphql/__generated__/pokemon_detail.var.gql.dart @@ -13,7 +13,8 @@ abstract class GPokemonDetailVars implements Built { GPokemonDetailVars._(); - factory GPokemonDetailVars([Function(GPokemonDetailVarsBuilder b) updates]) = + factory GPokemonDetailVars( + [void Function(GPokemonDetailVarsBuilder b) updates]) = _$GPokemonDetailVars; String? get id; diff --git a/gql/README.md b/gql/README.md index 80d36ae5..c8ab10b9 100644 --- a/gql/README.md +++ b/gql/README.md @@ -18,7 +18,7 @@ [github-forks-link]: https://github.com/gql-dart/gql/network/members [discord-badge]: https://img.shields.io/discord/559455668810153989.svg?style=for-the-badge&logo=discord&logoColor=ffffff -[discord-link]: https://discord.gg/NryjpVa +[discord-link]: https://discord.gg/YBFCTXNbwY A package for working with GraphQL documents. diff --git a/gql_pedantic/README.md b/gql_pedantic/README.md index c58d0b63..dc1f0444 100644 --- a/gql_pedantic/README.md +++ b/gql_pedantic/README.md @@ -18,6 +18,6 @@ [github-forks-link]: https://github.com/gql-dart/gql/network/members [discord-badge]: https://img.shields.io/discord/559455668810153989.svg?style=for-the-badge&logo=discord&logoColor=ffffff -[discord-link]: https://discord.gg/NryjpVa +[discord-link]: https://discord.gg/YBFCTXNbwY Lint rules used by `gql-dart`. diff --git a/links/gql_dedupe_link/README.md b/links/gql_dedupe_link/README.md index c1268369..4fe45dea 100644 --- a/links/gql_dedupe_link/README.md +++ b/links/gql_dedupe_link/README.md @@ -18,7 +18,7 @@ [github-forks-link]: https://github.com/gql-dart/gql/network/members [discord-badge]: https://img.shields.io/discord/559455668810153989.svg?style=for-the-badge&logo=discord&logoColor=ffffff -[discord-link]: https://discord.gg/NryjpVa +[discord-link]: https://discord.gg/YBFCTXNbwY A GQL Link to deduplicate in-flight requests. diff --git a/links/gql_dedupe_link/lib/gql_dedupe_link.dart b/links/gql_dedupe_link/lib/gql_dedupe_link.dart index c121d891..e787fcb1 100644 --- a/links/gql_dedupe_link/lib/gql_dedupe_link.dart +++ b/links/gql_dedupe_link/lib/gql_dedupe_link.dart @@ -7,23 +7,32 @@ import "package:gql_link/gql_link.dart"; /// A [Link] to deduplicate [Request]s class DedupeLink extends Link { + final bool Function(Request request) _shouldDedupe; final Map> _inFlight = {}; + static bool _defaultShouldDedupe(Request request) => true; + + DedupeLink({ + bool Function(Request request) shouldDedupe = _defaultShouldDedupe, + }) : _shouldDedupe = shouldDedupe; + @override Stream request( Request request, [ NextLink? forward, ]) { - if (_inFlight.containsKey(request)) { + final shouldDedupe = _shouldDedupe(request); + + if (shouldDedupe && _inFlight.containsKey(request)) { return _inFlight[request]!.split(); } final splitter = StreamSplitter(forward!(request)); - _inFlight[request] = splitter; + if (shouldDedupe) _inFlight[request] = splitter; final closeSplitter = () { - _inFlight.remove(request); + if (shouldDedupe) _inFlight.remove(request); splitter.close(); }; diff --git a/links/gql_dedupe_link/test/gql_dedupe_link_test.dart b/links/gql_dedupe_link/test/gql_dedupe_link_test.dart index 0a1b2bd3..549807c7 100644 --- a/links/gql_dedupe_link/test/gql_dedupe_link_test.dart +++ b/links/gql_dedupe_link/test/gql_dedupe_link_test.dart @@ -1,5 +1,6 @@ import "dart:async"; +import "package:gql/ast.dart"; import "package:gql/language.dart"; import "package:gql_dedupe_link/gql_dedupe_link.dart"; import "package:gql_exec/gql_exec.dart"; @@ -184,6 +185,76 @@ void main() { expect(await return2, result1); }); + test( + "does not dedupe identical queries if shouldDedupe is false for request", + () async { + var count = 0; + final document = parseString( + """ + query withVar(\$i: Int) { + take(i: \$i) + } + """, + ); + + final req1 = Request( + operation: Operation( + document: document, + ), + variables: const {"i": 12}, + ); + + final mockLink = MockLink(); + + when( + mockLink.request(req1, null), + ).thenAnswer((_) { + count++; + return Stream.fromIterable([ + Response( + data: {"a": count}, + response: { + "data": {"a": count} + }, + ) + ]); + }); + + final link = Link.from([ + DedupeLink( + shouldDedupe: (req) => + req.operation.getOperationType() != OperationType.query, + ), + mockLink, + ]); + + final stream1 = link.request(req1); + final stream2 = link.request(req1); + + final return1 = stream1.first; + final return2 = stream2.first; + + verify( + mockLink.request(req1, null), + ).called(2); + expect( + await return1, + Response( + data: const {"a": 1}, + response: const { + "data": {"a": 1} + }, + )); + expect( + await return2, + Response( + data: const {"a": 2}, + response: const { + "data": {"a": 2} + }, + )); + }); + test("does not dedup consequtive queries", () async { final document = parseString( """ diff --git a/links/gql_error_link/README.md b/links/gql_error_link/README.md index a834ac28..38bbd395 100644 --- a/links/gql_error_link/README.md +++ b/links/gql_error_link/README.md @@ -18,7 +18,7 @@ [github-forks-link]: https://github.com/gql-dart/gql/network/members [discord-badge]: https://img.shields.io/discord/559455668810153989.svg?style=for-the-badge&logo=discord&logoColor=ffffff -[discord-link]: https://discord.gg/NryjpVa +[discord-link]: https://discord.gg/YBFCTXNbwY GQL Link to handle execution errors and exceptions. diff --git a/links/gql_exec/README.md b/links/gql_exec/README.md index 97766f97..387e4c8b 100644 --- a/links/gql_exec/README.md +++ b/links/gql_exec/README.md @@ -18,7 +18,7 @@ [github-forks-link]: https://github.com/gql-dart/gql/network/members [discord-badge]: https://img.shields.io/discord/559455668810153989.svg?style=for-the-badge&logo=discord&logoColor=ffffff -[discord-link]: https://discord.gg/NryjpVa +[discord-link]: https://discord.gg/YBFCTXNbwY Basis for GraphQL execution layer to support Link and Client. diff --git a/links/gql_http_link/README.md b/links/gql_http_link/README.md index e0c6e64b..7e5214b4 100644 --- a/links/gql_http_link/README.md +++ b/links/gql_http_link/README.md @@ -18,7 +18,7 @@ [github-forks-link]: https://github.com/gql-dart/gql/network/members [discord-badge]: https://img.shields.io/discord/559455668810153989.svg?style=for-the-badge&logo=discord&logoColor=ffffff -[discord-link]: https://discord.gg/NryjpVa +[discord-link]: https://discord.gg/YBFCTXNbwY GQL Terminating Link to execute requests via HTTP using JSON. diff --git a/links/gql_link/README.md b/links/gql_link/README.md index f82ffbf6..69b3f109 100644 --- a/links/gql_link/README.md +++ b/links/gql_link/README.md @@ -18,7 +18,7 @@ [github-forks-link]: https://github.com/gql-dart/gql/network/members [discord-badge]: https://img.shields.io/discord/559455668810153989.svg?style=for-the-badge&logo=discord&logoColor=ffffff -[discord-link]: https://discord.gg/NryjpVa +[discord-link]: https://discord.gg/YBFCTXNbwY A modular AST-based GraphQL request execution interface. diff --git a/links/gql_transform_link/README.md b/links/gql_transform_link/README.md index 787ba36a..71512c1b 100644 --- a/links/gql_transform_link/README.md +++ b/links/gql_transform_link/README.md @@ -18,7 +18,7 @@ [github-forks-link]: https://github.com/gql-dart/gql/network/members [discord-badge]: https://img.shields.io/discord/559455668810153989.svg?style=for-the-badge&logo=discord&logoColor=ffffff -[discord-link]: https://discord.gg/NryjpVa +[discord-link]: https://discord.gg/YBFCTXNbwY GQL Link to transform Requests and Responses. May be used to update context, document, variables, data, errors, etc. diff --git a/links/gql_websocket_link/README.md b/links/gql_websocket_link/README.md index fa6cedb0..0b0d476a 100644 --- a/links/gql_websocket_link/README.md +++ b/links/gql_websocket_link/README.md @@ -18,7 +18,7 @@ [github-forks-link]: https://github.com/gql-dart/gql/network/members [discord-badge]: https://img.shields.io/discord/559455668810153989.svg?style=for-the-badge&logo=discord&logoColor=ffffff -[discord-link]: https://discord.gg/NryjpVa +[discord-link]: https://discord.gg/YBFCTXNbwY GQL WebSocket link to execute subscriptions as well as mutations & queries against a GraphQL backend. This link support `autoReconnect` and will resubscribe after reconnecting. @@ -63,6 +63,30 @@ void main () { ``` +## Websocket Sub-Protocols And Their Dart Implementations + +There are two websocket sub-protocols available for GraphQL supported by this package: + +- `graphql-ws` (also known as `subscriptions-transport-ws`, which is the name of the npm package which implements it, [spec](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md)]) +- `graphql-transport-ws` (confusingly, also known as `graphql-ws`, which is the name of the npm package which implements it [spec](https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md)) + +In this document, we will refer to the protocols not by their npm package names, but by the name of the sub-protocol. + +See also the [Apollo docs](https://www.apollographql.com/docs/react/data/subscriptions/#websocket-subprotocols). + +Generally, you should use `graphql-transport-ws` if your server supports it. + +In order to use `graphql-transport-ws`, you need to use the `TransportWebSocketLink` class. +For `graphql-ws`, use the `WebSocketLink` class. + +The `WebSocketLink` class has some known issues, see: + +- https://github.com/gql-dart/gql/issues/430 + + + + + ## Features and bugs Please file feature requests and bugs at the [GitHub][tracker]. diff --git a/links/gql_websocket_link/pubspec.yaml b/links/gql_websocket_link/pubspec.yaml index f4ee609d..64b7588e 100644 --- a/links/gql_websocket_link/pubspec.yaml +++ b/links/gql_websocket_link/pubspec.yaml @@ -10,7 +10,7 @@ dependencies: gql_link: ^1.0.0 meta: ^1.3.0 rxdart: '>=0.26.0 <0.28.0' - uuid: ^3.0.1 + uuid: '>=3.0.0 <5.0.0' web_socket_channel: ^2.0.0 dev_dependencies: gql_pedantic: ^1.0.2