From 26fa28672b18b68578818051c410f882e88a12da Mon Sep 17 00:00:00 2001 From: Martin Kamleithner Date: Sat, 3 May 2025 21:36:02 +0100 Subject: [PATCH 01/11] feat(ferry_generator)!: upgrade gql_code_builder to 0.14.0 --- packages/ferry_generator/pubspec.yaml | 2 +- .../ferry_test_graphql2/lib/queries/books.graphql | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) delete mode 100644 packages/ferry_test_graphql2/lib/queries/books.graphql diff --git a/packages/ferry_generator/pubspec.yaml b/packages/ferry_generator/pubspec.yaml index d54bb013..54455ba3 100644 --- a/packages/ferry_generator/pubspec.yaml +++ b/packages/ferry_generator/pubspec.yaml @@ -12,7 +12,7 @@ topics: - codegen dependencies: gql: '>=0.14.0 <2.0.0' - gql_code_builder: ^0.13.0 + gql_code_builder: ^0.14.0 gql_code_builder_serializers: ^0.1.0 gql_tristate_value: ^1.0.0 built_collection: ^5.0.0 diff --git a/packages/ferry_test_graphql2/lib/queries/books.graphql b/packages/ferry_test_graphql2/lib/queries/books.graphql deleted file mode 100644 index bec02696..00000000 --- a/packages/ferry_test_graphql2/lib/queries/books.graphql +++ /dev/null @@ -1,14 +0,0 @@ - - - -query GetBooks { - books { - title - ... on Textbook { - courses - } - ... on ColoringBook { - colors - } - } -} \ No newline at end of file From bf8c713333bc49827f6ba42e2e077d2f3e01deb7 Mon Sep 17 00:00:00 2001 From: Martin Kamleithner Date: Sat, 3 May 2025 21:36:17 +0100 Subject: [PATCH 02/11] feat(examples)!: update generated files for auth_token example --- .../__generated__/schema.schema.gql.dart | 11 ++-- .../__generated__/schema.schema.gql.g.dart | 32 ++++++----- .../__generated__/serializers.gql.dart | 2 +- .../auth/__generated__/login.data.gql.dart | 5 +- .../auth/__generated__/login.data.gql.g.dart | 16 +++--- .../auth/__generated__/login.req.gql.dart | 8 ++- .../auth/__generated__/login.req.gql.g.dart | 41 ++++++++----- .../auth/__generated__/login.var.gql.dart | 3 +- .../auth/__generated__/login.var.gql.g.dart | 9 +-- .../__generated__/create_author.data.gql.dart | 5 +- .../create_author.data.gql.g.dart | 24 ++++---- .../__generated__/create_author.req.gql.dart | 8 ++- .../create_author.req.gql.g.dart | 41 ++++++++----- .../__generated__/create_author.var.gql.dart | 3 +- .../create_author.var.gql.g.dart | 9 +-- .../__generated__/get_author.data.gql.dart | 13 +++-- .../__generated__/get_author.data.gql.g.dart | 57 ++++++++++--------- .../__generated__/get_author.req.gql.dart | 9 ++- .../__generated__/get_author.req.gql.g.dart | 41 ++++++++----- .../__generated__/get_author.var.gql.dart | 3 +- .../__generated__/get_author.var.gql.g.dart | 5 +- .../__generated__/get_authors.data.gql.dart | 10 ++-- .../__generated__/get_authors.data.gql.g.dart | 38 +++++++------ .../__generated__/get_authors.req.gql.dart | 8 ++- .../__generated__/get_authors.req.gql.g.dart | 41 ++++++++----- .../__generated__/get_authors.var.gql.dart | 2 +- .../client/pubspec.yaml | 1 + 27 files changed, 272 insertions(+), 173 deletions(-) diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/__generated__/schema.schema.gql.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/__generated__/schema.schema.gql.dart index aab000c4..bae464ec 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/__generated__/schema.schema.gql.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/__generated__/schema.schema.gql.dart @@ -14,7 +14,7 @@ abstract class GAuthorsOrder implements Built { GAuthorsOrder._(); - factory GAuthorsOrder([Function(GAuthorsOrderBuilder b) updates]) = + factory GAuthorsOrder([void Function(GAuthorsOrderBuilder b) updates]) = _$GAuthorsOrder; GAuthorsOrderField get field; @@ -64,7 +64,8 @@ abstract class GdeleteAuthorInput implements Built { GdeleteAuthorInput._(); - factory GdeleteAuthorInput([Function(GdeleteAuthorInputBuilder b) updates]) = + factory GdeleteAuthorInput( + [void Function(GdeleteAuthorInputBuilder b) updates]) = _$GdeleteAuthorInput; int get id; @@ -106,7 +107,8 @@ class GDirection extends EnumClass { abstract class GloginInput implements Built { GloginInput._(); - factory GloginInput([Function(GloginInputBuilder b) updates]) = _$GloginInput; + factory GloginInput([void Function(GloginInputBuilder b) updates]) = + _$GloginInput; String get username; String get password; @@ -127,7 +129,8 @@ abstract class GloginInput implements Built { abstract class GNewAuthor implements Built { GNewAuthor._(); - factory GNewAuthor([Function(GNewAuthorBuilder b) updates]) = _$GNewAuthor; + factory GNewAuthor([void Function(GNewAuthorBuilder b) updates]) = + _$GNewAuthor; String get firstName; String get lastName; diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/__generated__/schema.schema.gql.g.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/__generated__/schema.schema.gql.g.dart index 3fd33ed5..7f03de36 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/__generated__/schema.schema.gql.g.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/__generated__/schema.schema.gql.g.dart @@ -404,10 +404,11 @@ class GAuthorsOrderBuilder _$GAuthorsOrder _build() { final _$result = _$v ?? new _$GAuthorsOrder._( - field: BuiltValueNullFieldError.checkNotNull( - field, r'GAuthorsOrder', 'field'), - direction: BuiltValueNullFieldError.checkNotNull( - direction, r'GAuthorsOrder', 'direction')); + field: BuiltValueNullFieldError.checkNotNull( + field, r'GAuthorsOrder', 'field'), + direction: BuiltValueNullFieldError.checkNotNull( + direction, r'GAuthorsOrder', 'direction'), + ); replace(_$result); return _$result; } @@ -491,8 +492,9 @@ class GdeleteAuthorInputBuilder _$GdeleteAuthorInput _build() { final _$result = _$v ?? new _$GdeleteAuthorInput._( - id: BuiltValueNullFieldError.checkNotNull( - id, r'GdeleteAuthorInput', 'id')); + id: BuiltValueNullFieldError.checkNotNull( + id, r'GdeleteAuthorInput', 'id'), + ); replace(_$result); return _$result; } @@ -586,10 +588,11 @@ class GloginInputBuilder implements Builder { _$GloginInput _build() { final _$result = _$v ?? new _$GloginInput._( - username: BuiltValueNullFieldError.checkNotNull( - username, r'GloginInput', 'username'), - password: BuiltValueNullFieldError.checkNotNull( - password, r'GloginInput', 'password')); + username: BuiltValueNullFieldError.checkNotNull( + username, r'GloginInput', 'username'), + password: BuiltValueNullFieldError.checkNotNull( + password, r'GloginInput', 'password'), + ); replace(_$result); return _$result; } @@ -684,10 +687,11 @@ class GNewAuthorBuilder implements Builder { _$GNewAuthor _build() { final _$result = _$v ?? new _$GNewAuthor._( - firstName: BuiltValueNullFieldError.checkNotNull( - firstName, r'GNewAuthor', 'firstName'), - lastName: BuiltValueNullFieldError.checkNotNull( - lastName, r'GNewAuthor', 'lastName')); + firstName: BuiltValueNullFieldError.checkNotNull( + firstName, r'GNewAuthor', 'firstName'), + lastName: BuiltValueNullFieldError.checkNotNull( + lastName, r'GNewAuthor', 'lastName'), + ); replace(_$result); return _$result; } diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/__generated__/serializers.gql.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/__generated__/serializers.gql.dart index f1b99dcc..acb35ec8 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/__generated__/serializers.gql.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/__generated__/serializers.gql.dart @@ -46,7 +46,7 @@ import 'package:built_collection/built_collection.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart' show StandardJsonPlugin; import 'package:ferry_exec/ferry_exec.dart'; -import 'package:gql_code_builder/src/serializers/operation_serializer.dart' +import 'package:gql_code_builder_serializers/gql_code_builder_serializers.dart' show OperationSerializer; part 'serializers.gql.g.dart'; diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.data.gql.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.data.gql.dart index 522a72d0..3bbec1ac 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.data.gql.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.data.gql.dart @@ -12,7 +12,8 @@ part 'login.data.gql.g.dart'; abstract class GLoginData implements Built { GLoginData._(); - factory GLoginData([Function(GLoginDataBuilder b) updates]) = _$GLoginData; + factory GLoginData([void Function(GLoginDataBuilder b) updates]) = + _$GLoginData; static void _initializeBuilder(GLoginDataBuilder b) => b..G__typename = 'Mutation'; @@ -38,7 +39,7 @@ abstract class GLoginData_login implements Built { GLoginData_login._(); - factory GLoginData_login([Function(GLoginData_loginBuilder b) updates]) = + factory GLoginData_login([void Function(GLoginData_loginBuilder b) updates]) = _$GLoginData_login; static void _initializeBuilder(GLoginData_loginBuilder b) => diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.data.gql.g.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.data.gql.g.dart index bfbafc2a..f2bcc780 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.data.gql.g.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.data.gql.g.dart @@ -203,9 +203,10 @@ class GLoginDataBuilder implements Builder { try { _$result = _$v ?? new _$GLoginData._( - G__typename: BuiltValueNullFieldError.checkNotNull( - G__typename, r'GLoginData', 'G__typename'), - login: _login?.build()); + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GLoginData', 'G__typename'), + login: _login?.build(), + ); } catch (_) { late String _$failedField; try { @@ -316,10 +317,11 @@ class GLoginData_loginBuilder _$GLoginData_login _build() { final _$result = _$v ?? new _$GLoginData_login._( - G__typename: BuiltValueNullFieldError.checkNotNull( - G__typename, r'GLoginData_login', 'G__typename'), - token: BuiltValueNullFieldError.checkNotNull( - token, r'GLoginData_login', 'token')); + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GLoginData_login', 'G__typename'), + token: BuiltValueNullFieldError.checkNotNull( + token, r'GLoginData_login', 'token'), + ); replace(_$result); return _$result; } diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.req.gql.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.req.gql.dart index 7c0c7b00..79d845ad 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.req.gql.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.req.gql.dart @@ -23,7 +23,7 @@ abstract class GLoginReq _i1.OperationRequest<_i2.GLoginData, _i3.GLoginVars> { GLoginReq._(); - factory GLoginReq([Function(GLoginReqBuilder b) updates]) = _$GLoginReq; + factory GLoginReq([void Function(GLoginReqBuilder b) updates]) = _$GLoginReq; static void _initializeBuilder(GLoginReqBuilder b) => b ..operation = _i4.Operation( @@ -40,6 +40,7 @@ abstract class GLoginReq _i4.Request get execRequest => _i4.Request( operation: operation, variables: vars.toJson(), + context: context ?? const _i4.Context(), ); @override @@ -61,6 +62,9 @@ abstract class GLoginReq @override bool get executeOnListen; @override + @BuiltValueField(serialize: false) + _i4.Context? get context; + @override _i2.GLoginData? parseData(Map json) => _i2.GLoginData.fromJson(json); @@ -68,7 +72,7 @@ abstract class GLoginReq Map varsToJson() => vars.toJson(); @override - Map dataToJson(dynamic data) => data.toJson(); + Map dataToJson(_i2.GLoginData data) => data.toJson(); @override _i1.OperationRequest<_i2.GLoginData, _i3.GLoginVars> transformOperation( diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.req.gql.g.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.req.gql.g.dart index 69e1c335..e480aff8 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.req.gql.g.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.req.gql.g.dart @@ -144,6 +144,8 @@ class _$GLoginReq extends GLoginReq { final _i1.FetchPolicy? fetchPolicy; @override final bool executeOnListen; + @override + final _i4.Context? context; factory _$GLoginReq([void Function(GLoginReqBuilder)? updates]) => (new GLoginReqBuilder()..update(updates))._build(); @@ -157,7 +159,8 @@ class _$GLoginReq extends GLoginReq { this.updateCacheHandlerKey, this.updateCacheHandlerContext, this.fetchPolicy, - required this.executeOnListen}) + required this.executeOnListen, + this.context}) : super._() { BuiltValueNullFieldError.checkNotNull(vars, r'GLoginReq', 'vars'); BuiltValueNullFieldError.checkNotNull(operation, r'GLoginReq', 'operation'); @@ -185,7 +188,8 @@ class _$GLoginReq extends GLoginReq { updateCacheHandlerKey == other.updateCacheHandlerKey && updateCacheHandlerContext == other.updateCacheHandlerContext && fetchPolicy == other.fetchPolicy && - executeOnListen == other.executeOnListen; + executeOnListen == other.executeOnListen && + context == other.context; } @override @@ -200,6 +204,7 @@ class _$GLoginReq extends GLoginReq { _$hash = $jc(_$hash, updateCacheHandlerContext.hashCode); _$hash = $jc(_$hash, fetchPolicy.hashCode); _$hash = $jc(_$hash, executeOnListen.hashCode); + _$hash = $jc(_$hash, context.hashCode); _$hash = $jf(_$hash); return _$hash; } @@ -215,7 +220,8 @@ class _$GLoginReq extends GLoginReq { ..add('updateCacheHandlerKey', updateCacheHandlerKey) ..add('updateCacheHandlerContext', updateCacheHandlerContext) ..add('fetchPolicy', fetchPolicy) - ..add('executeOnListen', executeOnListen)) + ..add('executeOnListen', executeOnListen) + ..add('context', context)) .toString(); } } @@ -272,6 +278,10 @@ class GLoginReqBuilder implements Builder { set executeOnListen(bool? executeOnListen) => _$this._executeOnListen = executeOnListen; + _i4.Context? _context; + _i4.Context? get context => _$this._context; + set context(_i4.Context? context) => _$this._context = context; + GLoginReqBuilder() { GLoginReq._initializeBuilder(this); } @@ -288,6 +298,7 @@ class GLoginReqBuilder implements Builder { _updateCacheHandlerContext = $v.updateCacheHandlerContext; _fetchPolicy = $v.fetchPolicy; _executeOnListen = $v.executeOnListen; + _context = $v.context; _$v = null; } return this; @@ -312,17 +323,19 @@ class GLoginReqBuilder implements Builder { try { _$result = _$v ?? new _$GLoginReq._( - vars: vars.build(), - operation: BuiltValueNullFieldError.checkNotNull( - operation, r'GLoginReq', 'operation'), - requestId: requestId, - updateResult: updateResult, - optimisticResponse: _optimisticResponse?.build(), - updateCacheHandlerKey: updateCacheHandlerKey, - updateCacheHandlerContext: updateCacheHandlerContext, - fetchPolicy: fetchPolicy, - executeOnListen: BuiltValueNullFieldError.checkNotNull( - executeOnListen, r'GLoginReq', 'executeOnListen')); + vars: vars.build(), + operation: BuiltValueNullFieldError.checkNotNull( + operation, r'GLoginReq', 'operation'), + requestId: requestId, + updateResult: updateResult, + optimisticResponse: _optimisticResponse?.build(), + updateCacheHandlerKey: updateCacheHandlerKey, + updateCacheHandlerContext: updateCacheHandlerContext, + fetchPolicy: fetchPolicy, + executeOnListen: BuiltValueNullFieldError.checkNotNull( + executeOnListen, r'GLoginReq', 'executeOnListen'), + context: context, + ); } catch (_) { late String _$failedField; try { diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.var.gql.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.var.gql.dart index 35ae6b08..5458fc71 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.var.gql.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.var.gql.dart @@ -12,7 +12,8 @@ part 'login.var.gql.g.dart'; abstract class GLoginVars implements Built { GLoginVars._(); - factory GLoginVars([Function(GLoginVarsBuilder b) updates]) = _$GLoginVars; + factory GLoginVars([void Function(GLoginVarsBuilder b) updates]) = + _$GLoginVars; String get username; String get password; diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.var.gql.g.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.var.gql.g.dart index ceefbe49..85c0fcce 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.var.gql.g.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/auth/__generated__/login.var.gql.g.dart @@ -142,10 +142,11 @@ class GLoginVarsBuilder implements Builder { _$GLoginVars _build() { final _$result = _$v ?? new _$GLoginVars._( - username: BuiltValueNullFieldError.checkNotNull( - username, r'GLoginVars', 'username'), - password: BuiltValueNullFieldError.checkNotNull( - password, r'GLoginVars', 'password')); + username: BuiltValueNullFieldError.checkNotNull( + username, r'GLoginVars', 'username'), + password: BuiltValueNullFieldError.checkNotNull( + password, r'GLoginVars', 'password'), + ); replace(_$result); return _$result; } diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.data.gql.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.data.gql.dart index ac757186..fac7e894 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.data.gql.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.data.gql.dart @@ -13,7 +13,8 @@ abstract class GCreateAuthorData implements Built { GCreateAuthorData._(); - factory GCreateAuthorData([Function(GCreateAuthorDataBuilder b) updates]) = + factory GCreateAuthorData( + [void Function(GCreateAuthorDataBuilder b) updates]) = _$GCreateAuthorData; static void _initializeBuilder(GCreateAuthorDataBuilder b) => @@ -44,7 +45,7 @@ abstract class GCreateAuthorData_createAuthor GCreateAuthorData_createAuthor._(); factory GCreateAuthorData_createAuthor( - [Function(GCreateAuthorData_createAuthorBuilder b) updates]) = + [void Function(GCreateAuthorData_createAuthorBuilder b) updates]) = _$GCreateAuthorData_createAuthor; static void _initializeBuilder(GCreateAuthorData_createAuthorBuilder b) => diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.data.gql.g.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.data.gql.g.dart index 666daacb..579fee08 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.data.gql.g.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.data.gql.g.dart @@ -230,9 +230,10 @@ class GCreateAuthorDataBuilder try { _$result = _$v ?? new _$GCreateAuthorData._( - G__typename: BuiltValueNullFieldError.checkNotNull( - G__typename, r'GCreateAuthorData', 'G__typename'), - createAuthor: _createAuthor?.build()); + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GCreateAuthorData', 'G__typename'), + createAuthor: _createAuthor?.build(), + ); } catch (_) { late String _$failedField; try { @@ -375,14 +376,15 @@ class GCreateAuthorData_createAuthorBuilder _$GCreateAuthorData_createAuthor _build() { final _$result = _$v ?? new _$GCreateAuthorData_createAuthor._( - G__typename: BuiltValueNullFieldError.checkNotNull( - G__typename, r'GCreateAuthorData_createAuthor', 'G__typename'), - id: BuiltValueNullFieldError.checkNotNull( - id, r'GCreateAuthorData_createAuthor', 'id'), - firstName: BuiltValueNullFieldError.checkNotNull( - firstName, r'GCreateAuthorData_createAuthor', 'firstName'), - lastName: BuiltValueNullFieldError.checkNotNull( - lastName, r'GCreateAuthorData_createAuthor', 'lastName')); + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GCreateAuthorData_createAuthor', 'G__typename'), + id: BuiltValueNullFieldError.checkNotNull( + id, r'GCreateAuthorData_createAuthor', 'id'), + firstName: BuiltValueNullFieldError.checkNotNull( + firstName, r'GCreateAuthorData_createAuthor', 'firstName'), + lastName: BuiltValueNullFieldError.checkNotNull( + lastName, r'GCreateAuthorData_createAuthor', 'lastName'), + ); replace(_$result); return _$result; } diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.req.gql.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.req.gql.dart index 43d5ae2f..0d37b712 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.req.gql.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.req.gql.dart @@ -23,7 +23,7 @@ abstract class GCreateAuthorReq _i1.OperationRequest<_i2.GCreateAuthorData, _i3.GCreateAuthorVars> { GCreateAuthorReq._(); - factory GCreateAuthorReq([Function(GCreateAuthorReqBuilder b) updates]) = + factory GCreateAuthorReq([void Function(GCreateAuthorReqBuilder b) updates]) = _$GCreateAuthorReq; static void _initializeBuilder(GCreateAuthorReqBuilder b) => b @@ -41,6 +41,7 @@ abstract class GCreateAuthorReq _i4.Request get execRequest => _i4.Request( operation: operation, variables: vars.toJson(), + context: context ?? const _i4.Context(), ); @override @@ -62,6 +63,9 @@ abstract class GCreateAuthorReq @override bool get executeOnListen; @override + @BuiltValueField(serialize: false) + _i4.Context? get context; + @override _i2.GCreateAuthorData? parseData(Map json) => _i2.GCreateAuthorData.fromJson(json); @@ -69,7 +73,7 @@ abstract class GCreateAuthorReq Map varsToJson() => vars.toJson(); @override - Map dataToJson(dynamic data) => data.toJson(); + Map dataToJson(_i2.GCreateAuthorData data) => data.toJson(); @override _i1.OperationRequest<_i2.GCreateAuthorData, _i3.GCreateAuthorVars> diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.req.gql.g.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.req.gql.g.dart index e81dc333..dcc57a38 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.req.gql.g.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.req.gql.g.dart @@ -147,6 +147,8 @@ class _$GCreateAuthorReq extends GCreateAuthorReq { final _i1.FetchPolicy? fetchPolicy; @override final bool executeOnListen; + @override + final _i4.Context? context; factory _$GCreateAuthorReq( [void Function(GCreateAuthorReqBuilder)? updates]) => @@ -161,7 +163,8 @@ class _$GCreateAuthorReq extends GCreateAuthorReq { this.updateCacheHandlerKey, this.updateCacheHandlerContext, this.fetchPolicy, - required this.executeOnListen}) + required this.executeOnListen, + this.context}) : super._() { BuiltValueNullFieldError.checkNotNull(vars, r'GCreateAuthorReq', 'vars'); BuiltValueNullFieldError.checkNotNull( @@ -191,7 +194,8 @@ class _$GCreateAuthorReq extends GCreateAuthorReq { updateCacheHandlerKey == other.updateCacheHandlerKey && updateCacheHandlerContext == other.updateCacheHandlerContext && fetchPolicy == other.fetchPolicy && - executeOnListen == other.executeOnListen; + executeOnListen == other.executeOnListen && + context == other.context; } @override @@ -206,6 +210,7 @@ class _$GCreateAuthorReq extends GCreateAuthorReq { _$hash = $jc(_$hash, updateCacheHandlerContext.hashCode); _$hash = $jc(_$hash, fetchPolicy.hashCode); _$hash = $jc(_$hash, executeOnListen.hashCode); + _$hash = $jc(_$hash, context.hashCode); _$hash = $jf(_$hash); return _$hash; } @@ -221,7 +226,8 @@ class _$GCreateAuthorReq extends GCreateAuthorReq { ..add('updateCacheHandlerKey', updateCacheHandlerKey) ..add('updateCacheHandlerContext', updateCacheHandlerContext) ..add('fetchPolicy', fetchPolicy) - ..add('executeOnListen', executeOnListen)) + ..add('executeOnListen', executeOnListen) + ..add('context', context)) .toString(); } } @@ -282,6 +288,10 @@ class GCreateAuthorReqBuilder set executeOnListen(bool? executeOnListen) => _$this._executeOnListen = executeOnListen; + _i4.Context? _context; + _i4.Context? get context => _$this._context; + set context(_i4.Context? context) => _$this._context = context; + GCreateAuthorReqBuilder() { GCreateAuthorReq._initializeBuilder(this); } @@ -298,6 +308,7 @@ class GCreateAuthorReqBuilder _updateCacheHandlerContext = $v.updateCacheHandlerContext; _fetchPolicy = $v.fetchPolicy; _executeOnListen = $v.executeOnListen; + _context = $v.context; _$v = null; } return this; @@ -322,17 +333,19 @@ class GCreateAuthorReqBuilder try { _$result = _$v ?? new _$GCreateAuthorReq._( - vars: vars.build(), - operation: BuiltValueNullFieldError.checkNotNull( - operation, r'GCreateAuthorReq', 'operation'), - requestId: requestId, - updateResult: updateResult, - optimisticResponse: _optimisticResponse?.build(), - updateCacheHandlerKey: updateCacheHandlerKey, - updateCacheHandlerContext: updateCacheHandlerContext, - fetchPolicy: fetchPolicy, - executeOnListen: BuiltValueNullFieldError.checkNotNull( - executeOnListen, r'GCreateAuthorReq', 'executeOnListen')); + vars: vars.build(), + operation: BuiltValueNullFieldError.checkNotNull( + operation, r'GCreateAuthorReq', 'operation'), + requestId: requestId, + updateResult: updateResult, + optimisticResponse: _optimisticResponse?.build(), + updateCacheHandlerKey: updateCacheHandlerKey, + updateCacheHandlerContext: updateCacheHandlerContext, + fetchPolicy: fetchPolicy, + executeOnListen: BuiltValueNullFieldError.checkNotNull( + executeOnListen, r'GCreateAuthorReq', 'executeOnListen'), + context: context, + ); } catch (_) { late String _$failedField; try { diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.var.gql.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.var.gql.dart index 5bbd64fb..cbc86a15 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.var.gql.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.var.gql.dart @@ -13,7 +13,8 @@ abstract class GCreateAuthorVars implements Built { GCreateAuthorVars._(); - factory GCreateAuthorVars([Function(GCreateAuthorVarsBuilder b) updates]) = + factory GCreateAuthorVars( + [void Function(GCreateAuthorVarsBuilder b) updates]) = _$GCreateAuthorVars; String get firstName; diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.var.gql.g.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.var.gql.g.dart index ad416589..8cccda7f 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.var.gql.g.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/create_author.var.gql.g.dart @@ -151,10 +151,11 @@ class GCreateAuthorVarsBuilder _$GCreateAuthorVars _build() { final _$result = _$v ?? new _$GCreateAuthorVars._( - firstName: BuiltValueNullFieldError.checkNotNull( - firstName, r'GCreateAuthorVars', 'firstName'), - lastName: BuiltValueNullFieldError.checkNotNull( - lastName, r'GCreateAuthorVars', 'lastName')); + firstName: BuiltValueNullFieldError.checkNotNull( + firstName, r'GCreateAuthorVars', 'firstName'), + lastName: BuiltValueNullFieldError.checkNotNull( + lastName, r'GCreateAuthorVars', 'lastName'), + ); replace(_$result); return _$result; } diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.data.gql.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.data.gql.dart index 50bc5433..5654229a 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.data.gql.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.data.gql.dart @@ -14,7 +14,8 @@ abstract class GGetAuthorByIdData implements Built { GGetAuthorByIdData._(); - factory GGetAuthorByIdData([Function(GGetAuthorByIdDataBuilder b) updates]) = + factory GGetAuthorByIdData( + [void Function(GGetAuthorByIdDataBuilder b) updates]) = _$GGetAuthorByIdData; static void _initializeBuilder(GGetAuthorByIdDataBuilder b) => @@ -44,7 +45,7 @@ abstract class GGetAuthorByIdData_author GGetAuthorByIdData_author._(); factory GGetAuthorByIdData_author( - [Function(GGetAuthorByIdData_authorBuilder b) updates]) = + [void Function(GGetAuthorByIdData_authorBuilder b) updates]) = _$GGetAuthorByIdData_author; static void _initializeBuilder(GGetAuthorByIdData_authorBuilder b) => @@ -78,7 +79,7 @@ abstract class GGetAuthorByIdData_author_quotes GGetAuthorByIdData_author_quotes._(); factory GGetAuthorByIdData_author_quotes( - [Function(GGetAuthorByIdData_author_quotesBuilder b) updates]) = + [void Function(GGetAuthorByIdData_author_quotesBuilder b) updates]) = _$GGetAuthorByIdData_author_quotes; static void _initializeBuilder(GGetAuthorByIdData_author_quotesBuilder b) => @@ -110,8 +111,8 @@ abstract class GGetAuthorByIdData_author_quotes_edges GGetAuthorByIdData_author_quotes_edges._(); factory GGetAuthorByIdData_author_quotes_edges( - [Function(GGetAuthorByIdData_author_quotes_edgesBuilder b) updates]) = - _$GGetAuthorByIdData_author_quotes_edges; + [void Function(GGetAuthorByIdData_author_quotes_edgesBuilder b) + updates]) = _$GGetAuthorByIdData_author_quotes_edges; static void _initializeBuilder( GGetAuthorByIdData_author_quotes_edgesBuilder b) => @@ -143,7 +144,7 @@ abstract class GGetAuthorByIdData_author_quotes_edges_node GGetAuthorByIdData_author_quotes_edges_node._(); factory GGetAuthorByIdData_author_quotes_edges_node( - [Function(GGetAuthorByIdData_author_quotes_edges_nodeBuilder b) + [void Function(GGetAuthorByIdData_author_quotes_edges_nodeBuilder b) updates]) = _$GGetAuthorByIdData_author_quotes_edges_node; static void _initializeBuilder( diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.data.gql.g.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.data.gql.g.dart index bbf97fa0..db67b166 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.data.gql.g.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.data.gql.g.dart @@ -437,9 +437,10 @@ class GGetAuthorByIdDataBuilder try { _$result = _$v ?? new _$GGetAuthorByIdData._( - G__typename: BuiltValueNullFieldError.checkNotNull( - G__typename, r'GGetAuthorByIdData', 'G__typename'), - author: _author?.build()); + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GGetAuthorByIdData', 'G__typename'), + author: _author?.build(), + ); } catch (_) { late String _$failedField; try { @@ -596,15 +597,16 @@ class GGetAuthorByIdData_authorBuilder try { _$result = _$v ?? new _$GGetAuthorByIdData_author._( - G__typename: BuiltValueNullFieldError.checkNotNull( - G__typename, r'GGetAuthorByIdData_author', 'G__typename'), - id: BuiltValueNullFieldError.checkNotNull( - id, r'GGetAuthorByIdData_author', 'id'), - firstName: BuiltValueNullFieldError.checkNotNull( - firstName, r'GGetAuthorByIdData_author', 'firstName'), - lastName: BuiltValueNullFieldError.checkNotNull( - lastName, r'GGetAuthorByIdData_author', 'lastName'), - quotes: _quotes?.build()); + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GGetAuthorByIdData_author', 'G__typename'), + id: BuiltValueNullFieldError.checkNotNull( + id, r'GGetAuthorByIdData_author', 'id'), + firstName: BuiltValueNullFieldError.checkNotNull( + firstName, r'GGetAuthorByIdData_author', 'firstName'), + lastName: BuiltValueNullFieldError.checkNotNull( + lastName, r'GGetAuthorByIdData_author', 'lastName'), + quotes: _quotes?.build(), + ); } catch (_) { late String _$failedField; try { @@ -723,9 +725,10 @@ class GGetAuthorByIdData_author_quotesBuilder try { _$result = _$v ?? new _$GGetAuthorByIdData_author_quotes._( - G__typename: BuiltValueNullFieldError.checkNotNull(G__typename, - r'GGetAuthorByIdData_author_quotes', 'G__typename'), - edges: _edges?.build()); + G__typename: BuiltValueNullFieldError.checkNotNull(G__typename, + r'GGetAuthorByIdData_author_quotes', 'G__typename'), + edges: _edges?.build(), + ); } catch (_) { late String _$failedField; try { @@ -849,9 +852,10 @@ class GGetAuthorByIdData_author_quotes_edgesBuilder try { _$result = _$v ?? new _$GGetAuthorByIdData_author_quotes_edges._( - G__typename: BuiltValueNullFieldError.checkNotNull(G__typename, - r'GGetAuthorByIdData_author_quotes_edges', 'G__typename'), - node: _node?.build()); + G__typename: BuiltValueNullFieldError.checkNotNull(G__typename, + r'GGetAuthorByIdData_author_quotes_edges', 'G__typename'), + node: _node?.build(), + ); } catch (_) { late String _$failedField; try { @@ -1004,14 +1008,15 @@ class GGetAuthorByIdData_author_quotes_edges_nodeBuilder _$GGetAuthorByIdData_author_quotes_edges_node _build() { final _$result = _$v ?? new _$GGetAuthorByIdData_author_quotes_edges_node._( - G__typename: BuiltValueNullFieldError.checkNotNull(G__typename, - r'GGetAuthorByIdData_author_quotes_edges_node', 'G__typename'), - G_id: BuiltValueNullFieldError.checkNotNull( - G_id, r'GGetAuthorByIdData_author_quotes_edges_node', 'G_id'), - id: BuiltValueNullFieldError.checkNotNull( - id, r'GGetAuthorByIdData_author_quotes_edges_node', 'id'), - text: BuiltValueNullFieldError.checkNotNull( - text, r'GGetAuthorByIdData_author_quotes_edges_node', 'text')); + G__typename: BuiltValueNullFieldError.checkNotNull(G__typename, + r'GGetAuthorByIdData_author_quotes_edges_node', 'G__typename'), + G_id: BuiltValueNullFieldError.checkNotNull( + G_id, r'GGetAuthorByIdData_author_quotes_edges_node', 'G_id'), + id: BuiltValueNullFieldError.checkNotNull( + id, r'GGetAuthorByIdData_author_quotes_edges_node', 'id'), + text: BuiltValueNullFieldError.checkNotNull( + text, r'GGetAuthorByIdData_author_quotes_edges_node', 'text'), + ); replace(_$result); return _$result; } diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.req.gql.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.req.gql.dart index f791a790..93014deb 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.req.gql.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.req.gql.dart @@ -23,7 +23,8 @@ abstract class GGetAuthorByIdReq _i1.OperationRequest<_i2.GGetAuthorByIdData, _i3.GGetAuthorByIdVars> { GGetAuthorByIdReq._(); - factory GGetAuthorByIdReq([Function(GGetAuthorByIdReqBuilder b) updates]) = + factory GGetAuthorByIdReq( + [void Function(GGetAuthorByIdReqBuilder b) updates]) = _$GGetAuthorByIdReq; static void _initializeBuilder(GGetAuthorByIdReqBuilder b) => b @@ -41,6 +42,7 @@ abstract class GGetAuthorByIdReq _i4.Request get execRequest => _i4.Request( operation: operation, variables: vars.toJson(), + context: context ?? const _i4.Context(), ); @override @@ -62,6 +64,9 @@ abstract class GGetAuthorByIdReq @override bool get executeOnListen; @override + @BuiltValueField(serialize: false) + _i4.Context? get context; + @override _i2.GGetAuthorByIdData? parseData(Map json) => _i2.GGetAuthorByIdData.fromJson(json); @@ -69,7 +74,7 @@ abstract class GGetAuthorByIdReq Map varsToJson() => vars.toJson(); @override - Map dataToJson(dynamic data) => data.toJson(); + Map dataToJson(_i2.GGetAuthorByIdData data) => data.toJson(); @override _i1.OperationRequest<_i2.GGetAuthorByIdData, _i3.GGetAuthorByIdVars> diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.req.gql.g.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.req.gql.g.dart index 2b697a3d..9d0e545b 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.req.gql.g.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.req.gql.g.dart @@ -147,6 +147,8 @@ class _$GGetAuthorByIdReq extends GGetAuthorByIdReq { final _i1.FetchPolicy? fetchPolicy; @override final bool executeOnListen; + @override + final _i4.Context? context; factory _$GGetAuthorByIdReq( [void Function(GGetAuthorByIdReqBuilder)? updates]) => @@ -161,7 +163,8 @@ class _$GGetAuthorByIdReq extends GGetAuthorByIdReq { this.updateCacheHandlerKey, this.updateCacheHandlerContext, this.fetchPolicy, - required this.executeOnListen}) + required this.executeOnListen, + this.context}) : super._() { BuiltValueNullFieldError.checkNotNull(vars, r'GGetAuthorByIdReq', 'vars'); BuiltValueNullFieldError.checkNotNull( @@ -191,7 +194,8 @@ class _$GGetAuthorByIdReq extends GGetAuthorByIdReq { updateCacheHandlerKey == other.updateCacheHandlerKey && updateCacheHandlerContext == other.updateCacheHandlerContext && fetchPolicy == other.fetchPolicy && - executeOnListen == other.executeOnListen; + executeOnListen == other.executeOnListen && + context == other.context; } @override @@ -206,6 +210,7 @@ class _$GGetAuthorByIdReq extends GGetAuthorByIdReq { _$hash = $jc(_$hash, updateCacheHandlerContext.hashCode); _$hash = $jc(_$hash, fetchPolicy.hashCode); _$hash = $jc(_$hash, executeOnListen.hashCode); + _$hash = $jc(_$hash, context.hashCode); _$hash = $jf(_$hash); return _$hash; } @@ -221,7 +226,8 @@ class _$GGetAuthorByIdReq extends GGetAuthorByIdReq { ..add('updateCacheHandlerKey', updateCacheHandlerKey) ..add('updateCacheHandlerContext', updateCacheHandlerContext) ..add('fetchPolicy', fetchPolicy) - ..add('executeOnListen', executeOnListen)) + ..add('executeOnListen', executeOnListen) + ..add('context', context)) .toString(); } } @@ -282,6 +288,10 @@ class GGetAuthorByIdReqBuilder set executeOnListen(bool? executeOnListen) => _$this._executeOnListen = executeOnListen; + _i4.Context? _context; + _i4.Context? get context => _$this._context; + set context(_i4.Context? context) => _$this._context = context; + GGetAuthorByIdReqBuilder() { GGetAuthorByIdReq._initializeBuilder(this); } @@ -298,6 +308,7 @@ class GGetAuthorByIdReqBuilder _updateCacheHandlerContext = $v.updateCacheHandlerContext; _fetchPolicy = $v.fetchPolicy; _executeOnListen = $v.executeOnListen; + _context = $v.context; _$v = null; } return this; @@ -322,17 +333,19 @@ class GGetAuthorByIdReqBuilder try { _$result = _$v ?? new _$GGetAuthorByIdReq._( - vars: vars.build(), - operation: BuiltValueNullFieldError.checkNotNull( - operation, r'GGetAuthorByIdReq', 'operation'), - requestId: requestId, - updateResult: updateResult, - optimisticResponse: _optimisticResponse?.build(), - updateCacheHandlerKey: updateCacheHandlerKey, - updateCacheHandlerContext: updateCacheHandlerContext, - fetchPolicy: fetchPolicy, - executeOnListen: BuiltValueNullFieldError.checkNotNull( - executeOnListen, r'GGetAuthorByIdReq', 'executeOnListen')); + vars: vars.build(), + operation: BuiltValueNullFieldError.checkNotNull( + operation, r'GGetAuthorByIdReq', 'operation'), + requestId: requestId, + updateResult: updateResult, + optimisticResponse: _optimisticResponse?.build(), + updateCacheHandlerKey: updateCacheHandlerKey, + updateCacheHandlerContext: updateCacheHandlerContext, + fetchPolicy: fetchPolicy, + executeOnListen: BuiltValueNullFieldError.checkNotNull( + executeOnListen, r'GGetAuthorByIdReq', 'executeOnListen'), + context: context, + ); } catch (_) { late String _$failedField; try { diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.var.gql.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.var.gql.dart index ab824762..a0b3e7ac 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.var.gql.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.var.gql.dart @@ -13,7 +13,8 @@ abstract class GGetAuthorByIdVars implements Built { GGetAuthorByIdVars._(); - factory GGetAuthorByIdVars([Function(GGetAuthorByIdVarsBuilder b) updates]) = + factory GGetAuthorByIdVars( + [void Function(GGetAuthorByIdVarsBuilder b) updates]) = _$GGetAuthorByIdVars; String get id; diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.var.gql.g.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.var.gql.g.dart index c0e303a2..dcaaa033 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.var.gql.g.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_author.var.gql.g.dart @@ -129,8 +129,9 @@ class GGetAuthorByIdVarsBuilder _$GGetAuthorByIdVars _build() { final _$result = _$v ?? new _$GGetAuthorByIdVars._( - id: BuiltValueNullFieldError.checkNotNull( - id, r'GGetAuthorByIdVars', 'id')); + id: BuiltValueNullFieldError.checkNotNull( + id, r'GGetAuthorByIdVars', 'id'), + ); replace(_$result); return _$result; } diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_authors.data.gql.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_authors.data.gql.dart index fb847fba..1e631216 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_authors.data.gql.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_authors.data.gql.dart @@ -14,7 +14,7 @@ abstract class GGetAuthorsData implements Built { GGetAuthorsData._(); - factory GGetAuthorsData([Function(GGetAuthorsDataBuilder b) updates]) = + factory GGetAuthorsData([void Function(GGetAuthorsDataBuilder b) updates]) = _$GGetAuthorsData; static void _initializeBuilder(GGetAuthorsDataBuilder b) => @@ -43,7 +43,7 @@ abstract class GGetAuthorsData_authors GGetAuthorsData_authors._(); factory GGetAuthorsData_authors( - [Function(GGetAuthorsData_authorsBuilder b) updates]) = + [void Function(GGetAuthorsData_authorsBuilder b) updates]) = _$GGetAuthorsData_authors; static void _initializeBuilder(GGetAuthorsData_authorsBuilder b) => @@ -74,7 +74,7 @@ abstract class GGetAuthorsData_authors_edges GGetAuthorsData_authors_edges._(); factory GGetAuthorsData_authors_edges( - [Function(GGetAuthorsData_authors_edgesBuilder b) updates]) = + [void Function(GGetAuthorsData_authors_edgesBuilder b) updates]) = _$GGetAuthorsData_authors_edges; static void _initializeBuilder(GGetAuthorsData_authors_edgesBuilder b) => @@ -105,8 +105,8 @@ abstract class GGetAuthorsData_authors_edges_node GGetAuthorsData_authors_edges_node._(); factory GGetAuthorsData_authors_edges_node( - [Function(GGetAuthorsData_authors_edges_nodeBuilder b) updates]) = - _$GGetAuthorsData_authors_edges_node; + [void Function(GGetAuthorsData_authors_edges_nodeBuilder b) + updates]) = _$GGetAuthorsData_authors_edges_node; static void _initializeBuilder(GGetAuthorsData_authors_edges_nodeBuilder b) => b..G__typename = 'Author'; diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_authors.data.gql.g.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_authors.data.gql.g.dart index 1ecfa3d2..c4592775 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_authors.data.gql.g.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_authors.data.gql.g.dart @@ -352,9 +352,10 @@ class GGetAuthorsDataBuilder try { _$result = _$v ?? new _$GGetAuthorsData._( - G__typename: BuiltValueNullFieldError.checkNotNull( - G__typename, r'GGetAuthorsData', 'G__typename'), - authors: _authors?.build()); + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GGetAuthorsData', 'G__typename'), + authors: _authors?.build(), + ); } catch (_) { late String _$failedField; try { @@ -470,9 +471,10 @@ class GGetAuthorsData_authorsBuilder try { _$result = _$v ?? new _$GGetAuthorsData_authors._( - G__typename: BuiltValueNullFieldError.checkNotNull( - G__typename, r'GGetAuthorsData_authors', 'G__typename'), - edges: _edges?.build()); + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GGetAuthorsData_authors', 'G__typename'), + edges: _edges?.build(), + ); } catch (_) { late String _$failedField; try { @@ -589,9 +591,10 @@ class GGetAuthorsData_authors_edgesBuilder try { _$result = _$v ?? new _$GGetAuthorsData_authors_edges._( - G__typename: BuiltValueNullFieldError.checkNotNull( - G__typename, r'GGetAuthorsData_authors_edges', 'G__typename'), - node: _node?.build()); + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GGetAuthorsData_authors_edges', 'G__typename'), + node: _node?.build(), + ); } catch (_) { late String _$failedField; try { @@ -738,14 +741,15 @@ class GGetAuthorsData_authors_edges_nodeBuilder _$GGetAuthorsData_authors_edges_node _build() { final _$result = _$v ?? new _$GGetAuthorsData_authors_edges_node._( - G__typename: BuiltValueNullFieldError.checkNotNull(G__typename, - r'GGetAuthorsData_authors_edges_node', 'G__typename'), - id: BuiltValueNullFieldError.checkNotNull( - id, r'GGetAuthorsData_authors_edges_node', 'id'), - firstName: BuiltValueNullFieldError.checkNotNull( - firstName, r'GGetAuthorsData_authors_edges_node', 'firstName'), - lastName: BuiltValueNullFieldError.checkNotNull( - lastName, r'GGetAuthorsData_authors_edges_node', 'lastName')); + G__typename: BuiltValueNullFieldError.checkNotNull(G__typename, + r'GGetAuthorsData_authors_edges_node', 'G__typename'), + id: BuiltValueNullFieldError.checkNotNull( + id, r'GGetAuthorsData_authors_edges_node', 'id'), + firstName: BuiltValueNullFieldError.checkNotNull( + firstName, r'GGetAuthorsData_authors_edges_node', 'firstName'), + lastName: BuiltValueNullFieldError.checkNotNull( + lastName, r'GGetAuthorsData_authors_edges_node', 'lastName'), + ); replace(_$result); return _$result; } diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_authors.req.gql.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_authors.req.gql.dart index 70cc9be2..3035affd 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_authors.req.gql.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_authors.req.gql.dart @@ -23,7 +23,7 @@ abstract class GGetAuthorsReq _i1.OperationRequest<_i2.GGetAuthorsData, _i3.GGetAuthorsVars> { GGetAuthorsReq._(); - factory GGetAuthorsReq([Function(GGetAuthorsReqBuilder b) updates]) = + factory GGetAuthorsReq([void Function(GGetAuthorsReqBuilder b) updates]) = _$GGetAuthorsReq; static void _initializeBuilder(GGetAuthorsReqBuilder b) => b @@ -41,6 +41,7 @@ abstract class GGetAuthorsReq _i4.Request get execRequest => _i4.Request( operation: operation, variables: vars.toJson(), + context: context ?? const _i4.Context(), ); @override @@ -62,6 +63,9 @@ abstract class GGetAuthorsReq @override bool get executeOnListen; @override + @BuiltValueField(serialize: false) + _i4.Context? get context; + @override _i2.GGetAuthorsData? parseData(Map json) => _i2.GGetAuthorsData.fromJson(json); @@ -69,7 +73,7 @@ abstract class GGetAuthorsReq Map varsToJson() => vars.toJson(); @override - Map dataToJson(dynamic data) => data.toJson(); + Map dataToJson(_i2.GGetAuthorsData data) => data.toJson(); @override _i1.OperationRequest<_i2.GGetAuthorsData, _i3.GGetAuthorsVars> diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_authors.req.gql.g.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_authors.req.gql.g.dart index a58d7475..4e030479 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_authors.req.gql.g.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_authors.req.gql.g.dart @@ -147,6 +147,8 @@ class _$GGetAuthorsReq extends GGetAuthorsReq { final _i1.FetchPolicy? fetchPolicy; @override final bool executeOnListen; + @override + final _i4.Context? context; factory _$GGetAuthorsReq([void Function(GGetAuthorsReqBuilder)? updates]) => (new GGetAuthorsReqBuilder()..update(updates))._build(); @@ -160,7 +162,8 @@ class _$GGetAuthorsReq extends GGetAuthorsReq { this.updateCacheHandlerKey, this.updateCacheHandlerContext, this.fetchPolicy, - required this.executeOnListen}) + required this.executeOnListen, + this.context}) : super._() { BuiltValueNullFieldError.checkNotNull(vars, r'GGetAuthorsReq', 'vars'); BuiltValueNullFieldError.checkNotNull( @@ -190,7 +193,8 @@ class _$GGetAuthorsReq extends GGetAuthorsReq { updateCacheHandlerKey == other.updateCacheHandlerKey && updateCacheHandlerContext == other.updateCacheHandlerContext && fetchPolicy == other.fetchPolicy && - executeOnListen == other.executeOnListen; + executeOnListen == other.executeOnListen && + context == other.context; } @override @@ -205,6 +209,7 @@ class _$GGetAuthorsReq extends GGetAuthorsReq { _$hash = $jc(_$hash, updateCacheHandlerContext.hashCode); _$hash = $jc(_$hash, fetchPolicy.hashCode); _$hash = $jc(_$hash, executeOnListen.hashCode); + _$hash = $jc(_$hash, context.hashCode); _$hash = $jf(_$hash); return _$hash; } @@ -220,7 +225,8 @@ class _$GGetAuthorsReq extends GGetAuthorsReq { ..add('updateCacheHandlerKey', updateCacheHandlerKey) ..add('updateCacheHandlerContext', updateCacheHandlerContext) ..add('fetchPolicy', fetchPolicy) - ..add('executeOnListen', executeOnListen)) + ..add('executeOnListen', executeOnListen) + ..add('context', context)) .toString(); } } @@ -280,6 +286,10 @@ class GGetAuthorsReqBuilder set executeOnListen(bool? executeOnListen) => _$this._executeOnListen = executeOnListen; + _i4.Context? _context; + _i4.Context? get context => _$this._context; + set context(_i4.Context? context) => _$this._context = context; + GGetAuthorsReqBuilder() { GGetAuthorsReq._initializeBuilder(this); } @@ -296,6 +306,7 @@ class GGetAuthorsReqBuilder _updateCacheHandlerContext = $v.updateCacheHandlerContext; _fetchPolicy = $v.fetchPolicy; _executeOnListen = $v.executeOnListen; + _context = $v.context; _$v = null; } return this; @@ -320,17 +331,19 @@ class GGetAuthorsReqBuilder try { _$result = _$v ?? new _$GGetAuthorsReq._( - vars: vars.build(), - operation: BuiltValueNullFieldError.checkNotNull( - operation, r'GGetAuthorsReq', 'operation'), - requestId: requestId, - updateResult: updateResult, - optimisticResponse: _optimisticResponse?.build(), - updateCacheHandlerKey: updateCacheHandlerKey, - updateCacheHandlerContext: updateCacheHandlerContext, - fetchPolicy: fetchPolicy, - executeOnListen: BuiltValueNullFieldError.checkNotNull( - executeOnListen, r'GGetAuthorsReq', 'executeOnListen')); + vars: vars.build(), + operation: BuiltValueNullFieldError.checkNotNull( + operation, r'GGetAuthorsReq', 'operation'), + requestId: requestId, + updateResult: updateResult, + optimisticResponse: _optimisticResponse?.build(), + updateCacheHandlerKey: updateCacheHandlerKey, + updateCacheHandlerContext: updateCacheHandlerContext, + fetchPolicy: fetchPolicy, + executeOnListen: BuiltValueNullFieldError.checkNotNull( + executeOnListen, r'GGetAuthorsReq', 'executeOnListen'), + context: context, + ); } catch (_) { late String _$failedField; try { diff --git a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_authors.var.gql.dart b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_authors.var.gql.dart index 315c2c51..37c64f00 100644 --- a/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_authors.var.gql.dart +++ b/examples/auth_token_with_isolate/client/lib/src/graphql/authors/__generated__/get_authors.var.gql.dart @@ -13,7 +13,7 @@ abstract class GGetAuthorsVars implements Built { GGetAuthorsVars._(); - factory GGetAuthorsVars([Function(GGetAuthorsVarsBuilder b) updates]) = + factory GGetAuthorsVars([void Function(GGetAuthorsVarsBuilder b) updates]) = _$GGetAuthorsVars; static Serializer get serializer => diff --git a/examples/auth_token_with_isolate/client/pubspec.yaml b/examples/auth_token_with_isolate/client/pubspec.yaml index 92397ef6..de41d711 100644 --- a/examples/auth_token_with_isolate/client/pubspec.yaml +++ b/examples/auth_token_with_isolate/client/pubspec.yaml @@ -56,6 +56,7 @@ dev_dependencies: # rules and activating additional ones. flutter_lints: ^2.0.0 ferry_generator: + gql_code_builder_serializers: ^0.1.0 build_runner: analyzer: # For information on the generic Dart part of this file, see the From 89ba11e84b2be6c8e91b4f5386b6c6278b81e09e Mon Sep 17 00:00:00 2001 From: Martin Kamleithner Date: Sat, 3 May 2025 21:36:30 +0100 Subject: [PATCH 03/11] feat(examples)!: update generated files for pokemon explorer --- .../__generated__/schema.schema.gql.g.dart | 5 +- .../__generated__/all_pokemon.data.gql.dart | 11 +- .../__generated__/all_pokemon.data.gql.g.dart | 131 +++++++++--------- .../__generated__/all_pokemon.req.gql.g.dart | 25 ++-- .../__generated__/all_pokemon.var.gql.g.dart | 9 +- .../pokemon_card_fragment.data.gql.dart | 9 -- .../pokemon_card_fragment.data.gql.g.dart | 52 +++---- .../pokemon_card_fragment.req.gql.g.dart | 26 ++-- .../pokemon_detail.data.gql.dart | 11 +- .../pokemon_detail.data.gql.g.dart | 130 ++++++++--------- .../pokemon_detail.req.gql.g.dart | 25 ++-- .../pokemon_detail.var.gql.g.dart | 5 +- examples/pokemon_explorer/pubspec.yaml | 1 + 13 files changed, 223 insertions(+), 217 deletions(-) diff --git a/examples/pokemon_explorer/lib/__generated__/schema.schema.gql.g.dart b/examples/pokemon_explorer/lib/__generated__/schema.schema.gql.g.dart index 95090f60..00ebc907 100644 --- a/examples/pokemon_explorer/lib/__generated__/schema.schema.gql.g.dart +++ b/examples/pokemon_explorer/lib/__generated__/schema.schema.gql.g.dart @@ -123,8 +123,9 @@ class GUploadBuilder implements Builder { _$GUpload _build() { final _$result = _$v ?? new _$GUpload._( - value: BuiltValueNullFieldError.checkNotNull( - value, r'GUpload', 'value')); + value: + BuiltValueNullFieldError.checkNotNull(value, r'GUpload', 'value'), + ); replace(_$result); return _$result; } diff --git a/examples/pokemon_explorer/lib/src/graphql/__generated__/all_pokemon.data.gql.dart b/examples/pokemon_explorer/lib/src/graphql/__generated__/all_pokemon.data.gql.dart index ab51a498..0178376b 100644 --- a/examples/pokemon_explorer/lib/src/graphql/__generated__/all_pokemon.data.gql.dart +++ b/examples/pokemon_explorer/lib/src/graphql/__generated__/all_pokemon.data.gql.dart @@ -87,19 +87,18 @@ abstract class GAllPokemonData_pokemons_results @BuiltValueField(wireName: '__typename') String get G__typename; @override - GAllPokemonData_pokemons_results_height? get height; - @override - GAllPokemonData_pokemons_results_weight? get weight; - @override int get id; @override String get name; @override String get avatar; + @override + GAllPokemonData_pokemons_results_height? get height; + @override + GAllPokemonData_pokemons_results_weight? get weight; static Serializer get serializer => _$gAllPokemonDataPokemonsResultsSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GAllPokemonData_pokemons_results.serializer, this, @@ -136,7 +135,6 @@ abstract class GAllPokemonData_pokemons_results_height static Serializer get serializer => _$gAllPokemonDataPokemonsResultsHeightSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GAllPokemonData_pokemons_results_height.serializer, this, @@ -173,7 +171,6 @@ abstract class GAllPokemonData_pokemons_results_weight static Serializer get serializer => _$gAllPokemonDataPokemonsResultsWeightSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GAllPokemonData_pokemons_results_weight.serializer, this, diff --git a/examples/pokemon_explorer/lib/src/graphql/__generated__/all_pokemon.data.gql.g.dart b/examples/pokemon_explorer/lib/src/graphql/__generated__/all_pokemon.data.gql.g.dart index 339869b7..b6d6bbc3 100644 --- a/examples/pokemon_explorer/lib/src/graphql/__generated__/all_pokemon.data.gql.g.dart +++ b/examples/pokemon_explorer/lib/src/graphql/__generated__/all_pokemon.data.gql.g.dart @@ -197,18 +197,6 @@ class _$GAllPokemonData_pokemons_resultsSerializer result.G__typename = serializers.deserialize(value, specifiedType: const FullType(String))! as String; break; - case 'height': - result.height.replace(serializers.deserialize(value, - specifiedType: - const FullType(GAllPokemonData_pokemons_results_height))! - as GAllPokemonData_pokemons_results_height); - break; - case 'weight': - result.weight.replace(serializers.deserialize(value, - specifiedType: - const FullType(GAllPokemonData_pokemons_results_weight))! - as GAllPokemonData_pokemons_results_weight); - break; case 'id': result.id = serializers.deserialize(value, specifiedType: const FullType(int))! as int; @@ -221,6 +209,18 @@ class _$GAllPokemonData_pokemons_resultsSerializer result.avatar = serializers.deserialize(value, specifiedType: const FullType(String))! as String; break; + case 'height': + result.height.replace(serializers.deserialize(value, + specifiedType: + const FullType(GAllPokemonData_pokemons_results_height))! + as GAllPokemonData_pokemons_results_height); + break; + case 'weight': + result.weight.replace(serializers.deserialize(value, + specifiedType: + const FullType(GAllPokemonData_pokemons_results_weight))! + as GAllPokemonData_pokemons_results_weight); + break; } } @@ -437,9 +437,10 @@ class GAllPokemonDataBuilder try { _$result = _$v ?? new _$GAllPokemonData._( - G__typename: BuiltValueNullFieldError.checkNotNull( - G__typename, r'GAllPokemonData', 'G__typename'), - pokemons: _pokemons?.build()); + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GAllPokemonData', 'G__typename'), + pokemons: _pokemons?.build(), + ); } catch (_) { late String _$failedField; try { @@ -555,9 +556,10 @@ class GAllPokemonData_pokemonsBuilder try { _$result = _$v ?? new _$GAllPokemonData_pokemons._( - G__typename: BuiltValueNullFieldError.checkNotNull( - G__typename, r'GAllPokemonData_pokemons', 'G__typename'), - results: _results?.build()); + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GAllPokemonData_pokemons', 'G__typename'), + results: _results?.build(), + ); } catch (_) { late String _$failedField; try { @@ -579,15 +581,15 @@ class _$GAllPokemonData_pokemons_results @override final String G__typename; @override - final GAllPokemonData_pokemons_results_height? height; - @override - final GAllPokemonData_pokemons_results_weight? weight; - @override final int id; @override final String name; @override final String avatar; + @override + final GAllPokemonData_pokemons_results_height? height; + @override + final GAllPokemonData_pokemons_results_weight? weight; factory _$GAllPokemonData_pokemons_results( [void Function(GAllPokemonData_pokemons_resultsBuilder)? updates]) => @@ -595,11 +597,11 @@ class _$GAllPokemonData_pokemons_results _$GAllPokemonData_pokemons_results._( {required this.G__typename, - this.height, - this.weight, required this.id, required this.name, - required this.avatar}) + required this.avatar, + this.height, + this.weight}) : super._() { BuiltValueNullFieldError.checkNotNull( G__typename, r'GAllPokemonData_pokemons_results', 'G__typename'); @@ -625,22 +627,22 @@ class _$GAllPokemonData_pokemons_results if (identical(other, this)) return true; return other is GAllPokemonData_pokemons_results && G__typename == other.G__typename && - height == other.height && - weight == other.weight && id == other.id && name == other.name && - avatar == other.avatar; + avatar == other.avatar && + height == other.height && + weight == other.weight; } @override int get hashCode { var _$hash = 0; _$hash = $jc(_$hash, G__typename.hashCode); - _$hash = $jc(_$hash, height.hashCode); - _$hash = $jc(_$hash, weight.hashCode); _$hash = $jc(_$hash, id.hashCode); _$hash = $jc(_$hash, name.hashCode); _$hash = $jc(_$hash, avatar.hashCode); + _$hash = $jc(_$hash, height.hashCode); + _$hash = $jc(_$hash, weight.hashCode); _$hash = $jf(_$hash); return _$hash; } @@ -649,11 +651,11 @@ class _$GAllPokemonData_pokemons_results String toString() { return (newBuiltValueToStringHelper(r'GAllPokemonData_pokemons_results') ..add('G__typename', G__typename) - ..add('height', height) - ..add('weight', weight) ..add('id', id) ..add('name', name) - ..add('avatar', avatar)) + ..add('avatar', avatar) + ..add('height', height) + ..add('weight', weight)) .toString(); } } @@ -668,18 +670,6 @@ class GAllPokemonData_pokemons_resultsBuilder String? get G__typename => _$this._G__typename; set G__typename(String? G__typename) => _$this._G__typename = G__typename; - GAllPokemonData_pokemons_results_heightBuilder? _height; - GAllPokemonData_pokemons_results_heightBuilder get height => - _$this._height ??= new GAllPokemonData_pokemons_results_heightBuilder(); - set height(GAllPokemonData_pokemons_results_heightBuilder? height) => - _$this._height = height; - - GAllPokemonData_pokemons_results_weightBuilder? _weight; - GAllPokemonData_pokemons_results_weightBuilder get weight => - _$this._weight ??= new GAllPokemonData_pokemons_results_weightBuilder(); - set weight(GAllPokemonData_pokemons_results_weightBuilder? weight) => - _$this._weight = weight; - int? _id; int? get id => _$this._id; set id(int? id) => _$this._id = id; @@ -692,6 +682,18 @@ class GAllPokemonData_pokemons_resultsBuilder String? get avatar => _$this._avatar; set avatar(String? avatar) => _$this._avatar = avatar; + GAllPokemonData_pokemons_results_heightBuilder? _height; + GAllPokemonData_pokemons_results_heightBuilder get height => + _$this._height ??= new GAllPokemonData_pokemons_results_heightBuilder(); + set height(GAllPokemonData_pokemons_results_heightBuilder? height) => + _$this._height = height; + + GAllPokemonData_pokemons_results_weightBuilder? _weight; + GAllPokemonData_pokemons_results_weightBuilder get weight => + _$this._weight ??= new GAllPokemonData_pokemons_results_weightBuilder(); + set weight(GAllPokemonData_pokemons_results_weightBuilder? weight) => + _$this._weight = weight; + GAllPokemonData_pokemons_resultsBuilder() { GAllPokemonData_pokemons_results._initializeBuilder(this); } @@ -700,11 +702,11 @@ class GAllPokemonData_pokemons_resultsBuilder final $v = _$v; if ($v != null) { _G__typename = $v.G__typename; - _height = $v.height?.toBuilder(); - _weight = $v.weight?.toBuilder(); _id = $v.id; _name = $v.name; _avatar = $v.avatar; + _height = $v.height?.toBuilder(); + _weight = $v.weight?.toBuilder(); _$v = null; } return this; @@ -729,16 +731,17 @@ class GAllPokemonData_pokemons_resultsBuilder try { _$result = _$v ?? new _$GAllPokemonData_pokemons_results._( - G__typename: BuiltValueNullFieldError.checkNotNull(G__typename, - r'GAllPokemonData_pokemons_results', 'G__typename'), - height: _height?.build(), - weight: _weight?.build(), - id: BuiltValueNullFieldError.checkNotNull( - id, r'GAllPokemonData_pokemons_results', 'id'), - name: BuiltValueNullFieldError.checkNotNull( - name, r'GAllPokemonData_pokemons_results', 'name'), - avatar: BuiltValueNullFieldError.checkNotNull( - avatar, r'GAllPokemonData_pokemons_results', 'avatar')); + G__typename: BuiltValueNullFieldError.checkNotNull(G__typename, + r'GAllPokemonData_pokemons_results', 'G__typename'), + id: BuiltValueNullFieldError.checkNotNull( + id, r'GAllPokemonData_pokemons_results', 'id'), + name: BuiltValueNullFieldError.checkNotNull( + name, r'GAllPokemonData_pokemons_results', 'name'), + avatar: BuiltValueNullFieldError.checkNotNull( + avatar, r'GAllPokemonData_pokemons_results', 'avatar'), + height: _height?.build(), + weight: _weight?.build(), + ); } catch (_) { late String _$failedField; try { @@ -860,9 +863,10 @@ class GAllPokemonData_pokemons_results_heightBuilder _$GAllPokemonData_pokemons_results_height _build() { final _$result = _$v ?? new _$GAllPokemonData_pokemons_results_height._( - G__typename: BuiltValueNullFieldError.checkNotNull(G__typename, - r'GAllPokemonData_pokemons_results_height', 'G__typename'), - in_meter: in_meter); + G__typename: BuiltValueNullFieldError.checkNotNull(G__typename, + r'GAllPokemonData_pokemons_results_height', 'G__typename'), + in_meter: in_meter, + ); replace(_$result); return _$result; } @@ -971,9 +975,10 @@ class GAllPokemonData_pokemons_results_weightBuilder _$GAllPokemonData_pokemons_results_weight _build() { final _$result = _$v ?? new _$GAllPokemonData_pokemons_results_weight._( - G__typename: BuiltValueNullFieldError.checkNotNull(G__typename, - r'GAllPokemonData_pokemons_results_weight', 'G__typename'), - in_kg: in_kg); + G__typename: BuiltValueNullFieldError.checkNotNull(G__typename, + r'GAllPokemonData_pokemons_results_weight', 'G__typename'), + in_kg: in_kg, + ); replace(_$result); return _$result; } diff --git a/examples/pokemon_explorer/lib/src/graphql/__generated__/all_pokemon.req.gql.g.dart b/examples/pokemon_explorer/lib/src/graphql/__generated__/all_pokemon.req.gql.g.dart index 5d4b2d42..55721673 100644 --- a/examples/pokemon_explorer/lib/src/graphql/__generated__/all_pokemon.req.gql.g.dart +++ b/examples/pokemon_explorer/lib/src/graphql/__generated__/all_pokemon.req.gql.g.dart @@ -331,18 +331,19 @@ class GAllPokemonReqBuilder try { _$result = _$v ?? new _$GAllPokemonReq._( - vars: vars.build(), - operation: BuiltValueNullFieldError.checkNotNull( - operation, r'GAllPokemonReq', 'operation'), - requestId: requestId, - updateResult: updateResult, - optimisticResponse: _optimisticResponse?.build(), - updateCacheHandlerKey: updateCacheHandlerKey, - updateCacheHandlerContext: updateCacheHandlerContext, - fetchPolicy: fetchPolicy, - executeOnListen: BuiltValueNullFieldError.checkNotNull( - executeOnListen, r'GAllPokemonReq', 'executeOnListen'), - context: context); + vars: vars.build(), + operation: BuiltValueNullFieldError.checkNotNull( + operation, r'GAllPokemonReq', 'operation'), + requestId: requestId, + updateResult: updateResult, + optimisticResponse: _optimisticResponse?.build(), + updateCacheHandlerKey: updateCacheHandlerKey, + updateCacheHandlerContext: updateCacheHandlerContext, + fetchPolicy: fetchPolicy, + executeOnListen: BuiltValueNullFieldError.checkNotNull( + executeOnListen, r'GAllPokemonReq', 'executeOnListen'), + context: context, + ); } catch (_) { late String _$failedField; try { diff --git a/examples/pokemon_explorer/lib/src/graphql/__generated__/all_pokemon.var.gql.g.dart b/examples/pokemon_explorer/lib/src/graphql/__generated__/all_pokemon.var.gql.g.dart index b3c826fa..622baaa0 100644 --- a/examples/pokemon_explorer/lib/src/graphql/__generated__/all_pokemon.var.gql.g.dart +++ b/examples/pokemon_explorer/lib/src/graphql/__generated__/all_pokemon.var.gql.g.dart @@ -145,10 +145,11 @@ class GAllPokemonVarsBuilder _$GAllPokemonVars _build() { final _$result = _$v ?? new _$GAllPokemonVars._( - limit: BuiltValueNullFieldError.checkNotNull( - limit, r'GAllPokemonVars', 'limit'), - offset: BuiltValueNullFieldError.checkNotNull( - offset, r'GAllPokemonVars', 'offset')); + limit: BuiltValueNullFieldError.checkNotNull( + limit, r'GAllPokemonVars', 'limit'), + offset: BuiltValueNullFieldError.checkNotNull( + offset, r'GAllPokemonVars', 'offset'), + ); replace(_$result); return _$result; } diff --git a/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_card_fragment.data.gql.dart b/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_card_fragment.data.gql.dart index 2a10b7f7..b8683b92 100644 --- a/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_card_fragment.data.gql.dart +++ b/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_card_fragment.data.gql.dart @@ -13,7 +13,6 @@ abstract class GNestedFragment { int get id; String get name; String get avatar; - Map toJson(); } abstract class GNestedFragmentData @@ -41,7 +40,6 @@ abstract class GNestedFragmentData static Serializer get serializer => _$gNestedFragmentDataSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GNestedFragmentData.serializer, this, @@ -65,20 +63,16 @@ abstract class GPokemonCard implements GNestedFragment { String get avatar; GPokemonCard_height? get height; GPokemonCard_weight? get weight; - @override - Map toJson(); } abstract class GPokemonCard_height { String get G__typename; String? get in_meter; - Map toJson(); } abstract class GPokemonCard_weight { String get G__typename; String? get in_kg; - Map toJson(); } abstract class GPokemonCardData @@ -110,7 +104,6 @@ abstract class GPokemonCardData static Serializer get serializer => _$gPokemonCardDataSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GPokemonCardData.serializer, this, @@ -144,7 +137,6 @@ abstract class GPokemonCardData_height static Serializer get serializer => _$gPokemonCardDataHeightSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GPokemonCardData_height.serializer, this, @@ -178,7 +170,6 @@ abstract class GPokemonCardData_weight static Serializer get serializer => _$gPokemonCardDataWeightSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GPokemonCardData_weight.serializer, this, diff --git a/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_card_fragment.data.gql.g.dart b/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_card_fragment.data.gql.g.dart index 75f46af2..3da8a790 100644 --- a/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_card_fragment.data.gql.g.dart +++ b/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_card_fragment.data.gql.g.dart @@ -401,14 +401,15 @@ class GNestedFragmentDataBuilder _$GNestedFragmentData _build() { final _$result = _$v ?? new _$GNestedFragmentData._( - G__typename: BuiltValueNullFieldError.checkNotNull( - G__typename, r'GNestedFragmentData', 'G__typename'), - id: BuiltValueNullFieldError.checkNotNull( - id, r'GNestedFragmentData', 'id'), - name: BuiltValueNullFieldError.checkNotNull( - name, r'GNestedFragmentData', 'name'), - avatar: BuiltValueNullFieldError.checkNotNull( - avatar, r'GNestedFragmentData', 'avatar')); + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GNestedFragmentData', 'G__typename'), + id: BuiltValueNullFieldError.checkNotNull( + id, r'GNestedFragmentData', 'id'), + name: BuiltValueNullFieldError.checkNotNull( + name, r'GNestedFragmentData', 'name'), + avatar: BuiltValueNullFieldError.checkNotNull( + avatar, r'GNestedFragmentData', 'avatar'), + ); replace(_$result); return _$result; } @@ -561,16 +562,17 @@ class GPokemonCardDataBuilder try { _$result = _$v ?? new _$GPokemonCardData._( - G__typename: BuiltValueNullFieldError.checkNotNull( - G__typename, r'GPokemonCardData', 'G__typename'), - id: BuiltValueNullFieldError.checkNotNull( - id, r'GPokemonCardData', 'id'), - name: BuiltValueNullFieldError.checkNotNull( - name, r'GPokemonCardData', 'name'), - avatar: BuiltValueNullFieldError.checkNotNull( - avatar, r'GPokemonCardData', 'avatar'), - height: _height?.build(), - weight: _weight?.build()); + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GPokemonCardData', 'G__typename'), + id: BuiltValueNullFieldError.checkNotNull( + id, r'GPokemonCardData', 'id'), + name: BuiltValueNullFieldError.checkNotNull( + name, r'GPokemonCardData', 'name'), + avatar: BuiltValueNullFieldError.checkNotNull( + avatar, r'GPokemonCardData', 'avatar'), + height: _height?.build(), + weight: _weight?.build(), + ); } catch (_) { late String _$failedField; try { @@ -684,9 +686,10 @@ class GPokemonCardData_heightBuilder _$GPokemonCardData_height _build() { final _$result = _$v ?? new _$GPokemonCardData_height._( - G__typename: BuiltValueNullFieldError.checkNotNull( - G__typename, r'GPokemonCardData_height', 'G__typename'), - in_meter: in_meter); + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GPokemonCardData_height', 'G__typename'), + in_meter: in_meter, + ); replace(_$result); return _$result; } @@ -787,9 +790,10 @@ class GPokemonCardData_weightBuilder _$GPokemonCardData_weight _build() { final _$result = _$v ?? new _$GPokemonCardData_weight._( - G__typename: BuiltValueNullFieldError.checkNotNull( - G__typename, r'GPokemonCardData_weight', 'G__typename'), - in_kg: in_kg); + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GPokemonCardData_weight', 'G__typename'), + in_kg: in_kg, + ); replace(_$result); return _$result; } diff --git a/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_card_fragment.req.gql.g.dart b/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_card_fragment.req.gql.g.dart index 0832aa3c..32379953 100644 --- a/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_card_fragment.req.gql.g.dart +++ b/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_card_fragment.req.gql.g.dart @@ -282,12 +282,13 @@ class GNestedFragmentReqBuilder try { _$result = _$v ?? new _$GNestedFragmentReq._( - vars: vars.build(), - document: BuiltValueNullFieldError.checkNotNull( - document, r'GNestedFragmentReq', 'document'), - fragmentName: fragmentName, - idFields: BuiltValueNullFieldError.checkNotNull( - idFields, r'GNestedFragmentReq', 'idFields')); + vars: vars.build(), + document: BuiltValueNullFieldError.checkNotNull( + document, r'GNestedFragmentReq', 'document'), + fragmentName: fragmentName, + idFields: BuiltValueNullFieldError.checkNotNull( + idFields, r'GNestedFragmentReq', 'idFields'), + ); } catch (_) { late String _$failedField; try { @@ -426,12 +427,13 @@ class GPokemonCardReqBuilder try { _$result = _$v ?? new _$GPokemonCardReq._( - vars: vars.build(), - document: BuiltValueNullFieldError.checkNotNull( - document, r'GPokemonCardReq', 'document'), - fragmentName: fragmentName, - idFields: BuiltValueNullFieldError.checkNotNull( - idFields, r'GPokemonCardReq', 'idFields')); + vars: vars.build(), + document: BuiltValueNullFieldError.checkNotNull( + document, r'GPokemonCardReq', 'document'), + fragmentName: fragmentName, + idFields: BuiltValueNullFieldError.checkNotNull( + idFields, r'GPokemonCardReq', 'idFields'), + ); } catch (_) { late String _$failedField; try { diff --git a/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_detail.data.gql.dart b/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_detail.data.gql.dart index c27dae04..ca6f040b 100644 --- a/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_detail.data.gql.dart +++ b/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_detail.data.gql.dart @@ -57,20 +57,19 @@ abstract class GPokemonDetailData_pokemon @BuiltValueField(wireName: '__typename') String get G__typename; @override - GPokemonDetailData_pokemon_height? get height; - @override - GPokemonDetailData_pokemon_weight? get weight; - @override int get id; @override String get name; @override String get avatar; + @override + GPokemonDetailData_pokemon_height? get height; + @override + GPokemonDetailData_pokemon_weight? get weight; BuiltList? get stats; static Serializer get serializer => _$gPokemonDetailDataPokemonSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GPokemonDetailData_pokemon.serializer, this, @@ -105,7 +104,6 @@ abstract class GPokemonDetailData_pokemon_height static Serializer get serializer => _$gPokemonDetailDataPokemonHeightSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GPokemonDetailData_pokemon_height.serializer, this, @@ -141,7 +139,6 @@ abstract class GPokemonDetailData_pokemon_weight static Serializer get serializer => _$gPokemonDetailDataPokemonWeightSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GPokemonDetailData_pokemon_weight.serializer, this, diff --git a/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_detail.data.gql.g.dart b/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_detail.data.gql.g.dart index f46c8d2c..12b5a1c9 100644 --- a/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_detail.data.gql.g.dart +++ b/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_detail.data.gql.g.dart @@ -144,18 +144,6 @@ class _$GPokemonDetailData_pokemonSerializer result.G__typename = serializers.deserialize(value, specifiedType: const FullType(String))! as String; break; - case 'height': - result.height.replace(serializers.deserialize(value, - specifiedType: - const FullType(GPokemonDetailData_pokemon_height))! - as GPokemonDetailData_pokemon_height); - break; - case 'weight': - result.weight.replace(serializers.deserialize(value, - specifiedType: - const FullType(GPokemonDetailData_pokemon_weight))! - as GPokemonDetailData_pokemon_weight); - break; case 'id': result.id = serializers.deserialize(value, specifiedType: const FullType(int))! as int; @@ -168,6 +156,18 @@ class _$GPokemonDetailData_pokemonSerializer result.avatar = serializers.deserialize(value, specifiedType: const FullType(String))! as String; break; + case 'height': + result.height.replace(serializers.deserialize(value, + specifiedType: + const FullType(GPokemonDetailData_pokemon_height))! + as GPokemonDetailData_pokemon_height); + break; + case 'weight': + result.weight.replace(serializers.deserialize(value, + specifiedType: + const FullType(GPokemonDetailData_pokemon_weight))! + as GPokemonDetailData_pokemon_weight); + break; case 'stats': result.stats.replace(serializers.deserialize(value, specifiedType: const FullType(BuiltList, const [ @@ -460,9 +460,10 @@ class GPokemonDetailDataBuilder try { _$result = _$v ?? new _$GPokemonDetailData._( - G__typename: BuiltValueNullFieldError.checkNotNull( - G__typename, r'GPokemonDetailData', 'G__typename'), - pokemon: _pokemon?.build()); + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GPokemonDetailData', 'G__typename'), + pokemon: _pokemon?.build(), + ); } catch (_) { late String _$failedField; try { @@ -483,16 +484,16 @@ class _$GPokemonDetailData_pokemon extends GPokemonDetailData_pokemon { @override final String G__typename; @override - final GPokemonDetailData_pokemon_height? height; - @override - final GPokemonDetailData_pokemon_weight? weight; - @override final int id; @override final String name; @override final String avatar; @override + final GPokemonDetailData_pokemon_height? height; + @override + final GPokemonDetailData_pokemon_weight? weight; + @override final BuiltList? stats; factory _$GPokemonDetailData_pokemon( @@ -501,11 +502,11 @@ class _$GPokemonDetailData_pokemon extends GPokemonDetailData_pokemon { _$GPokemonDetailData_pokemon._( {required this.G__typename, - this.height, - this.weight, required this.id, required this.name, required this.avatar, + this.height, + this.weight, this.stats}) : super._() { BuiltValueNullFieldError.checkNotNull( @@ -532,11 +533,11 @@ class _$GPokemonDetailData_pokemon extends GPokemonDetailData_pokemon { if (identical(other, this)) return true; return other is GPokemonDetailData_pokemon && G__typename == other.G__typename && - height == other.height && - weight == other.weight && id == other.id && name == other.name && avatar == other.avatar && + height == other.height && + weight == other.weight && stats == other.stats; } @@ -544,11 +545,11 @@ class _$GPokemonDetailData_pokemon extends GPokemonDetailData_pokemon { int get hashCode { var _$hash = 0; _$hash = $jc(_$hash, G__typename.hashCode); - _$hash = $jc(_$hash, height.hashCode); - _$hash = $jc(_$hash, weight.hashCode); _$hash = $jc(_$hash, id.hashCode); _$hash = $jc(_$hash, name.hashCode); _$hash = $jc(_$hash, avatar.hashCode); + _$hash = $jc(_$hash, height.hashCode); + _$hash = $jc(_$hash, weight.hashCode); _$hash = $jc(_$hash, stats.hashCode); _$hash = $jf(_$hash); return _$hash; @@ -558,11 +559,11 @@ class _$GPokemonDetailData_pokemon extends GPokemonDetailData_pokemon { String toString() { return (newBuiltValueToStringHelper(r'GPokemonDetailData_pokemon') ..add('G__typename', G__typename) - ..add('height', height) - ..add('weight', weight) ..add('id', id) ..add('name', name) ..add('avatar', avatar) + ..add('height', height) + ..add('weight', weight) ..add('stats', stats)) .toString(); } @@ -577,18 +578,6 @@ class GPokemonDetailData_pokemonBuilder String? get G__typename => _$this._G__typename; set G__typename(String? G__typename) => _$this._G__typename = G__typename; - GPokemonDetailData_pokemon_heightBuilder? _height; - GPokemonDetailData_pokemon_heightBuilder get height => - _$this._height ??= new GPokemonDetailData_pokemon_heightBuilder(); - set height(GPokemonDetailData_pokemon_heightBuilder? height) => - _$this._height = height; - - GPokemonDetailData_pokemon_weightBuilder? _weight; - GPokemonDetailData_pokemon_weightBuilder get weight => - _$this._weight ??= new GPokemonDetailData_pokemon_weightBuilder(); - set weight(GPokemonDetailData_pokemon_weightBuilder? weight) => - _$this._weight = weight; - int? _id; int? get id => _$this._id; set id(int? id) => _$this._id = id; @@ -601,6 +590,18 @@ class GPokemonDetailData_pokemonBuilder String? get avatar => _$this._avatar; set avatar(String? avatar) => _$this._avatar = avatar; + GPokemonDetailData_pokemon_heightBuilder? _height; + GPokemonDetailData_pokemon_heightBuilder get height => + _$this._height ??= new GPokemonDetailData_pokemon_heightBuilder(); + set height(GPokemonDetailData_pokemon_heightBuilder? height) => + _$this._height = height; + + GPokemonDetailData_pokemon_weightBuilder? _weight; + GPokemonDetailData_pokemon_weightBuilder get weight => + _$this._weight ??= new GPokemonDetailData_pokemon_weightBuilder(); + set weight(GPokemonDetailData_pokemon_weightBuilder? weight) => + _$this._weight = weight; + ListBuilder? _stats; ListBuilder get stats => _$this._stats ??= new ListBuilder(); @@ -615,11 +616,11 @@ class GPokemonDetailData_pokemonBuilder final $v = _$v; if ($v != null) { _G__typename = $v.G__typename; - _height = $v.height?.toBuilder(); - _weight = $v.weight?.toBuilder(); _id = $v.id; _name = $v.name; _avatar = $v.avatar; + _height = $v.height?.toBuilder(); + _weight = $v.weight?.toBuilder(); _stats = $v.stats?.toBuilder(); _$v = null; } @@ -645,17 +646,18 @@ class GPokemonDetailData_pokemonBuilder try { _$result = _$v ?? new _$GPokemonDetailData_pokemon._( - G__typename: BuiltValueNullFieldError.checkNotNull( - G__typename, r'GPokemonDetailData_pokemon', 'G__typename'), - height: _height?.build(), - weight: _weight?.build(), - id: BuiltValueNullFieldError.checkNotNull( - id, r'GPokemonDetailData_pokemon', 'id'), - name: BuiltValueNullFieldError.checkNotNull( - name, r'GPokemonDetailData_pokemon', 'name'), - avatar: BuiltValueNullFieldError.checkNotNull( - avatar, r'GPokemonDetailData_pokemon', 'avatar'), - stats: _stats?.build()); + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GPokemonDetailData_pokemon', 'G__typename'), + id: BuiltValueNullFieldError.checkNotNull( + id, r'GPokemonDetailData_pokemon', 'id'), + name: BuiltValueNullFieldError.checkNotNull( + name, r'GPokemonDetailData_pokemon', 'name'), + avatar: BuiltValueNullFieldError.checkNotNull( + avatar, r'GPokemonDetailData_pokemon', 'avatar'), + height: _height?.build(), + weight: _weight?.build(), + stats: _stats?.build(), + ); } catch (_) { late String _$failedField; try { @@ -663,7 +665,6 @@ class GPokemonDetailData_pokemonBuilder _height?.build(); _$failedField = 'weight'; _weight?.build(); - _$failedField = 'stats'; _stats?.build(); } catch (e) { @@ -777,9 +778,10 @@ class GPokemonDetailData_pokemon_heightBuilder _$GPokemonDetailData_pokemon_height _build() { final _$result = _$v ?? new _$GPokemonDetailData_pokemon_height._( - G__typename: BuiltValueNullFieldError.checkNotNull(G__typename, - r'GPokemonDetailData_pokemon_height', 'G__typename'), - in_meter: in_meter); + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GPokemonDetailData_pokemon_height', 'G__typename'), + in_meter: in_meter, + ); replace(_$result); return _$result; } @@ -884,9 +886,10 @@ class GPokemonDetailData_pokemon_weightBuilder _$GPokemonDetailData_pokemon_weight _build() { final _$result = _$v ?? new _$GPokemonDetailData_pokemon_weight._( - G__typename: BuiltValueNullFieldError.checkNotNull(G__typename, - r'GPokemonDetailData_pokemon_weight', 'G__typename'), - in_kg: in_kg); + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GPokemonDetailData_pokemon_weight', 'G__typename'), + in_kg: in_kg, + ); replace(_$result); return _$result; } @@ -1000,10 +1003,11 @@ class GPokemonDetailData_pokemon_statsBuilder _$GPokemonDetailData_pokemon_stats _build() { final _$result = _$v ?? new _$GPokemonDetailData_pokemon_stats._( - G__typename: BuiltValueNullFieldError.checkNotNull(G__typename, - r'GPokemonDetailData_pokemon_stats', 'G__typename'), - id: id, - name: name); + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GPokemonDetailData_pokemon_stats', 'G__typename'), + id: id, + name: name, + ); replace(_$result); return _$result; } diff --git a/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_detail.req.gql.g.dart b/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_detail.req.gql.g.dart index a16d66cc..616efff4 100644 --- a/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_detail.req.gql.g.dart +++ b/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_detail.req.gql.g.dart @@ -333,18 +333,19 @@ class GPokemonDetailReqBuilder try { _$result = _$v ?? new _$GPokemonDetailReq._( - vars: vars.build(), - operation: BuiltValueNullFieldError.checkNotNull( - operation, r'GPokemonDetailReq', 'operation'), - requestId: requestId, - updateResult: updateResult, - optimisticResponse: _optimisticResponse?.build(), - updateCacheHandlerKey: updateCacheHandlerKey, - updateCacheHandlerContext: updateCacheHandlerContext, - fetchPolicy: fetchPolicy, - executeOnListen: BuiltValueNullFieldError.checkNotNull( - executeOnListen, r'GPokemonDetailReq', 'executeOnListen'), - context: context); + vars: vars.build(), + operation: BuiltValueNullFieldError.checkNotNull( + operation, r'GPokemonDetailReq', 'operation'), + requestId: requestId, + updateResult: updateResult, + optimisticResponse: _optimisticResponse?.build(), + updateCacheHandlerKey: updateCacheHandlerKey, + updateCacheHandlerContext: updateCacheHandlerContext, + fetchPolicy: fetchPolicy, + executeOnListen: BuiltValueNullFieldError.checkNotNull( + executeOnListen, r'GPokemonDetailReq', 'executeOnListen'), + context: context, + ); } catch (_) { late String _$failedField; try { diff --git a/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_detail.var.gql.g.dart b/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_detail.var.gql.g.dart index aba26547..bb4c2f94 100644 --- a/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_detail.var.gql.g.dart +++ b/examples/pokemon_explorer/lib/src/graphql/__generated__/pokemon_detail.var.gql.g.dart @@ -129,8 +129,9 @@ class GPokemonDetailVarsBuilder _$GPokemonDetailVars _build() { final _$result = _$v ?? new _$GPokemonDetailVars._( - id: BuiltValueNullFieldError.checkNotNull( - id, r'GPokemonDetailVars', 'id')); + id: BuiltValueNullFieldError.checkNotNull( + id, r'GPokemonDetailVars', 'id'), + ); replace(_$result); return _$result; } diff --git a/examples/pokemon_explorer/pubspec.yaml b/examples/pokemon_explorer/pubspec.yaml index fc47ba99..8ff5e95d 100644 --- a/examples/pokemon_explorer/pubspec.yaml +++ b/examples/pokemon_explorer/pubspec.yaml @@ -21,6 +21,7 @@ dev_dependencies: flutter_lints: 2.0.1 build_runner: ^2.0.2 ferry_generator: ^0.12.1-dev.2 + gql_code_builder_serializers: ^0.1.0 flutter_test: sdk: flutter gql_exec: ^1.0.0 From 21f61c2cd75e3cbe7754d6b9bc1d471c3975c1af Mon Sep 17 00:00:00 2001 From: Martin Kamleithner Date: Sat, 3 May 2025 21:37:41 +0100 Subject: [PATCH 04/11] chore: update generated fetch policy file --- packages/ferry_exec/lib/src/fetch_policy.g.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ferry_exec/lib/src/fetch_policy.g.dart b/packages/ferry_exec/lib/src/fetch_policy.g.dart index 5034033d..0a1816ec 100644 --- a/packages/ferry_exec/lib/src/fetch_policy.g.dart +++ b/packages/ferry_exec/lib/src/fetch_policy.g.dart @@ -57,4 +57,4 @@ class _$FetchPolicySerializer implements PrimitiveSerializer { FetchPolicy.valueOf(serialized as String); } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas +// ignore_for_file: deprecated_member_use_from_same_package,type=lint From cce61ae59fdb6ad27a16d5f0835fee7eaeba48d9 Mon Sep 17 00:00:00 2001 From: Martin Kamleithner Date: Sat, 3 May 2025 21:38:55 +0100 Subject: [PATCH 05/11] feat(ferry_test_external_schema)!: update for new gql_code_builder version --- .../query_from_external_schema.data.gql.dart | 3 -- .../ferry_test_external_schema/pubspec.yaml | 1 + .../pubspec_overrides.yaml | 16 +++++++ .../review_fragment.data.gql.dart | 2 - .../hero_with_fragments.data.gql.dart | 16 +------ .../hero_with_fragments.data.gql.g.dart | 46 +++++++++---------- .../hero_with_inline_fragment.data.gql.dart | 4 -- .../pubspec_overrides.yaml | 6 +++ 8 files changed, 48 insertions(+), 46 deletions(-) create mode 100644 packages/ferry_test_external_schema/pubspec_overrides.yaml create mode 100644 packages/ferry_test_graphql2/pubspec_overrides.yaml diff --git a/packages/ferry_test_external_schema/lib/graphql/__generated__/query_from_external_schema.data.gql.dart b/packages/ferry_test_external_schema/lib/graphql/__generated__/query_from_external_schema.data.gql.dart index 1719c31a..141196fb 100644 --- a/packages/ferry_test_external_schema/lib/graphql/__generated__/query_from_external_schema.data.gql.dart +++ b/packages/ferry_test_external_schema/lib/graphql/__generated__/query_from_external_schema.data.gql.dart @@ -62,7 +62,6 @@ abstract class GHumanQueryData_human static Serializer get serializer => _$gHumanQueryDataHumanSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GHumanQueryData_human.serializer, this, @@ -80,7 +79,6 @@ abstract class GHumanFrag { String get id; DateTime get birthday; double? get height; - Map toJson(); } abstract class GHumanFragData @@ -105,7 +103,6 @@ abstract class GHumanFragData static Serializer get serializer => _$gHumanFragDataSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GHumanFragData.serializer, this, diff --git a/packages/ferry_test_external_schema/pubspec.yaml b/packages/ferry_test_external_schema/pubspec.yaml index 838d3262..e0a0f154 100644 --- a/packages/ferry_test_external_schema/pubspec.yaml +++ b/packages/ferry_test_external_schema/pubspec.yaml @@ -14,5 +14,6 @@ dev_dependencies: test: ^1.16.8 ferry_generator: ferry_test_graphql2: + gql_code_builder_serializers: ^0.1.0 build_runner: ^2.0.0 pedantic: ^1.11.0 diff --git a/packages/ferry_test_external_schema/pubspec_overrides.yaml b/packages/ferry_test_external_schema/pubspec_overrides.yaml new file mode 100644 index 00000000..e5350337 --- /dev/null +++ b/packages/ferry_test_external_schema/pubspec_overrides.yaml @@ -0,0 +1,16 @@ +# melos_managed_dependency_overrides: ferry,ferry_cache,ferry_exec,ferry_generator,ferry_store,ferry_test_graphql2,normalize +dependency_overrides: + ferry: + path: ../ferry + ferry_cache: + path: ../ferry_cache + ferry_exec: + path: ../ferry_exec + ferry_generator: + path: ../ferry_generator + ferry_store: + path: ../ferry_store + ferry_test_graphql2: + path: ../ferry_test_graphql2 + normalize: + path: ../normalize diff --git a/packages/ferry_test_graphql2/lib/fragments/__generated__/review_fragment.data.gql.dart b/packages/ferry_test_graphql2/lib/fragments/__generated__/review_fragment.data.gql.dart index 391a47b0..ab362aba 100644 --- a/packages/ferry_test_graphql2/lib/fragments/__generated__/review_fragment.data.gql.dart +++ b/packages/ferry_test_graphql2/lib/fragments/__generated__/review_fragment.data.gql.dart @@ -13,7 +13,6 @@ abstract class GReviewFragment { String get G__typename; int get stars; String? get commentary; - Map toJson(); } abstract class GReviewFragmentData @@ -39,7 +38,6 @@ abstract class GReviewFragmentData static Serializer get serializer => _$gReviewFragmentDataSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GReviewFragmentData.serializer, this, diff --git a/packages/ferry_test_graphql2/lib/queries/__generated__/hero_with_fragments.data.gql.dart b/packages/ferry_test_graphql2/lib/queries/__generated__/hero_with_fragments.data.gql.dart index 92f0076a..4132e406 100644 --- a/packages/ferry_test_graphql2/lib/queries/__generated__/hero_with_fragments.data.gql.dart +++ b/packages/ferry_test_graphql2/lib/queries/__generated__/hero_with_fragments.data.gql.dart @@ -58,13 +58,12 @@ abstract class GHeroWithFragmentsData_hero @override String get id; @override - GHeroWithFragmentsData_hero_friendsConnection get friendsConnection; - @override String get name; + @override + GHeroWithFragmentsData_hero_friendsConnection get friendsConnection; static Serializer get serializer => _$gHeroWithFragmentsDataHeroSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GHeroWithFragmentsData_hero.serializer, this, @@ -102,7 +101,6 @@ abstract class GHeroWithFragmentsData_hero_friendsConnection static Serializer get serializer => _$gHeroWithFragmentsDataHeroFriendsConnectionSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GHeroWithFragmentsData_hero_friendsConnection.serializer, this, @@ -141,7 +139,6 @@ abstract class GHeroWithFragmentsData_hero_friendsConnection_edges get serializer => _$gHeroWithFragmentsDataHeroFriendsConnectionEdgesSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GHeroWithFragmentsData_hero_friendsConnection_edges.serializer, this, @@ -159,7 +156,6 @@ abstract class GheroData { String get G__typename; String get id; String get name; - Map toJson(); } abstract class GheroDataData @@ -181,7 +177,6 @@ abstract class GheroDataData String get name; static Serializer get serializer => _$gheroDataDataSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GheroDataData.serializer, this, @@ -202,21 +197,17 @@ abstract class GcomparisonFields implements GheroData { @override String get name; GcomparisonFields_friendsConnection get friendsConnection; - @override - Map toJson(); } abstract class GcomparisonFields_friendsConnection { String get G__typename; int? get totalCount; BuiltList? get edges; - Map toJson(); } abstract class GcomparisonFields_friendsConnection_edges { String get G__typename; GheroData? get node; - Map toJson(); } abstract class GcomparisonFieldsData @@ -245,7 +236,6 @@ abstract class GcomparisonFieldsData static Serializer get serializer => _$gcomparisonFieldsDataSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GcomparisonFieldsData.serializer, this, @@ -283,7 +273,6 @@ abstract class GcomparisonFieldsData_friendsConnection static Serializer get serializer => _$gcomparisonFieldsDataFriendsConnectionSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GcomparisonFieldsData_friendsConnection.serializer, this, @@ -320,7 +309,6 @@ abstract class GcomparisonFieldsData_friendsConnection_edges static Serializer get serializer => _$gcomparisonFieldsDataFriendsConnectionEdgesSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GcomparisonFieldsData_friendsConnection_edges.serializer, this, diff --git a/packages/ferry_test_graphql2/lib/queries/__generated__/hero_with_fragments.data.gql.g.dart b/packages/ferry_test_graphql2/lib/queries/__generated__/hero_with_fragments.data.gql.g.dart index 99d17b21..baf0dda8 100644 --- a/packages/ferry_test_graphql2/lib/queries/__generated__/hero_with_fragments.data.gql.g.dart +++ b/packages/ferry_test_graphql2/lib/queries/__generated__/hero_with_fragments.data.gql.g.dart @@ -105,12 +105,12 @@ class _$GHeroWithFragmentsData_heroSerializer specifiedType: const FullType(String)), 'id', serializers.serialize(object.id, specifiedType: const FullType(String)), + 'name', + serializers.serialize(object.name, specifiedType: const FullType(String)), 'friendsConnection', serializers.serialize(object.friendsConnection, specifiedType: const FullType(GHeroWithFragmentsData_hero_friendsConnection)), - 'name', - serializers.serialize(object.name, specifiedType: const FullType(String)), ]; return result; @@ -136,16 +136,16 @@ class _$GHeroWithFragmentsData_heroSerializer result.id = serializers.deserialize(value, specifiedType: const FullType(String))! as String; break; + case 'name': + result.name = serializers.deserialize(value, + specifiedType: const FullType(String))! as String; + break; case 'friendsConnection': result.friendsConnection.replace(serializers.deserialize(value, specifiedType: const FullType( GHeroWithFragmentsData_hero_friendsConnection))! as GHeroWithFragmentsData_hero_friendsConnection); break; - case 'name': - result.name = serializers.deserialize(value, - specifiedType: const FullType(String))! as String; - break; } } @@ -662,9 +662,9 @@ class _$GHeroWithFragmentsData_hero extends GHeroWithFragmentsData_hero { @override final String id; @override - final GHeroWithFragmentsData_hero_friendsConnection friendsConnection; - @override final String name; + @override + final GHeroWithFragmentsData_hero_friendsConnection friendsConnection; factory _$GHeroWithFragmentsData_hero( [void Function(GHeroWithFragmentsData_heroBuilder)? updates]) => @@ -673,17 +673,17 @@ class _$GHeroWithFragmentsData_hero extends GHeroWithFragmentsData_hero { _$GHeroWithFragmentsData_hero._( {required this.G__typename, required this.id, - required this.friendsConnection, - required this.name}) + required this.name, + required this.friendsConnection}) : super._() { BuiltValueNullFieldError.checkNotNull( G__typename, r'GHeroWithFragmentsData_hero', 'G__typename'); BuiltValueNullFieldError.checkNotNull( id, r'GHeroWithFragmentsData_hero', 'id'); - BuiltValueNullFieldError.checkNotNull( - friendsConnection, r'GHeroWithFragmentsData_hero', 'friendsConnection'); BuiltValueNullFieldError.checkNotNull( name, r'GHeroWithFragmentsData_hero', 'name'); + BuiltValueNullFieldError.checkNotNull( + friendsConnection, r'GHeroWithFragmentsData_hero', 'friendsConnection'); } @override @@ -701,8 +701,8 @@ class _$GHeroWithFragmentsData_hero extends GHeroWithFragmentsData_hero { return other is GHeroWithFragmentsData_hero && G__typename == other.G__typename && id == other.id && - friendsConnection == other.friendsConnection && - name == other.name; + name == other.name && + friendsConnection == other.friendsConnection; } @override @@ -710,8 +710,8 @@ class _$GHeroWithFragmentsData_hero extends GHeroWithFragmentsData_hero { var _$hash = 0; _$hash = $jc(_$hash, G__typename.hashCode); _$hash = $jc(_$hash, id.hashCode); - _$hash = $jc(_$hash, friendsConnection.hashCode); _$hash = $jc(_$hash, name.hashCode); + _$hash = $jc(_$hash, friendsConnection.hashCode); _$hash = $jf(_$hash); return _$hash; } @@ -721,8 +721,8 @@ class _$GHeroWithFragmentsData_hero extends GHeroWithFragmentsData_hero { return (newBuiltValueToStringHelper(r'GHeroWithFragmentsData_hero') ..add('G__typename', G__typename) ..add('id', id) - ..add('friendsConnection', friendsConnection) - ..add('name', name)) + ..add('name', name) + ..add('friendsConnection', friendsConnection)) .toString(); } } @@ -741,6 +741,10 @@ class GHeroWithFragmentsData_heroBuilder String? get id => _$this._id; set id(String? id) => _$this._id = id; + String? _name; + String? get name => _$this._name; + set name(String? name) => _$this._name = name; + GHeroWithFragmentsData_hero_friendsConnectionBuilder? _friendsConnection; GHeroWithFragmentsData_hero_friendsConnectionBuilder get friendsConnection => _$this._friendsConnection ??= @@ -750,10 +754,6 @@ class GHeroWithFragmentsData_heroBuilder friendsConnection) => _$this._friendsConnection = friendsConnection; - String? _name; - String? get name => _$this._name; - set name(String? name) => _$this._name = name; - GHeroWithFragmentsData_heroBuilder() { GHeroWithFragmentsData_hero._initializeBuilder(this); } @@ -763,8 +763,8 @@ class GHeroWithFragmentsData_heroBuilder if ($v != null) { _G__typename = $v.G__typename; _id = $v.id; - _friendsConnection = $v.friendsConnection.toBuilder(); _name = $v.name; + _friendsConnection = $v.friendsConnection.toBuilder(); _$v = null; } return this; @@ -793,9 +793,9 @@ class GHeroWithFragmentsData_heroBuilder G__typename, r'GHeroWithFragmentsData_hero', 'G__typename'), id: BuiltValueNullFieldError.checkNotNull( id, r'GHeroWithFragmentsData_hero', 'id'), - friendsConnection: friendsConnection.build(), name: BuiltValueNullFieldError.checkNotNull( name, r'GHeroWithFragmentsData_hero', 'name'), + friendsConnection: friendsConnection.build(), ); } catch (_) { late String _$failedField; diff --git a/packages/ferry_test_graphql2/lib/queries/__generated__/hero_with_inline_fragment.data.gql.dart b/packages/ferry_test_graphql2/lib/queries/__generated__/hero_with_inline_fragment.data.gql.dart index 081aa39a..6498ce85 100644 --- a/packages/ferry_test_graphql2/lib/queries/__generated__/hero_with_inline_fragment.data.gql.dart +++ b/packages/ferry_test_graphql2/lib/queries/__generated__/hero_with_inline_fragment.data.gql.dart @@ -85,7 +85,6 @@ abstract class GHeroForEpisodeData_hero__base static Serializer get serializer => _$gHeroForEpisodeDataHeroBaseSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GHeroForEpisodeData_hero__base.serializer, this, @@ -123,7 +122,6 @@ abstract class GHeroForEpisodeData_hero__asDroid static Serializer get serializer => _$gHeroForEpisodeDataHeroAsDroidSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GHeroForEpisodeData_hero__asDroid.serializer, this, @@ -140,7 +138,6 @@ abstract class GHeroForEpisodeData_hero__asDroid abstract class GDroidFragment { String get G__typename; String? get primaryFunction; - Map toJson(); } abstract class GDroidFragmentData @@ -164,7 +161,6 @@ abstract class GDroidFragmentData static Serializer get serializer => _$gDroidFragmentDataSerializer; - @override Map toJson() => (_i1.serializers.serializeWith( GDroidFragmentData.serializer, this, diff --git a/packages/ferry_test_graphql2/pubspec_overrides.yaml b/packages/ferry_test_graphql2/pubspec_overrides.yaml new file mode 100644 index 00000000..f52459d6 --- /dev/null +++ b/packages/ferry_test_graphql2/pubspec_overrides.yaml @@ -0,0 +1,6 @@ +# melos_managed_dependency_overrides: ferry_exec,ferry_generator +dependency_overrides: + ferry_exec: + path: ../ferry_exec + ferry_generator: + path: ../ferry_generator From 2a5d628b86bf25bf9c59918f50c216c1d88c4e7f Mon Sep 17 00:00:00 2001 From: Martin Kamleithner Date: Sat, 3 May 2025 21:39:15 +0100 Subject: [PATCH 06/11] chore: update .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 422af9fd..42dba134 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ *.iml .DS_Store */.flutter-plugins* -.dart_tool \ No newline at end of file +.dart_tool +**/.claude/settings.local.json From 56cd48b7d04e64095235dcfef6991edc0fa847ec Mon Sep 17 00:00:00 2001 From: Martin Kamleithner Date: Sat, 3 May 2025 21:40:18 +0100 Subject: [PATCH 07/11] chore: remove pubspec_overrides.yaml files --- .../pubspec_overrides.yaml | 16 ---------------- .../ferry_test_graphql2/pubspec_overrides.yaml | 6 ------ 2 files changed, 22 deletions(-) delete mode 100644 packages/ferry_test_external_schema/pubspec_overrides.yaml delete mode 100644 packages/ferry_test_graphql2/pubspec_overrides.yaml diff --git a/packages/ferry_test_external_schema/pubspec_overrides.yaml b/packages/ferry_test_external_schema/pubspec_overrides.yaml deleted file mode 100644 index e5350337..00000000 --- a/packages/ferry_test_external_schema/pubspec_overrides.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# melos_managed_dependency_overrides: ferry,ferry_cache,ferry_exec,ferry_generator,ferry_store,ferry_test_graphql2,normalize -dependency_overrides: - ferry: - path: ../ferry - ferry_cache: - path: ../ferry_cache - ferry_exec: - path: ../ferry_exec - ferry_generator: - path: ../ferry_generator - ferry_store: - path: ../ferry_store - ferry_test_graphql2: - path: ../ferry_test_graphql2 - normalize: - path: ../normalize diff --git a/packages/ferry_test_graphql2/pubspec_overrides.yaml b/packages/ferry_test_graphql2/pubspec_overrides.yaml deleted file mode 100644 index f52459d6..00000000 --- a/packages/ferry_test_graphql2/pubspec_overrides.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# melos_managed_dependency_overrides: ferry_exec,ferry_generator -dependency_overrides: - ferry_exec: - path: ../ferry_exec - ferry_generator: - path: ../ferry_generator From fc23d8b6499d38ec8f389c5ceb37411757a6c45e Mon Sep 17 00:00:00 2001 From: Martin Kamleithner Date: Sat, 3 May 2025 21:40:33 +0100 Subject: [PATCH 08/11] chore: ignore pubspec_overrides.yaml files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 42dba134..a0b023fa 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ */.flutter-plugins* .dart_tool **/.claude/settings.local.json +**/pubspec_overrides.yaml From b159bb232bb068dbefd15385dbdc1f080d1bfc1c Mon Sep 17 00:00:00 2001 From: Martin Kamleithner Date: Sat, 3 May 2025 21:41:53 +0100 Subject: [PATCH 09/11] chore(release): publish packages - ferry_generator@0.13.0 --- CHANGELOG.md | 21 +++++++++++++++++++++ examples/pokemon_explorer/pubspec.yaml | 2 +- packages/ferry_generator/CHANGELOG.md | 6 ++++++ packages/ferry_generator/pubspec.yaml | 2 +- packages/ferry_test_graphql2/pubspec.yaml | 2 +- 5 files changed, 30 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ad32351..a25c987c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,27 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## 2025-05-03 + +### Changes + +--- + +Packages with breaking changes: + + - [`ferry_generator` - `v0.13.0`](#ferry_generator---v0130) + +Packages with other changes: + + - There are no other changes in this release. + +--- + +#### `ferry_generator` - `v0.13.0` + + - **BREAKING** **FEAT**(ferry_generator): upgrade gql_code_builder to 0.14.0. + + ## 2025-03-15 ### Changes diff --git a/examples/pokemon_explorer/pubspec.yaml b/examples/pokemon_explorer/pubspec.yaml index 8ff5e95d..fc8faa43 100644 --- a/examples/pokemon_explorer/pubspec.yaml +++ b/examples/pokemon_explorer/pubspec.yaml @@ -20,7 +20,7 @@ dependencies: dev_dependencies: flutter_lints: 2.0.1 build_runner: ^2.0.2 - ferry_generator: ^0.12.1-dev.2 + ferry_generator: ^0.13.0 gql_code_builder_serializers: ^0.1.0 flutter_test: sdk: flutter diff --git a/packages/ferry_generator/CHANGELOG.md b/packages/ferry_generator/CHANGELOG.md index e234b9f0..183d2f6d 100644 --- a/packages/ferry_generator/CHANGELOG.md +++ b/packages/ferry_generator/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.13.0 + +> Note: This release has breaking changes. + + - **BREAKING** **FEAT**(ferry_generator): upgrade gql_code_builder to 0.14.0. + ## 0.12.1-dev.2 - **FEAT**(ferry_generator): support analyzer ^7.0.0 (#635). diff --git a/packages/ferry_generator/pubspec.yaml b/packages/ferry_generator/pubspec.yaml index 54455ba3..57684650 100644 --- a/packages/ferry_generator/pubspec.yaml +++ b/packages/ferry_generator/pubspec.yaml @@ -1,5 +1,5 @@ name: ferry_generator -version: 0.12.1-dev.2 +version: 0.13.0 homepage: https://ferry.gql-dart.dev description: Generated types for Ferry GraphQL Client repository: https://github.com/gql-dart/ferry diff --git a/packages/ferry_test_graphql2/pubspec.yaml b/packages/ferry_test_graphql2/pubspec.yaml index 1d93088c..cd262b17 100644 --- a/packages/ferry_test_graphql2/pubspec.yaml +++ b/packages/ferry_test_graphql2/pubspec.yaml @@ -18,6 +18,6 @@ dev_dependencies: build_runner: ^2.0.2 pedantic: ^1.11.0 built_value_generator: ^8.1.1 - ferry_generator: ^0.12.1-dev.2 + ferry_generator: ^0.13.0 From ba261ff266198a2329762fd9e23e2aad3040d664 Mon Sep 17 00:00:00 2001 From: Martin Kamleithner Date: Sat, 3 May 2025 21:42:15 +0100 Subject: [PATCH 10/11] chore(release): publish packages - ferry_test_graphql2@0.4.1-dev.1 --- CHANGELOG.md | 22 ++++++++++++++++++++++ packages/ferry/pubspec.yaml | 2 +- packages/ferry_test_graphql2/CHANGELOG.md | 7 +++++++ packages/ferry_test_graphql2/pubspec.yaml | 2 +- 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a25c987c..dc13864b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,28 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## 2025-05-03 + +### Changes + +--- + +Packages with breaking changes: + + - [`ferry_test_graphql2` - `v0.4.1-dev.1`](#ferry_test_graphql2---v041-dev1) + +Packages with other changes: + + - There are no other changes in this release. + +--- + +#### `ferry_test_graphql2` - `v0.4.1-dev.1` + + - **BREAKING** **FEAT**(ferry_test_external_schema): update for new gql_code_builder version. + - **BREAKING** **FEAT**(ferry_generator): upgrade gql_code_builder to 0.14.0. + + ## 2025-05-03 ### Changes diff --git a/packages/ferry/pubspec.yaml b/packages/ferry/pubspec.yaml index e32d48de..c4d242f0 100644 --- a/packages/ferry/pubspec.yaml +++ b/packages/ferry/pubspec.yaml @@ -27,7 +27,7 @@ dev_dependencies: mockito: ^5.3.1 build_test: ^2.0.0 built_value_generator: ^8.0.4 - ferry_test_graphql2: ^0.4.1-dev.0 + ferry_test_graphql2: ^0.4.1-dev.1 pedantic: ^1.11.0 async: ^2.5.0 build_runner: ^2.0.2 diff --git a/packages/ferry_test_graphql2/CHANGELOG.md b/packages/ferry_test_graphql2/CHANGELOG.md index 0e1a0532..cc18375c 100644 --- a/packages/ferry_test_graphql2/CHANGELOG.md +++ b/packages/ferry_test_graphql2/CHANGELOG.md @@ -1,3 +1,10 @@ +## 0.4.1-dev.1 + +> Note: This release has breaking changes. + + - **BREAKING** **FEAT**(ferry_test_external_schema): update for new gql_code_builder version. + - **BREAKING** **FEAT**(ferry_generator): upgrade gql_code_builder to 0.14.0. + ## 0.4.1-dev.0 - **FEAT**(ferry_generator): move to dart_style 3.0.0 (#632). diff --git a/packages/ferry_test_graphql2/pubspec.yaml b/packages/ferry_test_graphql2/pubspec.yaml index cd262b17..c15b927a 100644 --- a/packages/ferry_test_graphql2/pubspec.yaml +++ b/packages/ferry_test_graphql2/pubspec.yaml @@ -1,5 +1,5 @@ name: ferry_test_graphql2 -version: 0.4.1-dev.0 +version: 0.4.1-dev.1 description: Example GraphQL Operations, used in Ferry tests repository: https://github.com/gql-dart/ferry environment: From 9da9e96cdc1c721a7c292f7b367f06860c97c54b Mon Sep 17 00:00:00 2001 From: Martin Kamleithner Date: Sat, 3 May 2025 21:46:19 +0100 Subject: [PATCH 11/11] Update CHANGELOG.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- CHANGELOG.md | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc13864b..5cb0ca81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,23 +24,6 @@ Packages with other changes: - **BREAKING** **FEAT**(ferry_test_external_schema): update for new gql_code_builder version. - **BREAKING** **FEAT**(ferry_generator): upgrade gql_code_builder to 0.14.0. - -## 2025-05-03 - -### Changes - ---- - -Packages with breaking changes: - - - [`ferry_generator` - `v0.13.0`](#ferry_generator---v0130) - -Packages with other changes: - - - There are no other changes in this release. - ---- - #### `ferry_generator` - `v0.13.0` - **BREAKING** **FEAT**(ferry_generator): upgrade gql_code_builder to 0.14.0.