diff --git a/codegen/end_to_end_test/lib/aliases/__generated__/aliased_hero.data.gql.dart b/codegen/end_to_end_test/lib/aliases/__generated__/aliased_hero.data.gql.dart index c7b4f12c1..e258e0e87 100644 --- a/codegen/end_to_end_test/lib/aliases/__generated__/aliased_hero.data.gql.dart +++ b/codegen/end_to_end_test/lib/aliases/__generated__/aliased_hero.data.gql.dart @@ -49,7 +49,7 @@ abstract class GAliasedHeroData_empireHero String get G__typename; String get id; String get name; - BuiltList<_i2.GEpisode> get from; + BuiltList<_i2.GEpisode?> get from; static Serializer get serializer => _$gAliasedHeroDataEmpireHeroSerializer; Map toJson() => (_i1.serializers.serializeWith( @@ -74,7 +74,7 @@ abstract class GAliasedHeroData_jediHero String get G__typename; String get id; String get name; - BuiltList<_i2.GEpisode> get from; + BuiltList<_i2.GEpisode?> get from; static Serializer get serializer => _$gAliasedHeroDataJediHeroSerializer; Map toJson() => diff --git a/codegen/end_to_end_test/lib/aliases/__generated__/aliased_hero.data.gql.g.dart b/codegen/end_to_end_test/lib/aliases/__generated__/aliased_hero.data.gql.g.dart index de68289d4..ed85bfb57 100644 --- a/codegen/end_to_end_test/lib/aliases/__generated__/aliased_hero.data.gql.g.dart +++ b/codegen/end_to_end_test/lib/aliases/__generated__/aliased_hero.data.gql.g.dart @@ -103,8 +103,8 @@ class _$GAliasedHeroData_empireHeroSerializer serializers.serialize(object.name, specifiedType: const FullType(String)), 'from', serializers.serialize(object.from, - specifiedType: - const FullType(BuiltList, const [const FullType(_i2.GEpisode)])), + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(_i2.GEpisode)])), ]; return result; @@ -136,9 +136,9 @@ class _$GAliasedHeroData_empireHeroSerializer break; case 'from': result.from.replace(serializers.deserialize(value, - specifiedType: const FullType( - BuiltList, const [const FullType(_i2.GEpisode)]))! - as BuiltList); + specifiedType: const FullType(BuiltList, const [ + const FullType.nullable(_i2.GEpisode) + ]))! as BuiltList); break; } } @@ -171,8 +171,8 @@ class _$GAliasedHeroData_jediHeroSerializer serializers.serialize(object.name, specifiedType: const FullType(String)), 'from', serializers.serialize(object.from, - specifiedType: - const FullType(BuiltList, const [const FullType(_i2.GEpisode)])), + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(_i2.GEpisode)])), ]; return result; @@ -204,9 +204,9 @@ class _$GAliasedHeroData_jediHeroSerializer break; case 'from': result.from.replace(serializers.deserialize(value, - specifiedType: const FullType( - BuiltList, const [const FullType(_i2.GEpisode)]))! - as BuiltList); + specifiedType: const FullType(BuiltList, const [ + const FullType.nullable(_i2.GEpisode) + ]))! as BuiltList); break; } } @@ -351,7 +351,7 @@ class _$GAliasedHeroData_empireHero extends GAliasedHeroData_empireHero { @override final String name; @override - final BuiltList<_i2.GEpisode> from; + final BuiltList<_i2.GEpisode?> from; factory _$GAliasedHeroData_empireHero( [void Function(GAliasedHeroData_empireHeroBuilder)? updates]) => @@ -428,10 +428,10 @@ class GAliasedHeroData_empireHeroBuilder String? get name => _$this._name; set name(String? name) => _$this._name = name; - ListBuilder<_i2.GEpisode>? _from; - ListBuilder<_i2.GEpisode> get from => - _$this._from ??= new ListBuilder<_i2.GEpisode>(); - set from(ListBuilder<_i2.GEpisode>? from) => _$this._from = from; + ListBuilder<_i2.GEpisode?>? _from; + ListBuilder<_i2.GEpisode?> get from => + _$this._from ??= new ListBuilder<_i2.GEpisode?>(); + set from(ListBuilder<_i2.GEpisode?>? from) => _$this._from = from; GAliasedHeroData_empireHeroBuilder() { GAliasedHeroData_empireHero._initializeBuilder(this); @@ -499,7 +499,7 @@ class _$GAliasedHeroData_jediHero extends GAliasedHeroData_jediHero { @override final String name; @override - final BuiltList<_i2.GEpisode> from; + final BuiltList<_i2.GEpisode?> from; factory _$GAliasedHeroData_jediHero( [void Function(GAliasedHeroData_jediHeroBuilder)? updates]) => @@ -575,10 +575,10 @@ class GAliasedHeroData_jediHeroBuilder String? get name => _$this._name; set name(String? name) => _$this._name = name; - ListBuilder<_i2.GEpisode>? _from; - ListBuilder<_i2.GEpisode> get from => - _$this._from ??= new ListBuilder<_i2.GEpisode>(); - set from(ListBuilder<_i2.GEpisode>? from) => _$this._from = from; + ListBuilder<_i2.GEpisode?>? _from; + ListBuilder<_i2.GEpisode?> get from => + _$this._from ??= new ListBuilder<_i2.GEpisode?>(); + set from(ListBuilder<_i2.GEpisode?>? from) => _$this._from = from; GAliasedHeroData_jediHeroBuilder() { GAliasedHeroData_jediHero._initializeBuilder(this); diff --git a/codegen/end_to_end_test/lib/directives/__generated__/hero_include.ast.gql.dart b/codegen/end_to_end_test/lib/directives/__generated__/hero_include.ast.gql.dart new file mode 100644 index 000000000..f5305d28f --- /dev/null +++ b/codegen/end_to_end_test/lib/directives/__generated__/hero_include.ast.gql.dart @@ -0,0 +1,49 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:gql/ast.dart' as _i1; + +const HeroInclude = _i1.OperationDefinitionNode( + type: _i1.OperationType.query, + name: _i1.NameNode(value: 'HeroInclude'), + variableDefinitions: [ + _i1.VariableDefinitionNode( + variable: _i1.VariableNode(name: _i1.NameNode(value: 'includeId')), + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'Boolean'), isNonNull: true), + defaultValue: _i1.DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: _i1.SelectionSetNode(selections: [ + _i1.FieldNode( + name: _i1.NameNode(value: 'hero'), + alias: null, + arguments: [], + directives: [], + selectionSet: _i1.SelectionSetNode(selections: [ + _i1.FieldNode( + name: _i1.NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [ + _i1.DirectiveNode( + name: _i1.NameNode(value: 'include'), + arguments: [ + _i1.ArgumentNode( + name: _i1.NameNode(value: 'if'), + value: _i1.VariableNode( + name: _i1.NameNode(value: 'includeId'))) + ]) + ], + selectionSet: null), + _i1.FieldNode( + name: _i1.NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [], + selectionSet: null) + ])) + ])); +const document = _i1.DocumentNode(definitions: [HeroInclude]); diff --git a/codegen/end_to_end_test/lib/directives/__generated__/hero_include.data.gql.dart b/codegen/end_to_end_test/lib/directives/__generated__/hero_include.data.gql.dart new file mode 100644 index 000000000..dcfffbc9d --- /dev/null +++ b/codegen/end_to_end_test/lib/directives/__generated__/hero_include.data.gql.dart @@ -0,0 +1,54 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; +import 'package:end_to_end_test/graphql/__generated__/serializers.gql.dart' + as _i1; + +part 'hero_include.data.gql.g.dart'; + +abstract class GHeroIncludeData + implements Built { + GHeroIncludeData._(); + + factory GHeroIncludeData([Function(GHeroIncludeDataBuilder b) updates]) = + _$GHeroIncludeData; + + static void _initializeBuilder(GHeroIncludeDataBuilder b) => + b..G__typename = 'Query'; + @BuiltValueField(wireName: '__typename') + String get G__typename; + GHeroIncludeData_hero? get hero; + static Serializer get serializer => + _$gHeroIncludeDataSerializer; + Map toJson() => + (_i1.serializers.serializeWith(GHeroIncludeData.serializer, this) + as Map); + static GHeroIncludeData? fromJson(Map json) => + _i1.serializers.deserializeWith(GHeroIncludeData.serializer, json); +} + +abstract class GHeroIncludeData_hero + implements Built { + GHeroIncludeData_hero._(); + + factory GHeroIncludeData_hero( + [Function(GHeroIncludeData_heroBuilder b) updates]) = + _$GHeroIncludeData_hero; + + static void _initializeBuilder(GHeroIncludeData_heroBuilder b) => + b..G__typename = 'Character'; + @BuiltValueField(wireName: '__typename') + String get G__typename; + String? get id; + String get name; + static Serializer get serializer => + _$gHeroIncludeDataHeroSerializer; + Map toJson() => + (_i1.serializers.serializeWith(GHeroIncludeData_hero.serializer, this) + as Map); + static GHeroIncludeData_hero? fromJson(Map json) => + _i1.serializers.deserializeWith(GHeroIncludeData_hero.serializer, json); +} diff --git a/codegen/end_to_end_test/lib/directives/__generated__/hero_include.data.gql.g.dart b/codegen/end_to_end_test/lib/directives/__generated__/hero_include.data.gql.g.dart new file mode 100644 index 000000000..f0d7b1b42 --- /dev/null +++ b/codegen/end_to_end_test/lib/directives/__generated__/hero_include.data.gql.g.dart @@ -0,0 +1,354 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'hero_include.data.gql.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$gHeroIncludeDataSerializer = + new _$GHeroIncludeDataSerializer(); +Serializer _$gHeroIncludeDataHeroSerializer = + new _$GHeroIncludeData_heroSerializer(); + +class _$GHeroIncludeDataSerializer + implements StructuredSerializer { + @override + final Iterable types = const [GHeroIncludeData, _$GHeroIncludeData]; + @override + final String wireName = 'GHeroIncludeData'; + + @override + Iterable serialize(Serializers serializers, GHeroIncludeData object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + '__typename', + serializers.serialize(object.G__typename, + specifiedType: const FullType(String)), + ]; + Object? value; + value = object.hero; + if (value != null) { + result + ..add('hero') + ..add(serializers.serialize(value, + specifiedType: const FullType(GHeroIncludeData_hero))); + } + return result; + } + + @override + GHeroIncludeData deserialize( + Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = new GHeroIncludeDataBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case '__typename': + result.G__typename = serializers.deserialize(value, + specifiedType: const FullType(String))! as String; + break; + case 'hero': + result.hero.replace(serializers.deserialize(value, + specifiedType: const FullType(GHeroIncludeData_hero))! + as GHeroIncludeData_hero); + break; + } + } + + return result.build(); + } +} + +class _$GHeroIncludeData_heroSerializer + implements StructuredSerializer { + @override + final Iterable types = const [ + GHeroIncludeData_hero, + _$GHeroIncludeData_hero + ]; + @override + final String wireName = 'GHeroIncludeData_hero'; + + @override + Iterable serialize( + Serializers serializers, GHeroIncludeData_hero object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + '__typename', + serializers.serialize(object.G__typename, + specifiedType: const FullType(String)), + 'name', + serializers.serialize(object.name, specifiedType: const FullType(String)), + ]; + Object? value; + value = object.id; + if (value != null) { + result + ..add('id') + ..add(serializers.serialize(value, + specifiedType: const FullType(String))); + } + return result; + } + + @override + GHeroIncludeData_hero deserialize( + Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = new GHeroIncludeData_heroBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case '__typename': + result.G__typename = serializers.deserialize(value, + specifiedType: const FullType(String))! as String; + break; + case 'id': + 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; + } + } + + return result.build(); + } +} + +class _$GHeroIncludeData extends GHeroIncludeData { + @override + final String G__typename; + @override + final GHeroIncludeData_hero? hero; + + factory _$GHeroIncludeData( + [void Function(GHeroIncludeDataBuilder)? updates]) => + (new GHeroIncludeDataBuilder()..update(updates))._build(); + + _$GHeroIncludeData._({required this.G__typename, this.hero}) : super._() { + BuiltValueNullFieldError.checkNotNull( + G__typename, r'GHeroIncludeData', 'G__typename'); + } + + @override + GHeroIncludeData rebuild(void Function(GHeroIncludeDataBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + GHeroIncludeDataBuilder toBuilder() => + new GHeroIncludeDataBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GHeroIncludeData && + G__typename == other.G__typename && + hero == other.hero; + } + + @override + int get hashCode { + return $jf($jc($jc(0, G__typename.hashCode), hero.hashCode)); + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'GHeroIncludeData') + ..add('G__typename', G__typename) + ..add('hero', hero)) + .toString(); + } +} + +class GHeroIncludeDataBuilder + implements Builder { + _$GHeroIncludeData? _$v; + + String? _G__typename; + String? get G__typename => _$this._G__typename; + set G__typename(String? G__typename) => _$this._G__typename = G__typename; + + GHeroIncludeData_heroBuilder? _hero; + GHeroIncludeData_heroBuilder get hero => + _$this._hero ??= new GHeroIncludeData_heroBuilder(); + set hero(GHeroIncludeData_heroBuilder? hero) => _$this._hero = hero; + + GHeroIncludeDataBuilder() { + GHeroIncludeData._initializeBuilder(this); + } + + GHeroIncludeDataBuilder get _$this { + final $v = _$v; + if ($v != null) { + _G__typename = $v.G__typename; + _hero = $v.hero?.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(GHeroIncludeData other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$GHeroIncludeData; + } + + @override + void update(void Function(GHeroIncludeDataBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + GHeroIncludeData build() => _build(); + + _$GHeroIncludeData _build() { + _$GHeroIncludeData _$result; + try { + _$result = _$v ?? + new _$GHeroIncludeData._( + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GHeroIncludeData', 'G__typename'), + hero: _hero?.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'hero'; + _hero?.build(); + } catch (e) { + throw new BuiltValueNestedFieldError( + r'GHeroIncludeData', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +class _$GHeroIncludeData_hero extends GHeroIncludeData_hero { + @override + final String G__typename; + @override + final String? id; + @override + final String name; + + factory _$GHeroIncludeData_hero( + [void Function(GHeroIncludeData_heroBuilder)? updates]) => + (new GHeroIncludeData_heroBuilder()..update(updates))._build(); + + _$GHeroIncludeData_hero._( + {required this.G__typename, this.id, required this.name}) + : super._() { + BuiltValueNullFieldError.checkNotNull( + G__typename, r'GHeroIncludeData_hero', 'G__typename'); + BuiltValueNullFieldError.checkNotNull( + name, r'GHeroIncludeData_hero', 'name'); + } + + @override + GHeroIncludeData_hero rebuild( + void Function(GHeroIncludeData_heroBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + GHeroIncludeData_heroBuilder toBuilder() => + new GHeroIncludeData_heroBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GHeroIncludeData_hero && + G__typename == other.G__typename && + id == other.id && + name == other.name; + } + + @override + int get hashCode { + return $jf( + $jc($jc($jc(0, G__typename.hashCode), id.hashCode), name.hashCode)); + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'GHeroIncludeData_hero') + ..add('G__typename', G__typename) + ..add('id', id) + ..add('name', name)) + .toString(); + } +} + +class GHeroIncludeData_heroBuilder + implements Builder { + _$GHeroIncludeData_hero? _$v; + + String? _G__typename; + String? get G__typename => _$this._G__typename; + set G__typename(String? G__typename) => _$this._G__typename = G__typename; + + String? _id; + 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; + + GHeroIncludeData_heroBuilder() { + GHeroIncludeData_hero._initializeBuilder(this); + } + + GHeroIncludeData_heroBuilder get _$this { + final $v = _$v; + if ($v != null) { + _G__typename = $v.G__typename; + _id = $v.id; + _name = $v.name; + _$v = null; + } + return this; + } + + @override + void replace(GHeroIncludeData_hero other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$GHeroIncludeData_hero; + } + + @override + void update(void Function(GHeroIncludeData_heroBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + GHeroIncludeData_hero build() => _build(); + + _$GHeroIncludeData_hero _build() { + final _$result = _$v ?? + new _$GHeroIncludeData_hero._( + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GHeroIncludeData_hero', 'G__typename'), + id: id, + name: BuiltValueNullFieldError.checkNotNull( + name, r'GHeroIncludeData_hero', 'name')); + replace(_$result); + return _$result; + } +} + +// 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 diff --git a/codegen/end_to_end_test/lib/directives/__generated__/hero_include.req.gql.dart b/codegen/end_to_end_test/lib/directives/__generated__/hero_include.req.gql.dart new file mode 100644 index 000000000..0e48e13ad --- /dev/null +++ b/codegen/end_to_end_test/lib/directives/__generated__/hero_include.req.gql.dart @@ -0,0 +1,35 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; +import 'package:end_to_end_test/directives/__generated__/hero_include.ast.gql.dart' + as _i2; +import 'package:end_to_end_test/directives/__generated__/hero_include.var.gql.dart' + as _i3; +import 'package:end_to_end_test/graphql/__generated__/serializers.gql.dart' + as _i4; +import 'package:gql_exec/gql_exec.dart' as _i1; + +part 'hero_include.req.gql.g.dart'; + +abstract class GHeroInclude + implements Built { + GHeroInclude._(); + + factory GHeroInclude([Function(GHeroIncludeBuilder b) updates]) = + _$GHeroInclude; + + static void _initializeBuilder(GHeroIncludeBuilder b) => b + ..operation = + _i1.Operation(document: _i2.document, operationName: 'HeroInclude'); + _i3.GHeroIncludeVars get vars; + _i1.Operation get operation; + static Serializer get serializer => _$gHeroIncludeSerializer; + Map toJson() => + (_i4.serializers.serializeWith(GHeroInclude.serializer, this) + as Map); + static GHeroInclude? fromJson(Map json) => + _i4.serializers.deserializeWith(GHeroInclude.serializer, json); +} diff --git a/codegen/end_to_end_test/lib/directives/__generated__/hero_include.req.gql.g.dart b/codegen/end_to_end_test/lib/directives/__generated__/hero_include.req.gql.g.dart new file mode 100644 index 000000000..181123bcd --- /dev/null +++ b/codegen/end_to_end_test/lib/directives/__generated__/hero_include.req.gql.g.dart @@ -0,0 +1,170 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'hero_include.req.gql.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$gHeroIncludeSerializer = + new _$GHeroIncludeSerializer(); + +class _$GHeroIncludeSerializer implements StructuredSerializer { + @override + final Iterable types = const [GHeroInclude, _$GHeroInclude]; + @override + final String wireName = 'GHeroInclude'; + + @override + Iterable serialize(Serializers serializers, GHeroInclude object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'vars', + serializers.serialize(object.vars, + specifiedType: const FullType(_i3.GHeroIncludeVars)), + 'operation', + serializers.serialize(object.operation, + specifiedType: const FullType(_i1.Operation)), + ]; + + return result; + } + + @override + GHeroInclude deserialize( + Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = new GHeroIncludeBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'vars': + result.vars.replace(serializers.deserialize(value, + specifiedType: const FullType(_i3.GHeroIncludeVars))! + as _i3.GHeroIncludeVars); + break; + case 'operation': + result.operation = serializers.deserialize(value, + specifiedType: const FullType(_i1.Operation))! as _i1.Operation; + break; + } + } + + return result.build(); + } +} + +class _$GHeroInclude extends GHeroInclude { + @override + final _i3.GHeroIncludeVars vars; + @override + final _i1.Operation operation; + + factory _$GHeroInclude([void Function(GHeroIncludeBuilder)? updates]) => + (new GHeroIncludeBuilder()..update(updates))._build(); + + _$GHeroInclude._({required this.vars, required this.operation}) : super._() { + BuiltValueNullFieldError.checkNotNull(vars, r'GHeroInclude', 'vars'); + BuiltValueNullFieldError.checkNotNull( + operation, r'GHeroInclude', 'operation'); + } + + @override + GHeroInclude rebuild(void Function(GHeroIncludeBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + GHeroIncludeBuilder toBuilder() => new GHeroIncludeBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GHeroInclude && + vars == other.vars && + operation == other.operation; + } + + @override + int get hashCode { + return $jf($jc($jc(0, vars.hashCode), operation.hashCode)); + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'GHeroInclude') + ..add('vars', vars) + ..add('operation', operation)) + .toString(); + } +} + +class GHeroIncludeBuilder + implements Builder { + _$GHeroInclude? _$v; + + _i3.GHeroIncludeVarsBuilder? _vars; + _i3.GHeroIncludeVarsBuilder get vars => + _$this._vars ??= new _i3.GHeroIncludeVarsBuilder(); + set vars(_i3.GHeroIncludeVarsBuilder? vars) => _$this._vars = vars; + + _i1.Operation? _operation; + _i1.Operation? get operation => _$this._operation; + set operation(_i1.Operation? operation) => _$this._operation = operation; + + GHeroIncludeBuilder() { + GHeroInclude._initializeBuilder(this); + } + + GHeroIncludeBuilder get _$this { + final $v = _$v; + if ($v != null) { + _vars = $v.vars.toBuilder(); + _operation = $v.operation; + _$v = null; + } + return this; + } + + @override + void replace(GHeroInclude other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$GHeroInclude; + } + + @override + void update(void Function(GHeroIncludeBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + GHeroInclude build() => _build(); + + _$GHeroInclude _build() { + _$GHeroInclude _$result; + try { + _$result = _$v ?? + new _$GHeroInclude._( + vars: vars.build(), + operation: BuiltValueNullFieldError.checkNotNull( + operation, r'GHeroInclude', 'operation')); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'vars'; + vars.build(); + } catch (e) { + throw new BuiltValueNestedFieldError( + r'GHeroInclude', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +// 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 diff --git a/codegen/end_to_end_test/lib/directives/__generated__/hero_include.var.gql.dart b/codegen/end_to_end_test/lib/directives/__generated__/hero_include.var.gql.dart new file mode 100644 index 000000000..81efe47a2 --- /dev/null +++ b/codegen/end_to_end_test/lib/directives/__generated__/hero_include.var.gql.dart @@ -0,0 +1,27 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; +import 'package:end_to_end_test/graphql/__generated__/serializers.gql.dart' + as _i1; + +part 'hero_include.var.gql.g.dart'; + +abstract class GHeroIncludeVars + implements Built { + GHeroIncludeVars._(); + + factory GHeroIncludeVars([Function(GHeroIncludeVarsBuilder b) updates]) = + _$GHeroIncludeVars; + + bool get includeId; + static Serializer get serializer => + _$gHeroIncludeVarsSerializer; + Map toJson() => + (_i1.serializers.serializeWith(GHeroIncludeVars.serializer, this) + as Map); + static GHeroIncludeVars? fromJson(Map json) => + _i1.serializers.deserializeWith(GHeroIncludeVars.serializer, json); +} diff --git a/codegen/end_to_end_test/lib/directives/__generated__/hero_include.var.gql.g.dart b/codegen/end_to_end_test/lib/directives/__generated__/hero_include.var.gql.g.dart new file mode 100644 index 000000000..b81e33c79 --- /dev/null +++ b/codegen/end_to_end_test/lib/directives/__generated__/hero_include.var.gql.g.dart @@ -0,0 +1,137 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'hero_include.var.gql.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$gHeroIncludeVarsSerializer = + new _$GHeroIncludeVarsSerializer(); + +class _$GHeroIncludeVarsSerializer + implements StructuredSerializer { + @override + final Iterable types = const [GHeroIncludeVars, _$GHeroIncludeVars]; + @override + final String wireName = 'GHeroIncludeVars'; + + @override + Iterable serialize(Serializers serializers, GHeroIncludeVars object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'includeId', + serializers.serialize(object.includeId, + specifiedType: const FullType(bool)), + ]; + + return result; + } + + @override + GHeroIncludeVars deserialize( + Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = new GHeroIncludeVarsBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'includeId': + result.includeId = serializers.deserialize(value, + specifiedType: const FullType(bool))! as bool; + break; + } + } + + return result.build(); + } +} + +class _$GHeroIncludeVars extends GHeroIncludeVars { + @override + final bool includeId; + + factory _$GHeroIncludeVars( + [void Function(GHeroIncludeVarsBuilder)? updates]) => + (new GHeroIncludeVarsBuilder()..update(updates))._build(); + + _$GHeroIncludeVars._({required this.includeId}) : super._() { + BuiltValueNullFieldError.checkNotNull( + includeId, r'GHeroIncludeVars', 'includeId'); + } + + @override + GHeroIncludeVars rebuild(void Function(GHeroIncludeVarsBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + GHeroIncludeVarsBuilder toBuilder() => + new GHeroIncludeVarsBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GHeroIncludeVars && includeId == other.includeId; + } + + @override + int get hashCode { + return $jf($jc(0, includeId.hashCode)); + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'GHeroIncludeVars') + ..add('includeId', includeId)) + .toString(); + } +} + +class GHeroIncludeVarsBuilder + implements Builder { + _$GHeroIncludeVars? _$v; + + bool? _includeId; + bool? get includeId => _$this._includeId; + set includeId(bool? includeId) => _$this._includeId = includeId; + + GHeroIncludeVarsBuilder(); + + GHeroIncludeVarsBuilder get _$this { + final $v = _$v; + if ($v != null) { + _includeId = $v.includeId; + _$v = null; + } + return this; + } + + @override + void replace(GHeroIncludeVars other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$GHeroIncludeVars; + } + + @override + void update(void Function(GHeroIncludeVarsBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + GHeroIncludeVars build() => _build(); + + _$GHeroIncludeVars _build() { + final _$result = _$v ?? + new _$GHeroIncludeVars._( + includeId: BuiltValueNullFieldError.checkNotNull( + includeId, r'GHeroIncludeVars', 'includeId')); + replace(_$result); + return _$result; + } +} + +// 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 diff --git a/codegen/end_to_end_test/lib/directives/__generated__/hero_skip.ast.gql.dart b/codegen/end_to_end_test/lib/directives/__generated__/hero_skip.ast.gql.dart new file mode 100644 index 000000000..20c04d1e3 --- /dev/null +++ b/codegen/end_to_end_test/lib/directives/__generated__/hero_skip.ast.gql.dart @@ -0,0 +1,49 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:gql/ast.dart' as _i1; + +const HeroSkip = _i1.OperationDefinitionNode( + type: _i1.OperationType.query, + name: _i1.NameNode(value: 'HeroSkip'), + variableDefinitions: [ + _i1.VariableDefinitionNode( + variable: _i1.VariableNode(name: _i1.NameNode(value: 'skipName')), + type: _i1.NamedTypeNode( + name: _i1.NameNode(value: 'Boolean'), isNonNull: true), + defaultValue: _i1.DefaultValueNode(value: null), + directives: []) + ], + directives: [], + selectionSet: _i1.SelectionSetNode(selections: [ + _i1.FieldNode( + name: _i1.NameNode(value: 'hero'), + alias: null, + arguments: [], + directives: [], + selectionSet: _i1.SelectionSetNode(selections: [ + _i1.FieldNode( + name: _i1.NameNode(value: 'id'), + alias: null, + arguments: [], + directives: [], + selectionSet: null), + _i1.FieldNode( + name: _i1.NameNode(value: 'name'), + alias: null, + arguments: [], + directives: [ + _i1.DirectiveNode( + name: _i1.NameNode(value: 'skip'), + arguments: [ + _i1.ArgumentNode( + name: _i1.NameNode(value: 'if'), + value: _i1.VariableNode( + name: _i1.NameNode(value: 'skipName'))) + ]) + ], + selectionSet: null) + ])) + ])); +const document = _i1.DocumentNode(definitions: [HeroSkip]); diff --git a/codegen/end_to_end_test/lib/directives/__generated__/hero_skip.data.gql.dart b/codegen/end_to_end_test/lib/directives/__generated__/hero_skip.data.gql.dart new file mode 100644 index 000000000..f3f5bb494 --- /dev/null +++ b/codegen/end_to_end_test/lib/directives/__generated__/hero_skip.data.gql.dart @@ -0,0 +1,52 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; +import 'package:end_to_end_test/graphql/__generated__/serializers.gql.dart' + as _i1; + +part 'hero_skip.data.gql.g.dart'; + +abstract class GHeroSkipData + implements Built { + GHeroSkipData._(); + + factory GHeroSkipData([Function(GHeroSkipDataBuilder b) updates]) = + _$GHeroSkipData; + + static void _initializeBuilder(GHeroSkipDataBuilder b) => + b..G__typename = 'Query'; + @BuiltValueField(wireName: '__typename') + String get G__typename; + GHeroSkipData_hero? get hero; + static Serializer get serializer => _$gHeroSkipDataSerializer; + Map toJson() => + (_i1.serializers.serializeWith(GHeroSkipData.serializer, this) + as Map); + static GHeroSkipData? fromJson(Map json) => + _i1.serializers.deserializeWith(GHeroSkipData.serializer, json); +} + +abstract class GHeroSkipData_hero + implements Built { + GHeroSkipData_hero._(); + + factory GHeroSkipData_hero([Function(GHeroSkipData_heroBuilder b) updates]) = + _$GHeroSkipData_hero; + + static void _initializeBuilder(GHeroSkipData_heroBuilder b) => + b..G__typename = 'Character'; + @BuiltValueField(wireName: '__typename') + String get G__typename; + String get id; + String? get name; + static Serializer get serializer => + _$gHeroSkipDataHeroSerializer; + Map toJson() => + (_i1.serializers.serializeWith(GHeroSkipData_hero.serializer, this) + as Map); + static GHeroSkipData_hero? fromJson(Map json) => + _i1.serializers.deserializeWith(GHeroSkipData_hero.serializer, json); +} diff --git a/codegen/end_to_end_test/lib/directives/__generated__/hero_skip.data.gql.g.dart b/codegen/end_to_end_test/lib/directives/__generated__/hero_skip.data.gql.g.dart new file mode 100644 index 000000000..513ca23fe --- /dev/null +++ b/codegen/end_to_end_test/lib/directives/__generated__/hero_skip.data.gql.g.dart @@ -0,0 +1,347 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'hero_skip.data.gql.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$gHeroSkipDataSerializer = + new _$GHeroSkipDataSerializer(); +Serializer _$gHeroSkipDataHeroSerializer = + new _$GHeroSkipData_heroSerializer(); + +class _$GHeroSkipDataSerializer implements StructuredSerializer { + @override + final Iterable types = const [GHeroSkipData, _$GHeroSkipData]; + @override + final String wireName = 'GHeroSkipData'; + + @override + Iterable serialize(Serializers serializers, GHeroSkipData object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + '__typename', + serializers.serialize(object.G__typename, + specifiedType: const FullType(String)), + ]; + Object? value; + value = object.hero; + if (value != null) { + result + ..add('hero') + ..add(serializers.serialize(value, + specifiedType: const FullType(GHeroSkipData_hero))); + } + return result; + } + + @override + GHeroSkipData deserialize( + Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = new GHeroSkipDataBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case '__typename': + result.G__typename = serializers.deserialize(value, + specifiedType: const FullType(String))! as String; + break; + case 'hero': + result.hero.replace(serializers.deserialize(value, + specifiedType: const FullType(GHeroSkipData_hero))! + as GHeroSkipData_hero); + break; + } + } + + return result.build(); + } +} + +class _$GHeroSkipData_heroSerializer + implements StructuredSerializer { + @override + final Iterable types = const [GHeroSkipData_hero, _$GHeroSkipData_hero]; + @override + final String wireName = 'GHeroSkipData_hero'; + + @override + Iterable serialize( + Serializers serializers, GHeroSkipData_hero object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + '__typename', + serializers.serialize(object.G__typename, + specifiedType: const FullType(String)), + 'id', + serializers.serialize(object.id, specifiedType: const FullType(String)), + ]; + Object? value; + value = object.name; + if (value != null) { + result + ..add('name') + ..add(serializers.serialize(value, + specifiedType: const FullType(String))); + } + return result; + } + + @override + GHeroSkipData_hero deserialize( + Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = new GHeroSkipData_heroBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case '__typename': + result.G__typename = serializers.deserialize(value, + specifiedType: const FullType(String))! as String; + break; + case 'id': + 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; + } + } + + return result.build(); + } +} + +class _$GHeroSkipData extends GHeroSkipData { + @override + final String G__typename; + @override + final GHeroSkipData_hero? hero; + + factory _$GHeroSkipData([void Function(GHeroSkipDataBuilder)? updates]) => + (new GHeroSkipDataBuilder()..update(updates))._build(); + + _$GHeroSkipData._({required this.G__typename, this.hero}) : super._() { + BuiltValueNullFieldError.checkNotNull( + G__typename, r'GHeroSkipData', 'G__typename'); + } + + @override + GHeroSkipData rebuild(void Function(GHeroSkipDataBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + GHeroSkipDataBuilder toBuilder() => new GHeroSkipDataBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GHeroSkipData && + G__typename == other.G__typename && + hero == other.hero; + } + + @override + int get hashCode { + return $jf($jc($jc(0, G__typename.hashCode), hero.hashCode)); + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'GHeroSkipData') + ..add('G__typename', G__typename) + ..add('hero', hero)) + .toString(); + } +} + +class GHeroSkipDataBuilder + implements Builder { + _$GHeroSkipData? _$v; + + String? _G__typename; + String? get G__typename => _$this._G__typename; + set G__typename(String? G__typename) => _$this._G__typename = G__typename; + + GHeroSkipData_heroBuilder? _hero; + GHeroSkipData_heroBuilder get hero => + _$this._hero ??= new GHeroSkipData_heroBuilder(); + set hero(GHeroSkipData_heroBuilder? hero) => _$this._hero = hero; + + GHeroSkipDataBuilder() { + GHeroSkipData._initializeBuilder(this); + } + + GHeroSkipDataBuilder get _$this { + final $v = _$v; + if ($v != null) { + _G__typename = $v.G__typename; + _hero = $v.hero?.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(GHeroSkipData other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$GHeroSkipData; + } + + @override + void update(void Function(GHeroSkipDataBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + GHeroSkipData build() => _build(); + + _$GHeroSkipData _build() { + _$GHeroSkipData _$result; + try { + _$result = _$v ?? + new _$GHeroSkipData._( + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GHeroSkipData', 'G__typename'), + hero: _hero?.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'hero'; + _hero?.build(); + } catch (e) { + throw new BuiltValueNestedFieldError( + r'GHeroSkipData', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +class _$GHeroSkipData_hero extends GHeroSkipData_hero { + @override + final String G__typename; + @override + final String id; + @override + final String? name; + + factory _$GHeroSkipData_hero( + [void Function(GHeroSkipData_heroBuilder)? updates]) => + (new GHeroSkipData_heroBuilder()..update(updates))._build(); + + _$GHeroSkipData_hero._( + {required this.G__typename, required this.id, this.name}) + : super._() { + BuiltValueNullFieldError.checkNotNull( + G__typename, r'GHeroSkipData_hero', 'G__typename'); + BuiltValueNullFieldError.checkNotNull(id, r'GHeroSkipData_hero', 'id'); + } + + @override + GHeroSkipData_hero rebuild( + void Function(GHeroSkipData_heroBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + GHeroSkipData_heroBuilder toBuilder() => + new GHeroSkipData_heroBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GHeroSkipData_hero && + G__typename == other.G__typename && + id == other.id && + name == other.name; + } + + @override + int get hashCode { + return $jf( + $jc($jc($jc(0, G__typename.hashCode), id.hashCode), name.hashCode)); + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'GHeroSkipData_hero') + ..add('G__typename', G__typename) + ..add('id', id) + ..add('name', name)) + .toString(); + } +} + +class GHeroSkipData_heroBuilder + implements Builder { + _$GHeroSkipData_hero? _$v; + + String? _G__typename; + String? get G__typename => _$this._G__typename; + set G__typename(String? G__typename) => _$this._G__typename = G__typename; + + String? _id; + 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; + + GHeroSkipData_heroBuilder() { + GHeroSkipData_hero._initializeBuilder(this); + } + + GHeroSkipData_heroBuilder get _$this { + final $v = _$v; + if ($v != null) { + _G__typename = $v.G__typename; + _id = $v.id; + _name = $v.name; + _$v = null; + } + return this; + } + + @override + void replace(GHeroSkipData_hero other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$GHeroSkipData_hero; + } + + @override + void update(void Function(GHeroSkipData_heroBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + GHeroSkipData_hero build() => _build(); + + _$GHeroSkipData_hero _build() { + final _$result = _$v ?? + new _$GHeroSkipData_hero._( + G__typename: BuiltValueNullFieldError.checkNotNull( + G__typename, r'GHeroSkipData_hero', 'G__typename'), + id: BuiltValueNullFieldError.checkNotNull( + id, r'GHeroSkipData_hero', 'id'), + name: name); + replace(_$result); + return _$result; + } +} + +// 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 diff --git a/codegen/end_to_end_test/lib/directives/__generated__/hero_skip.req.gql.dart b/codegen/end_to_end_test/lib/directives/__generated__/hero_skip.req.gql.dart new file mode 100644 index 000000000..6f9d4a4d8 --- /dev/null +++ b/codegen/end_to_end_test/lib/directives/__generated__/hero_skip.req.gql.dart @@ -0,0 +1,33 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; +import 'package:end_to_end_test/directives/__generated__/hero_skip.ast.gql.dart' + as _i2; +import 'package:end_to_end_test/directives/__generated__/hero_skip.var.gql.dart' + as _i3; +import 'package:end_to_end_test/graphql/__generated__/serializers.gql.dart' + as _i4; +import 'package:gql_exec/gql_exec.dart' as _i1; + +part 'hero_skip.req.gql.g.dart'; + +abstract class GHeroSkip implements Built { + GHeroSkip._(); + + factory GHeroSkip([Function(GHeroSkipBuilder b) updates]) = _$GHeroSkip; + + static void _initializeBuilder(GHeroSkipBuilder b) => b + ..operation = + _i1.Operation(document: _i2.document, operationName: 'HeroSkip'); + _i3.GHeroSkipVars get vars; + _i1.Operation get operation; + static Serializer get serializer => _$gHeroSkipSerializer; + Map toJson() => + (_i4.serializers.serializeWith(GHeroSkip.serializer, this) + as Map); + static GHeroSkip? fromJson(Map json) => + _i4.serializers.deserializeWith(GHeroSkip.serializer, json); +} diff --git a/codegen/end_to_end_test/lib/directives/__generated__/hero_skip.req.gql.g.dart b/codegen/end_to_end_test/lib/directives/__generated__/hero_skip.req.gql.g.dart new file mode 100644 index 000000000..d819e2b84 --- /dev/null +++ b/codegen/end_to_end_test/lib/directives/__generated__/hero_skip.req.gql.g.dart @@ -0,0 +1,166 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'hero_skip.req.gql.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$gHeroSkipSerializer = new _$GHeroSkipSerializer(); + +class _$GHeroSkipSerializer implements StructuredSerializer { + @override + final Iterable types = const [GHeroSkip, _$GHeroSkip]; + @override + final String wireName = 'GHeroSkip'; + + @override + Iterable serialize(Serializers serializers, GHeroSkip object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'vars', + serializers.serialize(object.vars, + specifiedType: const FullType(_i3.GHeroSkipVars)), + 'operation', + serializers.serialize(object.operation, + specifiedType: const FullType(_i1.Operation)), + ]; + + return result; + } + + @override + GHeroSkip deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = new GHeroSkipBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'vars': + result.vars.replace(serializers.deserialize(value, + specifiedType: const FullType(_i3.GHeroSkipVars))! + as _i3.GHeroSkipVars); + break; + case 'operation': + result.operation = serializers.deserialize(value, + specifiedType: const FullType(_i1.Operation))! as _i1.Operation; + break; + } + } + + return result.build(); + } +} + +class _$GHeroSkip extends GHeroSkip { + @override + final _i3.GHeroSkipVars vars; + @override + final _i1.Operation operation; + + factory _$GHeroSkip([void Function(GHeroSkipBuilder)? updates]) => + (new GHeroSkipBuilder()..update(updates))._build(); + + _$GHeroSkip._({required this.vars, required this.operation}) : super._() { + BuiltValueNullFieldError.checkNotNull(vars, r'GHeroSkip', 'vars'); + BuiltValueNullFieldError.checkNotNull(operation, r'GHeroSkip', 'operation'); + } + + @override + GHeroSkip rebuild(void Function(GHeroSkipBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + GHeroSkipBuilder toBuilder() => new GHeroSkipBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GHeroSkip && + vars == other.vars && + operation == other.operation; + } + + @override + int get hashCode { + return $jf($jc($jc(0, vars.hashCode), operation.hashCode)); + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'GHeroSkip') + ..add('vars', vars) + ..add('operation', operation)) + .toString(); + } +} + +class GHeroSkipBuilder implements Builder { + _$GHeroSkip? _$v; + + _i3.GHeroSkipVarsBuilder? _vars; + _i3.GHeroSkipVarsBuilder get vars => + _$this._vars ??= new _i3.GHeroSkipVarsBuilder(); + set vars(_i3.GHeroSkipVarsBuilder? vars) => _$this._vars = vars; + + _i1.Operation? _operation; + _i1.Operation? get operation => _$this._operation; + set operation(_i1.Operation? operation) => _$this._operation = operation; + + GHeroSkipBuilder() { + GHeroSkip._initializeBuilder(this); + } + + GHeroSkipBuilder get _$this { + final $v = _$v; + if ($v != null) { + _vars = $v.vars.toBuilder(); + _operation = $v.operation; + _$v = null; + } + return this; + } + + @override + void replace(GHeroSkip other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$GHeroSkip; + } + + @override + void update(void Function(GHeroSkipBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + GHeroSkip build() => _build(); + + _$GHeroSkip _build() { + _$GHeroSkip _$result; + try { + _$result = _$v ?? + new _$GHeroSkip._( + vars: vars.build(), + operation: BuiltValueNullFieldError.checkNotNull( + operation, r'GHeroSkip', 'operation')); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'vars'; + vars.build(); + } catch (e) { + throw new BuiltValueNestedFieldError( + r'GHeroSkip', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +// 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 diff --git a/codegen/end_to_end_test/lib/directives/__generated__/hero_skip.var.gql.dart b/codegen/end_to_end_test/lib/directives/__generated__/hero_skip.var.gql.dart new file mode 100644 index 000000000..761054319 --- /dev/null +++ b/codegen/end_to_end_test/lib/directives/__generated__/hero_skip.var.gql.dart @@ -0,0 +1,26 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; +import 'package:end_to_end_test/graphql/__generated__/serializers.gql.dart' + as _i1; + +part 'hero_skip.var.gql.g.dart'; + +abstract class GHeroSkipVars + implements Built { + GHeroSkipVars._(); + + factory GHeroSkipVars([Function(GHeroSkipVarsBuilder b) updates]) = + _$GHeroSkipVars; + + bool get skipName; + static Serializer get serializer => _$gHeroSkipVarsSerializer; + Map toJson() => + (_i1.serializers.serializeWith(GHeroSkipVars.serializer, this) + as Map); + static GHeroSkipVars? fromJson(Map json) => + _i1.serializers.deserializeWith(GHeroSkipVars.serializer, json); +} diff --git a/codegen/end_to_end_test/lib/directives/__generated__/hero_skip.var.gql.g.dart b/codegen/end_to_end_test/lib/directives/__generated__/hero_skip.var.gql.g.dart new file mode 100644 index 000000000..f5501242e --- /dev/null +++ b/codegen/end_to_end_test/lib/directives/__generated__/hero_skip.var.gql.g.dart @@ -0,0 +1,134 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'hero_skip.var.gql.dart'; + +// ************************************************************************** +// BuiltValueGenerator +// ************************************************************************** + +Serializer _$gHeroSkipVarsSerializer = + new _$GHeroSkipVarsSerializer(); + +class _$GHeroSkipVarsSerializer implements StructuredSerializer { + @override + final Iterable types = const [GHeroSkipVars, _$GHeroSkipVars]; + @override + final String wireName = 'GHeroSkipVars'; + + @override + Iterable serialize(Serializers serializers, GHeroSkipVars object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'skipName', + serializers.serialize(object.skipName, + specifiedType: const FullType(bool)), + ]; + + return result; + } + + @override + GHeroSkipVars deserialize( + Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = new GHeroSkipVarsBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'skipName': + result.skipName = serializers.deserialize(value, + specifiedType: const FullType(bool))! as bool; + break; + } + } + + return result.build(); + } +} + +class _$GHeroSkipVars extends GHeroSkipVars { + @override + final bool skipName; + + factory _$GHeroSkipVars([void Function(GHeroSkipVarsBuilder)? updates]) => + (new GHeroSkipVarsBuilder()..update(updates))._build(); + + _$GHeroSkipVars._({required this.skipName}) : super._() { + BuiltValueNullFieldError.checkNotNull( + skipName, r'GHeroSkipVars', 'skipName'); + } + + @override + GHeroSkipVars rebuild(void Function(GHeroSkipVarsBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + GHeroSkipVarsBuilder toBuilder() => new GHeroSkipVarsBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is GHeroSkipVars && skipName == other.skipName; + } + + @override + int get hashCode { + return $jf($jc(0, skipName.hashCode)); + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'GHeroSkipVars') + ..add('skipName', skipName)) + .toString(); + } +} + +class GHeroSkipVarsBuilder + implements Builder { + _$GHeroSkipVars? _$v; + + bool? _skipName; + bool? get skipName => _$this._skipName; + set skipName(bool? skipName) => _$this._skipName = skipName; + + GHeroSkipVarsBuilder(); + + GHeroSkipVarsBuilder get _$this { + final $v = _$v; + if ($v != null) { + _skipName = $v.skipName; + _$v = null; + } + return this; + } + + @override + void replace(GHeroSkipVars other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$GHeroSkipVars; + } + + @override + void update(void Function(GHeroSkipVarsBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + GHeroSkipVars build() => _build(); + + _$GHeroSkipVars _build() { + final _$result = _$v ?? + new _$GHeroSkipVars._( + skipName: BuiltValueNullFieldError.checkNotNull( + skipName, r'GHeroSkipVars', 'skipName')); + replace(_$result); + return _$result; + } +} + +// 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 diff --git a/codegen/end_to_end_test/lib/directives/hero_include.graphql b/codegen/end_to_end_test/lib/directives/hero_include.graphql new file mode 100644 index 000000000..b0ed5d081 --- /dev/null +++ b/codegen/end_to_end_test/lib/directives/hero_include.graphql @@ -0,0 +1,6 @@ +query HeroInclude($includeId: Boolean!) { + hero { + id @include(if: $includeId) + name + } +} diff --git a/codegen/end_to_end_test/lib/directives/hero_skip.graphql b/codegen/end_to_end_test/lib/directives/hero_skip.graphql new file mode 100644 index 000000000..9135240c8 --- /dev/null +++ b/codegen/end_to_end_test/lib/directives/hero_skip.graphql @@ -0,0 +1,6 @@ +query HeroSkip($skipName: Boolean!) { + hero { + id + name @skip(if: $skipName) + } +} diff --git a/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_fragments.data.gql.dart b/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_fragments.data.gql.dart index d5ed8b784..c6351583b 100644 --- a/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_fragments.data.gql.dart +++ b/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_fragments.data.gql.dart @@ -83,7 +83,7 @@ abstract class GHeroWithFragmentsData_hero_friendsConnection @override int? get totalCount; @override - BuiltList? get edges; + BuiltList? get edges; static Serializer get serializer => _$gHeroWithFragmentsDataHeroFriendsConnectionSerializer; @override @@ -206,7 +206,7 @@ abstract class GcomparisonFields implements GheroData { abstract class GcomparisonFields_friendsConnection { String get G__typename; int? get totalCount; - BuiltList? get edges; + BuiltList? get edges; Map toJson(); } @@ -278,7 +278,7 @@ abstract class GcomparisonFieldsData_friendsConnection @override int? get totalCount; @override - BuiltList? get edges; + BuiltList? get edges; static Serializer get serializer => _$gcomparisonFieldsDataFriendsConnectionSerializer; @override diff --git a/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_fragments.data.gql.g.dart b/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_fragments.data.gql.g.dart index 19a223010..096836abf 100644 --- a/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_fragments.data.gql.g.dart +++ b/codegen/end_to_end_test/lib/fragments/__generated__/hero_with_fragments.data.gql.g.dart @@ -192,7 +192,7 @@ class _$GHeroWithFragmentsData_hero_friendsConnectionSerializer ..add('edges') ..add(serializers.serialize(value, specifiedType: const FullType(BuiltList, const [ - const FullType( + const FullType.nullable( GHeroWithFragmentsData_hero_friendsConnection_edges) ]))); } @@ -222,7 +222,7 @@ class _$GHeroWithFragmentsData_hero_friendsConnectionSerializer case 'edges': result.edges.replace(serializers.deserialize(value, specifiedType: const FullType(BuiltList, const [ - const FullType( + const FullType.nullable( GHeroWithFragmentsData_hero_friendsConnection_edges) ]))! as BuiltList); break; @@ -499,7 +499,8 @@ class _$GcomparisonFieldsData_friendsConnectionSerializer ..add('edges') ..add(serializers.serialize(value, specifiedType: const FullType(BuiltList, const [ - const FullType(GcomparisonFieldsData_friendsConnection_edges) + const FullType.nullable( + GcomparisonFieldsData_friendsConnection_edges) ]))); } return result; @@ -528,7 +529,8 @@ class _$GcomparisonFieldsData_friendsConnectionSerializer case 'edges': result.edges.replace(serializers.deserialize(value, specifiedType: const FullType(BuiltList, const [ - const FullType(GcomparisonFieldsData_friendsConnection_edges) + const FullType.nullable( + GcomparisonFieldsData_friendsConnection_edges) ]))! as BuiltList); break; } @@ -925,7 +927,7 @@ class _$GHeroWithFragmentsData_hero_friendsConnection @override final int? totalCount; @override - final BuiltList? edges; + final BuiltList? edges; factory _$GHeroWithFragmentsData_hero_friendsConnection( [void Function(GHeroWithFragmentsData_hero_friendsConnectionBuilder)? @@ -991,13 +993,13 @@ class GHeroWithFragmentsData_hero_friendsConnectionBuilder int? get totalCount => _$this._totalCount; set totalCount(int? totalCount) => _$this._totalCount = totalCount; - ListBuilder? _edges; + ListBuilder? _edges; ListBuilder< - GHeroWithFragmentsData_hero_friendsConnection_edges> get edges => _$this + GHeroWithFragmentsData_hero_friendsConnection_edges?> get edges => _$this ._edges ??= - new ListBuilder(); + new ListBuilder(); set edges( - ListBuilder? + ListBuilder? edges) => _$this._edges = edges; @@ -1571,7 +1573,7 @@ class _$GcomparisonFieldsData_friendsConnection @override final int? totalCount; @override - final BuiltList? edges; + final BuiltList? edges; factory _$GcomparisonFieldsData_friendsConnection( [void Function(GcomparisonFieldsData_friendsConnectionBuilder)? @@ -1636,12 +1638,12 @@ class GcomparisonFieldsData_friendsConnectionBuilder int? get totalCount => _$this._totalCount; set totalCount(int? totalCount) => _$this._totalCount = totalCount; - ListBuilder? _edges; - ListBuilder get edges => + ListBuilder? _edges; + ListBuilder get edges => _$this._edges ??= - new ListBuilder(); + new ListBuilder(); set edges( - ListBuilder? edges) => + ListBuilder? edges) => _$this._edges = edges; GcomparisonFieldsData_friendsConnectionBuilder() { diff --git a/codegen/end_to_end_test/lib/graphql/__generated__/schema.schema.gql.dart b/codegen/end_to_end_test/lib/graphql/__generated__/schema.schema.gql.dart index d1b1cc933..a6e51b7a6 100644 --- a/codegen/end_to_end_test/lib/graphql/__generated__/schema.schema.gql.dart +++ b/codegen/end_to_end_test/lib/graphql/__generated__/schema.schema.gql.dart @@ -49,7 +49,7 @@ abstract class GReviewInput int get stars; String? get commentary; GColorInput? get favorite_color; - BuiltList? get seenOn; + BuiltList? get seenOn; static Serializer get serializer => _$gReviewInputSerializer; Map toJson() => (_i1.serializers.serializeWith(GReviewInput.serializer, this) diff --git a/codegen/end_to_end_test/lib/graphql/__generated__/schema.schema.gql.g.dart b/codegen/end_to_end_test/lib/graphql/__generated__/schema.schema.gql.g.dart index 8e99d0860..9a3934830 100644 --- a/codegen/end_to_end_test/lib/graphql/__generated__/schema.schema.gql.g.dart +++ b/codegen/end_to_end_test/lib/graphql/__generated__/schema.schema.gql.g.dart @@ -131,8 +131,8 @@ class _$GReviewInputSerializer implements StructuredSerializer { result ..add('seenOn') ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(DateTime)]))); + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(DateTime)]))); } return result; } @@ -164,7 +164,7 @@ class _$GReviewInputSerializer implements StructuredSerializer { case 'seenOn': result.seenOn.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(DateTime)]))! + BuiltList, const [const FullType.nullable(DateTime)]))! as BuiltList); break; } @@ -233,7 +233,7 @@ class _$GReviewInput extends GReviewInput { @override final GColorInput? favorite_color; @override - final BuiltList? seenOn; + final BuiltList? seenOn; factory _$GReviewInput([void Function(GReviewInputBuilder)? updates]) => (new GReviewInputBuilder()..update(updates))._build(); @@ -298,10 +298,10 @@ class GReviewInputBuilder set favorite_color(GColorInputBuilder? favorite_color) => _$this._favorite_color = favorite_color; - ListBuilder? _seenOn; - ListBuilder get seenOn => - _$this._seenOn ??= new ListBuilder(); - set seenOn(ListBuilder? seenOn) => _$this._seenOn = seenOn; + ListBuilder? _seenOn; + ListBuilder get seenOn => + _$this._seenOn ??= new ListBuilder(); + set seenOn(ListBuilder? seenOn) => _$this._seenOn = seenOn; GReviewInputBuilder(); diff --git a/codegen/end_to_end_test/lib/graphql/__generated__/serializers.gql.dart b/codegen/end_to_end_test/lib/graphql/__generated__/serializers.gql.dart index 3ba62bc44..53e34bfab 100644 --- a/codegen/end_to_end_test/lib/graphql/__generated__/serializers.gql.dart +++ b/codegen/end_to_end_test/lib/graphql/__generated__/serializers.gql.dart @@ -14,6 +14,18 @@ import 'package:end_to_end_test/custom_field.dart'; import 'package:end_to_end_test/custom_field_serializer.dart' show CustomFieldSerializer; import 'package:end_to_end_test/date_serializer.dart' show DateSerializer; +import 'package:end_to_end_test/directives/__generated__/hero_include.data.gql.dart' + show GHeroIncludeData, GHeroIncludeData_hero; +import 'package:end_to_end_test/directives/__generated__/hero_include.req.gql.dart' + show GHeroInclude; +import 'package:end_to_end_test/directives/__generated__/hero_include.var.gql.dart' + show GHeroIncludeVars; +import 'package:end_to_end_test/directives/__generated__/hero_skip.data.gql.dart' + show GHeroSkipData, GHeroSkipData_hero; +import 'package:end_to_end_test/directives/__generated__/hero_skip.req.gql.dart' + show GHeroSkip; +import 'package:end_to_end_test/directives/__generated__/hero_skip.var.gql.dart' + show GHeroSkipVars; import 'package:end_to_end_test/fragments/__generated__/hero_with_fragments.data.gql.dart' show GHeroWithFragmentsData, @@ -101,10 +113,18 @@ final SerializersBuilder _serializersBuilder = _$serializers.toBuilder() GHeroForEpisodeData_hero__base, GHeroForEpisodeData_hero__base_friends, GHeroForEpisodeVars, + GHeroInclude, + GHeroIncludeData, + GHeroIncludeData_hero, + GHeroIncludeVars, GHeroNoVars, GHeroNoVarsData, GHeroNoVarsData_hero, GHeroNoVarsVars, + GHeroSkip, + GHeroSkipData, + GHeroSkipData_hero, + GHeroSkipVars, GHeroWithFragments, GHeroWithFragmentsData, GHeroWithFragmentsData_hero, diff --git a/codegen/end_to_end_test/lib/graphql/__generated__/serializers.gql.g.dart b/codegen/end_to_end_test/lib/graphql/__generated__/serializers.gql.g.dart index 04794e2bc..4ef5cb1ca 100644 --- a/codegen/end_to_end_test/lib/graphql/__generated__/serializers.gql.g.dart +++ b/codegen/end_to_end_test/lib/graphql/__generated__/serializers.gql.g.dart @@ -27,10 +27,18 @@ Serializers _$serializers = (new Serializers().toBuilder() ..add(GHeroForEpisodeData_hero__base.serializer) ..add(GHeroForEpisodeData_hero__base_friends.serializer) ..add(GHeroForEpisodeVars.serializer) + ..add(GHeroInclude.serializer) + ..add(GHeroIncludeData.serializer) + ..add(GHeroIncludeData_hero.serializer) + ..add(GHeroIncludeVars.serializer) ..add(GHeroNoVars.serializer) ..add(GHeroNoVarsData.serializer) ..add(GHeroNoVarsData_hero.serializer) ..add(GHeroNoVarsVars.serializer) + ..add(GHeroSkip.serializer) + ..add(GHeroSkipData.serializer) + ..add(GHeroSkipData_hero.serializer) + ..add(GHeroSkipVars.serializer) ..add(GHeroWithFragments.serializer) ..add(GHeroWithFragmentsData.serializer) ..add(GHeroWithFragmentsData_hero.serializer) @@ -57,41 +65,45 @@ Serializers _$serializers = (new Serializers().toBuilder() ..add(GheroDataData.serializer) ..add(GheroDataVars.serializer) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(DateTime)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(DateTime)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(DateTime)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(DateTime)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(CustomField)]), - () => new ListBuilder()) + const FullType( + BuiltList, const [const FullType.nullable(CustomField)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(GEpisode)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(GEpisode)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(GEpisode)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(GEpisode)]), + () => new ListBuilder()) ..addBuilderFactory( const FullType(BuiltList, const [ - const FullType(GHeroForEpisodeData_hero__asDroid_friends) + const FullType.nullable(GHeroForEpisodeData_hero__asDroid_friends) ]), - () => new ListBuilder()) + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, - const [const FullType(GHeroForEpisodeData_hero__base_friends)]), - () => new ListBuilder()) + const FullType(BuiltList, const [ + const FullType.nullable(GHeroForEpisodeData_hero__base_friends) + ]), + () => new ListBuilder()) ..addBuilderFactory( const FullType(BuiltList, const [ - const FullType(GHeroWithFragmentsData_hero_friendsConnection_edges) + const FullType.nullable( + GHeroWithFragmentsData_hero_friendsConnection_edges) ]), () => new ListBuilder< - GHeroWithFragmentsData_hero_friendsConnection_edges>()) + GHeroWithFragmentsData_hero_friendsConnection_edges?>()) ..addBuilderFactory( const FullType(BuiltList, const [ - const FullType(GcomparisonFieldsData_friendsConnection_edges) + const FullType.nullable( + GcomparisonFieldsData_friendsConnection_edges) ]), - () => - new ListBuilder())) + () => new ListBuilder< + GcomparisonFieldsData_friendsConnection_edges?>())) .build(); // 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 diff --git a/codegen/end_to_end_test/lib/interfaces/__generated__/hero_for_episode.data.gql.dart b/codegen/end_to_end_test/lib/interfaces/__generated__/hero_for_episode.data.gql.dart index 18291f587..9ca19dc0c 100644 --- a/codegen/end_to_end_test/lib/interfaces/__generated__/hero_for_episode.data.gql.dart +++ b/codegen/end_to_end_test/lib/interfaces/__generated__/hero_for_episode.data.gql.dart @@ -37,7 +37,7 @@ abstract class GHeroForEpisodeData_hero { @BuiltValueField(wireName: '__typename') String get G__typename; String get name; - BuiltList? get friends; + BuiltList? get friends; static Serializer get serializer => _i2.InlineFragmentSerializer( 'GHeroForEpisodeData_hero', @@ -70,7 +70,7 @@ abstract class GHeroForEpisodeData_hero__base @override String get name; @override - BuiltList? get friends; + BuiltList? get friends; static Serializer get serializer => _$gHeroForEpisodeDataHeroBaseSerializer; @override @@ -132,7 +132,7 @@ abstract class GHeroForEpisodeData_hero__asDroid @override String get name; @override - BuiltList? get friends; + BuiltList? get friends; @override String? get primaryFunction; static Serializer get serializer => diff --git a/codegen/end_to_end_test/lib/interfaces/__generated__/hero_for_episode.data.gql.g.dart b/codegen/end_to_end_test/lib/interfaces/__generated__/hero_for_episode.data.gql.g.dart index 72e592413..3fa28c167 100644 --- a/codegen/end_to_end_test/lib/interfaces/__generated__/hero_for_episode.data.gql.g.dart +++ b/codegen/end_to_end_test/lib/interfaces/__generated__/hero_for_episode.data.gql.g.dart @@ -109,7 +109,7 @@ class _$GHeroForEpisodeData_hero__baseSerializer ..add('friends') ..add(serializers.serialize(value, specifiedType: const FullType(BuiltList, const [ - const FullType(GHeroForEpisodeData_hero__base_friends) + const FullType.nullable(GHeroForEpisodeData_hero__base_friends) ]))); } return result; @@ -138,7 +138,7 @@ class _$GHeroForEpisodeData_hero__baseSerializer case 'friends': result.friends.replace(serializers.deserialize(value, specifiedType: const FullType(BuiltList, const [ - const FullType(GHeroForEpisodeData_hero__base_friends) + const FullType.nullable(GHeroForEpisodeData_hero__base_friends) ]))! as BuiltList); break; } @@ -228,7 +228,7 @@ class _$GHeroForEpisodeData_hero__asDroidSerializer ..add('friends') ..add(serializers.serialize(value, specifiedType: const FullType(BuiltList, const [ - const FullType(GHeroForEpisodeData_hero__asDroid_friends) + const FullType.nullable(GHeroForEpisodeData_hero__asDroid_friends) ]))); } value = object.primaryFunction; @@ -264,7 +264,8 @@ class _$GHeroForEpisodeData_hero__asDroidSerializer case 'friends': result.friends.replace(serializers.deserialize(value, specifiedType: const FullType(BuiltList, const [ - const FullType(GHeroForEpisodeData_hero__asDroid_friends) + const FullType.nullable( + GHeroForEpisodeData_hero__asDroid_friends) ]))! as BuiltList); break; case 'primaryFunction': @@ -487,7 +488,7 @@ class _$GHeroForEpisodeData_hero__base extends GHeroForEpisodeData_hero__base { @override final String name; @override - final BuiltList? friends; + final BuiltList? friends; factory _$GHeroForEpisodeData_hero__base( [void Function(GHeroForEpisodeData_hero__baseBuilder)? updates]) => @@ -550,11 +551,11 @@ class GHeroForEpisodeData_hero__baseBuilder String? get name => _$this._name; set name(String? name) => _$this._name = name; - ListBuilder? _friends; - ListBuilder get friends => + ListBuilder? _friends; + ListBuilder get friends => _$this._friends ??= - new ListBuilder(); - set friends(ListBuilder? friends) => + new ListBuilder(); + set friends(ListBuilder? friends) => _$this._friends = friends; GHeroForEpisodeData_hero__baseBuilder() { @@ -729,7 +730,7 @@ class _$GHeroForEpisodeData_hero__asDroid @override final String name; @override - final BuiltList? friends; + final BuiltList? friends; @override final String? primaryFunction; @@ -801,12 +802,12 @@ class GHeroForEpisodeData_hero__asDroidBuilder String? get name => _$this._name; set name(String? name) => _$this._name = name; - ListBuilder? _friends; - ListBuilder get friends => + ListBuilder? _friends; + ListBuilder get friends => _$this._friends ??= - new ListBuilder(); + new ListBuilder(); set friends( - ListBuilder? friends) => + ListBuilder? friends) => _$this._friends = friends; String? _primaryFunction; diff --git a/codegen/end_to_end_test/lib/scalars/__generated__/review_with_date.data.gql.dart b/codegen/end_to_end_test/lib/scalars/__generated__/review_with_date.data.gql.dart index b9dcefa9d..3a6a02d9a 100644 --- a/codegen/end_to_end_test/lib/scalars/__generated__/review_with_date.data.gql.dart +++ b/codegen/end_to_end_test/lib/scalars/__generated__/review_with_date.data.gql.dart @@ -52,8 +52,8 @@ abstract class GReviewWithDateData_createReview int get stars; String? get commentary; DateTime? get createdAt; - BuiltList get seenOn; - BuiltList<_i3.CustomField> get custom; + BuiltList get seenOn; + BuiltList<_i3.CustomField?> get custom; static Serializer get serializer => _$gReviewWithDateDataCreateReviewSerializer; Map toJson() => (_i1.serializers diff --git a/codegen/end_to_end_test/lib/scalars/__generated__/review_with_date.data.gql.g.dart b/codegen/end_to_end_test/lib/scalars/__generated__/review_with_date.data.gql.g.dart index 1d688b3bc..543321543 100644 --- a/codegen/end_to_end_test/lib/scalars/__generated__/review_with_date.data.gql.g.dart +++ b/codegen/end_to_end_test/lib/scalars/__generated__/review_with_date.data.gql.g.dart @@ -93,12 +93,12 @@ class _$GReviewWithDateData_createReviewSerializer serializers.serialize(object.stars, specifiedType: const FullType(int)), 'seenOn', serializers.serialize(object.seenOn, - specifiedType: - const FullType(BuiltList, const [const FullType(DateTime)])), + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(DateTime)])), 'custom', serializers.serialize(object.custom, specifiedType: const FullType( - BuiltList, const [const FullType(_i3.CustomField)])), + BuiltList, const [const FullType.nullable(_i3.CustomField)])), ]; Object? value; value = object.episode; @@ -160,14 +160,14 @@ class _$GReviewWithDateData_createReviewSerializer case 'seenOn': result.seenOn.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(DateTime)]))! + BuiltList, const [const FullType.nullable(DateTime)]))! as BuiltList); break; case 'custom': result.custom.replace(serializers.deserialize(value, - specifiedType: const FullType( - BuiltList, const [const FullType(_i3.CustomField)]))! - as BuiltList); + specifiedType: const FullType(BuiltList, const [ + const FullType.nullable(_i3.CustomField) + ]))! as BuiltList); break; } } @@ -302,9 +302,9 @@ class _$GReviewWithDateData_createReview @override final DateTime? createdAt; @override - final BuiltList seenOn; + final BuiltList seenOn; @override - final BuiltList<_i3.CustomField> custom; + final BuiltList<_i3.CustomField?> custom; factory _$GReviewWithDateData_createReview( [void Function(GReviewWithDateData_createReviewBuilder)? updates]) => @@ -405,15 +405,15 @@ class GReviewWithDateData_createReviewBuilder DateTime? get createdAt => _$this._createdAt; set createdAt(DateTime? createdAt) => _$this._createdAt = createdAt; - ListBuilder? _seenOn; - ListBuilder get seenOn => - _$this._seenOn ??= new ListBuilder(); - set seenOn(ListBuilder? seenOn) => _$this._seenOn = seenOn; + ListBuilder? _seenOn; + ListBuilder get seenOn => + _$this._seenOn ??= new ListBuilder(); + set seenOn(ListBuilder? seenOn) => _$this._seenOn = seenOn; - ListBuilder<_i3.CustomField>? _custom; - ListBuilder<_i3.CustomField> get custom => - _$this._custom ??= new ListBuilder<_i3.CustomField>(); - set custom(ListBuilder<_i3.CustomField>? custom) => _$this._custom = custom; + ListBuilder<_i3.CustomField?>? _custom; + ListBuilder<_i3.CustomField?> get custom => + _$this._custom ??= new ListBuilder<_i3.CustomField?>(); + set custom(ListBuilder<_i3.CustomField?>? custom) => _$this._custom = custom; GReviewWithDateData_createReviewBuilder() { GReviewWithDateData_createReview._initializeBuilder(this); diff --git a/codegen/gql_code_builder/lib/src/common.dart b/codegen/gql_code_builder/lib/src/common.dart index f7eddb1db..a39809702 100644 --- a/codegen/gql_code_builder/lib/src/common.dart +++ b/codegen/gql_code_builder/lib/src/common.dart @@ -88,29 +88,23 @@ const defaultTypeMap = { Reference _typeRef( TypeNode type, - Map typeMap, [ - - /// TODO: remove - /// https://github.com/google/built_value.dart/issues/1011#issuecomment-804843573 - bool inList = false, -]) { + Map typeMap, + bool forceNullable, +) { if (type is NamedTypeNode) { final ref = typeMap[type.name.value] ?? Reference(type.name.value); return TypeReference( (b) => b ..url = ref.url ..symbol = ref.symbol - - /// TODO: remove `inList` check - /// https://github.com/google/built_value.dart/issues/1011#issuecomment-804843573 - ..isNullable = !inList && !type.isNonNull, + ..isNullable = forceNullable || !type.isNonNull, ); } else if (type is ListTypeNode) { return TypeReference( (b) => b ..url = "package:built_collection/built_collection.dart" ..symbol = "BuiltList" - ..isNullable = !type.isNonNull + ..isNullable = forceNullable || !type.isNonNull ..types.add(_typeRef(type.type, typeMap, true)), ); } @@ -148,6 +142,7 @@ Method buildGetter({ String? typeRefPrefix, bool built = true, bool isOverride = false, + bool forceNullable = false, }) { final unwrappedTypeNode = unwrapTypeNode(typeNode); final typeName = unwrappedTypeNode.name.value; @@ -168,10 +163,7 @@ Method buildGetter({ ...typeOverrides, }; - final returnType = _typeRef( - typeNode, - typeMap, - ); + final returnType = _typeRef(typeNode, typeMap, forceNullable); return Method( (b) => b diff --git a/codegen/gql_code_builder/lib/src/operation/data.dart b/codegen/gql_code_builder/lib/src/operation/data.dart index 6a00eb60c..e9391b8a4 100644 --- a/codegen/gql_code_builder/lib/src/operation/data.dart +++ b/codegen/gql_code_builder/lib/src/operation/data.dart @@ -150,6 +150,10 @@ List buildSelectionSetDataClasses({ typeDef, node.name.value, ); + final hasSkipOrInclude = node.directives.any( + (directive) => + directive.name.value == "skip" || directive.name.value == "include", + ); return buildGetter( nameNode: nameNode, typeNode: typeNode, @@ -158,6 +162,7 @@ List buildSelectionSetDataClasses({ typeRefPrefix: node.selectionSet != null ? builtClassName(name) : null, built: built, isOverride: superclassSelectionNodes.contains(node), + forceNullable: hasSkipOrInclude, ); }, ).toList(); diff --git a/examples/gql_example_cli/lib/__generated__/list_pokemon.data.gql.dart b/examples/gql_example_cli/lib/__generated__/list_pokemon.data.gql.dart index 22e800f48..d51a6d923 100644 --- a/examples/gql_example_cli/lib/__generated__/list_pokemon.data.gql.dart +++ b/examples/gql_example_cli/lib/__generated__/list_pokemon.data.gql.dart @@ -20,7 +20,7 @@ abstract class GListPokemonData b..G__typename = 'Query'; @BuiltValueField(wireName: '__typename') String get G__typename; - BuiltList? get pokemons; + BuiltList? get pokemons; static Serializer get serializer => _$gListPokemonDataSerializer; Map toJson() => diff --git a/examples/gql_example_cli/lib/__generated__/list_pokemon.data.gql.g.dart b/examples/gql_example_cli/lib/__generated__/list_pokemon.data.gql.g.dart index 7e807b40e..ae4e49929 100644 --- a/examples/gql_example_cli/lib/__generated__/list_pokemon.data.gql.g.dart +++ b/examples/gql_example_cli/lib/__generated__/list_pokemon.data.gql.g.dart @@ -32,8 +32,8 @@ class _$GListPokemonDataSerializer result ..add('pokemons') ..add(serializers.serialize(value, - specifiedType: const FullType( - BuiltList, const [const FullType(GListPokemonData_pokemons)]))); + specifiedType: const FullType(BuiltList, + const [const FullType.nullable(GListPokemonData_pokemons)]))); } return result; } @@ -57,7 +57,7 @@ class _$GListPokemonDataSerializer case 'pokemons': result.pokemons.replace(serializers.deserialize(value, specifiedType: const FullType(BuiltList, const [ - const FullType(GListPokemonData_pokemons) + const FullType.nullable(GListPokemonData_pokemons) ]))! as BuiltList); break; } @@ -134,7 +134,7 @@ class _$GListPokemonData extends GListPokemonData { @override final String G__typename; @override - final BuiltList? pokemons; + final BuiltList? pokemons; factory _$GListPokemonData( [void Function(GListPokemonDataBuilder)? updates]) => @@ -183,10 +183,10 @@ class GListPokemonDataBuilder String? get G__typename => _$this._G__typename; set G__typename(String? G__typename) => _$this._G__typename = G__typename; - ListBuilder? _pokemons; - ListBuilder get pokemons => - _$this._pokemons ??= new ListBuilder(); - set pokemons(ListBuilder? pokemons) => + ListBuilder? _pokemons; + ListBuilder get pokemons => + _$this._pokemons ??= new ListBuilder(); + set pokemons(ListBuilder? pokemons) => _$this._pokemons = pokemons; GListPokemonDataBuilder() { diff --git a/examples/gql_example_cli/lib/__generated__/serializers.gql.g.dart b/examples/gql_example_cli/lib/__generated__/serializers.gql.g.dart index 1edd6e9ec..43ffeb764 100644 --- a/examples/gql_example_cli/lib/__generated__/serializers.gql.g.dart +++ b/examples/gql_example_cli/lib/__generated__/serializers.gql.g.dart @@ -20,9 +20,9 @@ Serializers _$serializers = (new Serializers().toBuilder() ..add(GListPokemonData_pokemons.serializer) ..add(GListPokemonVars.serializer) ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(GListPokemonData_pokemons)]), - () => new ListBuilder())) + const FullType(BuiltList, + const [const FullType.nullable(GListPokemonData_pokemons)]), + () => new ListBuilder())) .build(); // 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 diff --git a/examples/gql_example_cli_github/lib/__generated__/read_repos.data.gql.dart b/examples/gql_example_cli_github/lib/__generated__/read_repos.data.gql.dart index c4ed2dde5..a0bbfcdb1 100644 --- a/examples/gql_example_cli_github/lib/__generated__/read_repos.data.gql.dart +++ b/examples/gql_example_cli_github/lib/__generated__/read_repos.data.gql.dart @@ -73,7 +73,7 @@ abstract class GReadRepositoriesData_viewer_repositories b..G__typename = 'RepositoryConnection'; @BuiltValueField(wireName: '__typename') String get G__typename; - BuiltList? get nodes; + BuiltList? get nodes; static Serializer get serializer => _$gReadRepositoriesDataViewerRepositoriesSerializer; Map toJson() => (_i1.serializers.serializeWith( diff --git a/examples/gql_example_cli_github/lib/__generated__/read_repos.data.gql.g.dart b/examples/gql_example_cli_github/lib/__generated__/read_repos.data.gql.g.dart index 861a531a2..081258d49 100644 --- a/examples/gql_example_cli_github/lib/__generated__/read_repos.data.gql.g.dart +++ b/examples/gql_example_cli_github/lib/__generated__/read_repos.data.gql.g.dart @@ -154,7 +154,8 @@ class _$GReadRepositoriesData_viewer_repositoriesSerializer ..add('nodes') ..add(serializers.serialize(value, specifiedType: const FullType(BuiltList, const [ - const FullType(GReadRepositoriesData_viewer_repositories_nodes) + const FullType.nullable( + GReadRepositoriesData_viewer_repositories_nodes) ]))); } return result; @@ -179,7 +180,8 @@ class _$GReadRepositoriesData_viewer_repositoriesSerializer case 'nodes': result.nodes.replace(serializers.deserialize(value, specifiedType: const FullType(BuiltList, const [ - const FullType(GReadRepositoriesData_viewer_repositories_nodes) + const FullType.nullable( + GReadRepositoriesData_viewer_repositories_nodes) ]))! as BuiltList); break; } @@ -502,7 +504,7 @@ class _$GReadRepositoriesData_viewer_repositories @override final String G__typename; @override - final BuiltList? nodes; + final BuiltList? nodes; factory _$GReadRepositoriesData_viewer_repositories( [void Function(GReadRepositoriesData_viewer_repositoriesBuilder)? @@ -560,12 +562,12 @@ class GReadRepositoriesData_viewer_repositoriesBuilder String? get G__typename => _$this._G__typename; set G__typename(String? G__typename) => _$this._G__typename = G__typename; - ListBuilder? _nodes; - ListBuilder get nodes => + ListBuilder? _nodes; + ListBuilder get nodes => _$this._nodes ??= - new ListBuilder(); + new ListBuilder(); set nodes( - ListBuilder? + ListBuilder? nodes) => _$this._nodes = nodes; diff --git a/examples/gql_example_cli_github/lib/__generated__/schema.schema.gql.dart b/examples/gql_example_cli_github/lib/__generated__/schema.schema.gql.dart index 6676cd7b9..61e06f99f 100644 --- a/examples/gql_example_cli_github/lib/__generated__/schema.schema.gql.dart +++ b/examples/gql_example_cli_github/lib/__generated__/schema.schema.gql.dart @@ -91,7 +91,7 @@ abstract class GAddAssigneesToAssignableInput _$GAddAssigneesToAssignableInput; String get assignableId; - BuiltList get assigneeIds; + BuiltList get assigneeIds; String? get clientMutationId; static Serializer get serializer => _$gAddAssigneesToAssignableInputSerializer; @@ -131,7 +131,7 @@ abstract class GAddLabelsToLabelableInput _$GAddLabelsToLabelableInput; String? get clientMutationId; - BuiltList get labelIds; + BuiltList get labelIds; String get labelableId; static Serializer get serializer => _$gAddLabelsToLabelableInputSerializer; @@ -223,7 +223,7 @@ abstract class GAddPullRequestReviewInput String? get body; String? get clientMutationId; - BuiltList? get comments; + BuiltList? get comments; GGitObjectID? get commitOID; GPullRequestReviewEvent? get event; String get pullRequestId; @@ -563,7 +563,7 @@ abstract class GCommitAuthor factory GCommitAuthor([Function(GCommitAuthorBuilder b) updates]) = _$GCommitAuthor; - BuiltList? get emails; + BuiltList? get emails; String? get id; static Serializer get serializer => _$gCommitAuthorSerializer; Map toJson() => @@ -683,10 +683,10 @@ abstract class GCreateBranchProtectionRuleInput bool? get dismissesStaleReviews; bool? get isAdminEnforced; String get pattern; - BuiltList? get pushActorIds; + BuiltList? get pushActorIds; String get repositoryId; int? get requiredApprovingReviewCount; - BuiltList? get requiredStatusCheckContexts; + BuiltList? get requiredStatusCheckContexts; bool? get requiresApprovingReviews; bool? get requiresCodeOwnerReviews; bool? get requiresCommitSignatures; @@ -694,7 +694,7 @@ abstract class GCreateBranchProtectionRuleInput bool? get requiresStrictStatusChecks; bool? get restrictsPushes; bool? get restrictsReviewDismissals; - BuiltList? get reviewDismissalActorIds; + BuiltList? get reviewDismissalActorIds; static Serializer get serializer => _$gCreateBranchProtectionRuleInputSerializer; Map toJson() => (_i1.serializers @@ -716,7 +716,7 @@ abstract class GCreateEnterpriseOrganizationInput [Function(GCreateEnterpriseOrganizationInputBuilder b) updates]) = _$GCreateEnterpriseOrganizationInput; - BuiltList get adminLogins; + BuiltList get adminLogins; String get billingEmail; String? get clientMutationId; String get enterpriseId; @@ -740,12 +740,12 @@ abstract class GCreateIssueInput factory GCreateIssueInput([Function(GCreateIssueInputBuilder b) updates]) = _$GCreateIssueInput; - BuiltList? get assigneeIds; + BuiltList? get assigneeIds; String? get body; String? get clientMutationId; - BuiltList? get labelIds; + BuiltList? get labelIds; String? get milestoneId; - BuiltList? get projectIds; + BuiltList? get projectIds; String get repositoryId; String get title; static Serializer get serializer => @@ -768,7 +768,7 @@ abstract class GCreateProjectInput String? get clientMutationId; String get name; String get ownerId; - BuiltList? get repositoryIds; + BuiltList? get repositoryIds; GProjectTemplate? get template; static Serializer get serializer => _$gCreateProjectInputSerializer; @@ -2017,11 +2017,11 @@ abstract class GIssueFilters String? get assignee; String? get createdBy; - BuiltList? get labels; + BuiltList? get labels; String? get mentioned; String? get milestone; GDateTime? get since; - BuiltList? get states; + BuiltList? get states; bool? get viewerSubscribed; static Serializer get serializer => _$gIssueFiltersSerializer; Map toJson() => @@ -3538,7 +3538,7 @@ abstract class GRemoveAssigneesFromAssignableInput _$GRemoveAssigneesFromAssignableInput; String get assignableId; - BuiltList get assigneeIds; + BuiltList get assigneeIds; String? get clientMutationId; static Serializer get serializer => _$gRemoveAssigneesFromAssignableInputSerializer; @@ -3607,7 +3607,7 @@ abstract class GRemoveLabelsFromLabelableInput _$GRemoveLabelsFromLabelableInput; String? get clientMutationId; - BuiltList get labelIds; + BuiltList get labelIds; String get labelableId; static Serializer get serializer => _$gRemoveLabelsFromLabelableInputSerializer; @@ -4064,9 +4064,9 @@ abstract class GRequestReviewsInput String? get clientMutationId; String get pullRequestId; - BuiltList? get teamIds; + BuiltList? get teamIds; bool? get union; - BuiltList? get userIds; + BuiltList? get userIds; static Serializer get serializer => _$gRequestReviewsInputSerializer; Map toJson() => @@ -4931,9 +4931,9 @@ abstract class GUpdateBranchProtectionRuleInput bool? get dismissesStaleReviews; bool? get isAdminEnforced; String? get pattern; - BuiltList? get pushActorIds; + BuiltList? get pushActorIds; int? get requiredApprovingReviewCount; - BuiltList? get requiredStatusCheckContexts; + BuiltList? get requiredStatusCheckContexts; bool? get requiresApprovingReviews; bool? get requiresCodeOwnerReviews; bool? get requiresCommitSignatures; @@ -4941,7 +4941,7 @@ abstract class GUpdateBranchProtectionRuleInput bool? get requiresStrictStatusChecks; bool? get restrictsPushes; bool? get restrictsReviewDismissals; - BuiltList? get reviewDismissalActorIds; + BuiltList? get reviewDismissalActorIds; static Serializer get serializer => _$gUpdateBranchProtectionRuleInputSerializer; Map toJson() => (_i1.serializers @@ -5449,13 +5449,13 @@ abstract class GUpdateIssueInput factory GUpdateIssueInput([Function(GUpdateIssueInputBuilder b) updates]) = _$GUpdateIssueInput; - BuiltList? get assigneeIds; + BuiltList? get assigneeIds; String? get body; String? get clientMutationId; String get id; - BuiltList? get labelIds; + BuiltList? get labelIds; String? get milestoneId; - BuiltList? get projectIds; + BuiltList? get projectIds; GIssueState? get state; String? get title; static Serializer get serializer => @@ -5540,14 +5540,14 @@ abstract class GUpdatePullRequestInput [Function(GUpdatePullRequestInputBuilder b) updates]) = _$GUpdatePullRequestInput; - BuiltList? get assigneeIds; + BuiltList? get assigneeIds; String? get baseRefName; String? get body; String? get clientMutationId; - BuiltList? get labelIds; + BuiltList? get labelIds; bool? get maintainerCanModify; String? get milestoneId; - BuiltList? get projectIds; + BuiltList? get projectIds; String get pullRequestId; GPullRequestUpdateState? get state; String? get title; @@ -5732,7 +5732,7 @@ abstract class GUpdateTopicsInput String? get clientMutationId; String get repositoryId; - BuiltList get topicNames; + BuiltList get topicNames; static Serializer get serializer => _$gUpdateTopicsInputSerializer; Map toJson() => diff --git a/examples/gql_example_cli_github/lib/__generated__/schema.schema.gql.g.dart b/examples/gql_example_cli_github/lib/__generated__/schema.schema.gql.g.dart index 6e13f9b30..27ec4698b 100644 --- a/examples/gql_example_cli_github/lib/__generated__/schema.schema.gql.g.dart +++ b/examples/gql_example_cli_github/lib/__generated__/schema.schema.gql.g.dart @@ -4861,8 +4861,8 @@ class _$GAddAssigneesToAssignableInputSerializer specifiedType: const FullType(String)), 'assigneeIds', serializers.serialize(object.assigneeIds, - specifiedType: - const FullType(BuiltList, const [const FullType(String)])), + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)])), ]; Object? value; value = object.clientMutationId; @@ -4894,7 +4894,7 @@ class _$GAddAssigneesToAssignableInputSerializer case 'assigneeIds': result.assigneeIds.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; case 'clientMutationId': @@ -4984,8 +4984,8 @@ class _$GAddLabelsToLabelableInputSerializer final result = [ 'labelIds', serializers.serialize(object.labelIds, - specifiedType: - const FullType(BuiltList, const [const FullType(String)])), + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)])), 'labelableId', serializers.serialize(object.labelableId, specifiedType: const FullType(String)), @@ -5020,7 +5020,7 @@ class _$GAddLabelsToLabelableInputSerializer case 'labelIds': result.labelIds.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; case 'labelableId': @@ -5336,8 +5336,9 @@ class _$GAddPullRequestReviewInputSerializer result ..add('comments') ..add(serializers.serialize(value, - specifiedType: const FullType(BuiltList, - const [const FullType(GDraftPullRequestReviewComment)]))); + specifiedType: const FullType(BuiltList, const [ + const FullType.nullable(GDraftPullRequestReviewComment) + ]))); } value = object.commitOID; if (value != null) { @@ -5379,7 +5380,7 @@ class _$GAddPullRequestReviewInputSerializer case 'comments': result.comments.replace(serializers.deserialize(value, specifiedType: const FullType(BuiltList, const [ - const FullType(GDraftPullRequestReviewComment) + const FullType.nullable(GDraftPullRequestReviewComment) ]))! as BuiltList); break; case 'commitOID': @@ -6234,8 +6235,8 @@ class _$GCommitAuthorSerializer implements StructuredSerializer { result ..add('emails') ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(String)]))); + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)]))); } value = object.id; if (value != null) { @@ -6262,7 +6263,7 @@ class _$GCommitAuthorSerializer implements StructuredSerializer { case 'emails': result.emails.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; case 'id': @@ -6561,8 +6562,8 @@ class _$GCreateBranchProtectionRuleInputSerializer result ..add('pushActorIds') ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(String)]))); + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)]))); } value = object.requiredApprovingReviewCount; if (value != null) { @@ -6575,8 +6576,8 @@ class _$GCreateBranchProtectionRuleInputSerializer result ..add('requiredStatusCheckContexts') ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(String)]))); + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)]))); } value = object.requiresApprovingReviews; if (value != null) { @@ -6632,8 +6633,8 @@ class _$GCreateBranchProtectionRuleInputSerializer result ..add('reviewDismissalActorIds') ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(String)]))); + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)]))); } return result; } @@ -6669,7 +6670,7 @@ class _$GCreateBranchProtectionRuleInputSerializer case 'pushActorIds': result.pushActorIds.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; case 'repositoryId': @@ -6684,7 +6685,7 @@ class _$GCreateBranchProtectionRuleInputSerializer result.requiredStatusCheckContexts.replace(serializers.deserialize( value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; case 'requiresApprovingReviews': @@ -6718,7 +6719,7 @@ class _$GCreateBranchProtectionRuleInputSerializer case 'reviewDismissalActorIds': result.reviewDismissalActorIds.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; } @@ -6745,8 +6746,8 @@ class _$GCreateEnterpriseOrganizationInputSerializer final result = [ 'adminLogins', serializers.serialize(object.adminLogins, - specifiedType: - const FullType(BuiltList, const [const FullType(String)])), + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)])), 'billingEmail', serializers.serialize(object.billingEmail, specifiedType: const FullType(String)), @@ -6786,7 +6787,7 @@ class _$GCreateEnterpriseOrganizationInputSerializer case 'adminLogins': result.adminLogins.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; case 'billingEmail': @@ -6840,8 +6841,8 @@ class _$GCreateIssueInputSerializer result ..add('assigneeIds') ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(String)]))); + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)]))); } value = object.body; if (value != null) { @@ -6862,8 +6863,8 @@ class _$GCreateIssueInputSerializer result ..add('labelIds') ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(String)]))); + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)]))); } value = object.milestoneId; if (value != null) { @@ -6877,8 +6878,8 @@ class _$GCreateIssueInputSerializer result ..add('projectIds') ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(String)]))); + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)]))); } return result; } @@ -6898,7 +6899,7 @@ class _$GCreateIssueInputSerializer case 'assigneeIds': result.assigneeIds.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; case 'body': @@ -6912,7 +6913,7 @@ class _$GCreateIssueInputSerializer case 'labelIds': result.labelIds.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; case 'milestoneId': @@ -6922,7 +6923,7 @@ class _$GCreateIssueInputSerializer case 'projectIds': result.projectIds.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; case 'repositoryId': @@ -6981,8 +6982,8 @@ class _$GCreateProjectInputSerializer result ..add('repositoryIds') ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(String)]))); + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)]))); } value = object.template; if (value != null) { @@ -7025,7 +7026,7 @@ class _$GCreateProjectInputSerializer case 'repositoryIds': result.repositoryIds.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; case 'template': @@ -9470,8 +9471,8 @@ class _$GIssueFiltersSerializer implements StructuredSerializer { result ..add('labels') ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(String)]))); + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)]))); } value = object.mentioned; if (value != null) { @@ -9500,7 +9501,7 @@ class _$GIssueFiltersSerializer implements StructuredSerializer { ..add('states') ..add(serializers.serialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(GIssueState)]))); + BuiltList, const [const FullType.nullable(GIssueState)]))); } value = object.viewerSubscribed; if (value != null) { @@ -9535,7 +9536,7 @@ class _$GIssueFiltersSerializer implements StructuredSerializer { case 'labels': result.labels.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; case 'mentioned': @@ -9553,7 +9554,7 @@ class _$GIssueFiltersSerializer implements StructuredSerializer { case 'states': result.states.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(GIssueState)]))! + BuiltList, const [const FullType.nullable(GIssueState)]))! as BuiltList); break; case 'viewerSubscribed': @@ -11602,8 +11603,8 @@ class _$GRemoveAssigneesFromAssignableInputSerializer specifiedType: const FullType(String)), 'assigneeIds', serializers.serialize(object.assigneeIds, - specifiedType: - const FullType(BuiltList, const [const FullType(String)])), + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)])), ]; Object? value; value = object.clientMutationId; @@ -11635,7 +11636,7 @@ class _$GRemoveAssigneesFromAssignableInputSerializer case 'assigneeIds': result.assigneeIds.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; case 'clientMutationId': @@ -11794,8 +11795,8 @@ class _$GRemoveLabelsFromLabelableInputSerializer final result = [ 'labelIds', serializers.serialize(object.labelIds, - specifiedType: - const FullType(BuiltList, const [const FullType(String)])), + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)])), 'labelableId', serializers.serialize(object.labelableId, specifiedType: const FullType(String)), @@ -11830,7 +11831,7 @@ class _$GRemoveLabelsFromLabelableInputSerializer case 'labelIds': result.labelIds.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; case 'labelableId': @@ -12566,8 +12567,8 @@ class _$GRequestReviewsInputSerializer result ..add('teamIds') ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(String)]))); + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)]))); } value = object.union; if (value != null) { @@ -12581,8 +12582,8 @@ class _$GRequestReviewsInputSerializer result ..add('userIds') ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(String)]))); + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)]))); } return result; } @@ -12610,7 +12611,7 @@ class _$GRequestReviewsInputSerializer case 'teamIds': result.teamIds.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; case 'union': @@ -12620,7 +12621,7 @@ class _$GRequestReviewsInputSerializer case 'userIds': result.userIds.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; } @@ -14344,8 +14345,8 @@ class _$GUpdateBranchProtectionRuleInputSerializer result ..add('pushActorIds') ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(String)]))); + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)]))); } value = object.requiredApprovingReviewCount; if (value != null) { @@ -14358,8 +14359,8 @@ class _$GUpdateBranchProtectionRuleInputSerializer result ..add('requiredStatusCheckContexts') ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(String)]))); + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)]))); } value = object.requiresApprovingReviews; if (value != null) { @@ -14415,8 +14416,8 @@ class _$GUpdateBranchProtectionRuleInputSerializer result ..add('reviewDismissalActorIds') ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(String)]))); + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)]))); } return result; } @@ -14456,7 +14457,7 @@ class _$GUpdateBranchProtectionRuleInputSerializer case 'pushActorIds': result.pushActorIds.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; case 'requiredApprovingReviewCount': @@ -14467,7 +14468,7 @@ class _$GUpdateBranchProtectionRuleInputSerializer result.requiredStatusCheckContexts.replace(serializers.deserialize( value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; case 'requiresApprovingReviews': @@ -14501,7 +14502,7 @@ class _$GUpdateBranchProtectionRuleInputSerializer case 'reviewDismissalActorIds': result.reviewDismissalActorIds.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; } @@ -15869,8 +15870,8 @@ class _$GUpdateIssueInputSerializer result ..add('assigneeIds') ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(String)]))); + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)]))); } value = object.body; if (value != null) { @@ -15891,8 +15892,8 @@ class _$GUpdateIssueInputSerializer result ..add('labelIds') ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(String)]))); + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)]))); } value = object.milestoneId; if (value != null) { @@ -15906,8 +15907,8 @@ class _$GUpdateIssueInputSerializer result ..add('projectIds') ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(String)]))); + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)]))); } value = object.state; if (value != null) { @@ -15941,7 +15942,7 @@ class _$GUpdateIssueInputSerializer case 'assigneeIds': result.assigneeIds.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; case 'body': @@ -15959,7 +15960,7 @@ class _$GUpdateIssueInputSerializer case 'labelIds': result.labelIds.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; case 'milestoneId': @@ -15969,7 +15970,7 @@ class _$GUpdateIssueInputSerializer case 'projectIds': result.projectIds.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; case 'state': @@ -16255,8 +16256,8 @@ class _$GUpdatePullRequestInputSerializer result ..add('assigneeIds') ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(String)]))); + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)]))); } value = object.baseRefName; if (value != null) { @@ -16284,8 +16285,8 @@ class _$GUpdatePullRequestInputSerializer result ..add('labelIds') ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(String)]))); + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)]))); } value = object.maintainerCanModify; if (value != null) { @@ -16306,8 +16307,8 @@ class _$GUpdatePullRequestInputSerializer result ..add('projectIds') ..add(serializers.serialize(value, - specifiedType: - const FullType(BuiltList, const [const FullType(String)]))); + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)]))); } value = object.state; if (value != null) { @@ -16341,7 +16342,7 @@ class _$GUpdatePullRequestInputSerializer case 'assigneeIds': result.assigneeIds.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; case 'baseRefName': @@ -16359,7 +16360,7 @@ class _$GUpdatePullRequestInputSerializer case 'labelIds': result.labelIds.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; case 'maintainerCanModify': @@ -16373,7 +16374,7 @@ class _$GUpdatePullRequestInputSerializer case 'projectIds': result.projectIds.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; case 'pullRequestId': @@ -16982,8 +16983,8 @@ class _$GUpdateTopicsInputSerializer specifiedType: const FullType(String)), 'topicNames', serializers.serialize(object.topicNames, - specifiedType: - const FullType(BuiltList, const [const FullType(String)])), + specifiedType: const FullType( + BuiltList, const [const FullType.nullable(String)])), ]; Object? value; value = object.clientMutationId; @@ -17019,7 +17020,7 @@ class _$GUpdateTopicsInputSerializer case 'topicNames': result.topicNames.replace(serializers.deserialize(value, specifiedType: const FullType( - BuiltList, const [const FullType(String)]))! + BuiltList, const [const FullType.nullable(String)]))! as BuiltList); break; } @@ -17344,7 +17345,7 @@ class _$GAddAssigneesToAssignableInput extends GAddAssigneesToAssignableInput { @override final String assignableId; @override - final BuiltList assigneeIds; + final BuiltList assigneeIds; @override final String? clientMutationId; @@ -17407,10 +17408,10 @@ class GAddAssigneesToAssignableInputBuilder String? get assignableId => _$this._assignableId; set assignableId(String? assignableId) => _$this._assignableId = assignableId; - ListBuilder? _assigneeIds; - ListBuilder get assigneeIds => - _$this._assigneeIds ??= new ListBuilder(); - set assigneeIds(ListBuilder? assigneeIds) => + ListBuilder? _assigneeIds; + ListBuilder get assigneeIds => + _$this._assigneeIds ??= new ListBuilder(); + set assigneeIds(ListBuilder? assigneeIds) => _$this._assigneeIds = assigneeIds; String? _clientMutationId; @@ -17584,7 +17585,7 @@ class _$GAddLabelsToLabelableInput extends GAddLabelsToLabelableInput { @override final String? clientMutationId; @override - final BuiltList labelIds; + final BuiltList labelIds; @override final String labelableId; @@ -17647,10 +17648,10 @@ class GAddLabelsToLabelableInputBuilder set clientMutationId(String? clientMutationId) => _$this._clientMutationId = clientMutationId; - ListBuilder? _labelIds; - ListBuilder get labelIds => - _$this._labelIds ??= new ListBuilder(); - set labelIds(ListBuilder? labelIds) => _$this._labelIds = labelIds; + ListBuilder? _labelIds; + ListBuilder get labelIds => + _$this._labelIds ??= new ListBuilder(); + set labelIds(ListBuilder? labelIds) => _$this._labelIds = labelIds; String? _labelableId; String? get labelableId => _$this._labelableId; @@ -18151,7 +18152,7 @@ class _$GAddPullRequestReviewInput extends GAddPullRequestReviewInput { @override final String? clientMutationId; @override - final BuiltList? comments; + final BuiltList? comments; @override final GGitObjectID? commitOID; @override @@ -18235,10 +18236,10 @@ class GAddPullRequestReviewInputBuilder set clientMutationId(String? clientMutationId) => _$this._clientMutationId = clientMutationId; - ListBuilder? _comments; - ListBuilder get comments => - _$this._comments ??= new ListBuilder(); - set comments(ListBuilder? comments) => + ListBuilder? _comments; + ListBuilder get comments => + _$this._comments ??= new ListBuilder(); + set comments(ListBuilder? comments) => _$this._comments = comments; GGitObjectIDBuilder? _commitOID; @@ -19611,7 +19612,7 @@ class GClosePullRequestInputBuilder class _$GCommitAuthor extends GCommitAuthor { @override - final BuiltList? emails; + final BuiltList? emails; @override final String? id; @@ -19651,10 +19652,10 @@ class GCommitAuthorBuilder implements Builder { _$GCommitAuthor? _$v; - ListBuilder? _emails; - ListBuilder get emails => - _$this._emails ??= new ListBuilder(); - set emails(ListBuilder? emails) => _$this._emails = emails; + ListBuilder? _emails; + ListBuilder get emails => + _$this._emails ??= new ListBuilder(); + set emails(ListBuilder? emails) => _$this._emails = emails; String? _id; String? get id => _$this._id; @@ -20059,13 +20060,13 @@ class _$GCreateBranchProtectionRuleInput @override final String pattern; @override - final BuiltList? pushActorIds; + final BuiltList? pushActorIds; @override final String repositoryId; @override final int? requiredApprovingReviewCount; @override - final BuiltList? requiredStatusCheckContexts; + final BuiltList? requiredStatusCheckContexts; @override final bool? requiresApprovingReviews; @override @@ -20081,7 +20082,7 @@ class _$GCreateBranchProtectionRuleInput @override final bool? restrictsReviewDismissals; @override - final BuiltList? reviewDismissalActorIds; + final BuiltList? reviewDismissalActorIds; factory _$GCreateBranchProtectionRuleInput( [void Function(GCreateBranchProtectionRuleInputBuilder)? updates]) => @@ -20231,10 +20232,10 @@ class GCreateBranchProtectionRuleInputBuilder String? get pattern => _$this._pattern; set pattern(String? pattern) => _$this._pattern = pattern; - ListBuilder? _pushActorIds; - ListBuilder get pushActorIds => - _$this._pushActorIds ??= new ListBuilder(); - set pushActorIds(ListBuilder? pushActorIds) => + ListBuilder? _pushActorIds; + ListBuilder get pushActorIds => + _$this._pushActorIds ??= new ListBuilder(); + set pushActorIds(ListBuilder? pushActorIds) => _$this._pushActorIds = pushActorIds; String? _repositoryId; @@ -20246,11 +20247,11 @@ class GCreateBranchProtectionRuleInputBuilder set requiredApprovingReviewCount(int? requiredApprovingReviewCount) => _$this._requiredApprovingReviewCount = requiredApprovingReviewCount; - ListBuilder? _requiredStatusCheckContexts; - ListBuilder get requiredStatusCheckContexts => - _$this._requiredStatusCheckContexts ??= new ListBuilder(); + ListBuilder? _requiredStatusCheckContexts; + ListBuilder get requiredStatusCheckContexts => + _$this._requiredStatusCheckContexts ??= new ListBuilder(); set requiredStatusCheckContexts( - ListBuilder? requiredStatusCheckContexts) => + ListBuilder? requiredStatusCheckContexts) => _$this._requiredStatusCheckContexts = requiredStatusCheckContexts; bool? _requiresApprovingReviews; @@ -20288,10 +20289,10 @@ class GCreateBranchProtectionRuleInputBuilder set restrictsReviewDismissals(bool? restrictsReviewDismissals) => _$this._restrictsReviewDismissals = restrictsReviewDismissals; - ListBuilder? _reviewDismissalActorIds; - ListBuilder get reviewDismissalActorIds => - _$this._reviewDismissalActorIds ??= new ListBuilder(); - set reviewDismissalActorIds(ListBuilder? reviewDismissalActorIds) => + ListBuilder? _reviewDismissalActorIds; + ListBuilder get reviewDismissalActorIds => + _$this._reviewDismissalActorIds ??= new ListBuilder(); + set reviewDismissalActorIds(ListBuilder? reviewDismissalActorIds) => _$this._reviewDismissalActorIds = reviewDismissalActorIds; GCreateBranchProtectionRuleInputBuilder(); @@ -20384,7 +20385,7 @@ class GCreateBranchProtectionRuleInputBuilder class _$GCreateEnterpriseOrganizationInput extends GCreateEnterpriseOrganizationInput { @override - final BuiltList adminLogins; + final BuiltList adminLogins; @override final String billingEmail; @override @@ -20474,10 +20475,10 @@ class GCreateEnterpriseOrganizationInputBuilder GCreateEnterpriseOrganizationInputBuilder> { _$GCreateEnterpriseOrganizationInput? _$v; - ListBuilder? _adminLogins; - ListBuilder get adminLogins => - _$this._adminLogins ??= new ListBuilder(); - set adminLogins(ListBuilder? adminLogins) => + ListBuilder? _adminLogins; + ListBuilder get adminLogins => + _$this._adminLogins ??= new ListBuilder(); + set adminLogins(ListBuilder? adminLogins) => _$this._adminLogins = adminLogins; String? _billingEmail; @@ -20565,17 +20566,17 @@ class GCreateEnterpriseOrganizationInputBuilder class _$GCreateIssueInput extends GCreateIssueInput { @override - final BuiltList? assigneeIds; + final BuiltList? assigneeIds; @override final String? body; @override final String? clientMutationId; @override - final BuiltList? labelIds; + final BuiltList? labelIds; @override final String? milestoneId; @override - final BuiltList? projectIds; + final BuiltList? projectIds; @override final String repositoryId; @override @@ -20657,10 +20658,10 @@ class GCreateIssueInputBuilder implements Builder { _$GCreateIssueInput? _$v; - ListBuilder? _assigneeIds; - ListBuilder get assigneeIds => - _$this._assigneeIds ??= new ListBuilder(); - set assigneeIds(ListBuilder? assigneeIds) => + ListBuilder? _assigneeIds; + ListBuilder get assigneeIds => + _$this._assigneeIds ??= new ListBuilder(); + set assigneeIds(ListBuilder? assigneeIds) => _$this._assigneeIds = assigneeIds; String? _body; @@ -20672,19 +20673,19 @@ class GCreateIssueInputBuilder set clientMutationId(String? clientMutationId) => _$this._clientMutationId = clientMutationId; - ListBuilder? _labelIds; - ListBuilder get labelIds => - _$this._labelIds ??= new ListBuilder(); - set labelIds(ListBuilder? labelIds) => _$this._labelIds = labelIds; + ListBuilder? _labelIds; + ListBuilder get labelIds => + _$this._labelIds ??= new ListBuilder(); + set labelIds(ListBuilder? labelIds) => _$this._labelIds = labelIds; String? _milestoneId; String? get milestoneId => _$this._milestoneId; set milestoneId(String? milestoneId) => _$this._milestoneId = milestoneId; - ListBuilder? _projectIds; - ListBuilder get projectIds => - _$this._projectIds ??= new ListBuilder(); - set projectIds(ListBuilder? projectIds) => + ListBuilder? _projectIds; + ListBuilder get projectIds => + _$this._projectIds ??= new ListBuilder(); + set projectIds(ListBuilder? projectIds) => _$this._projectIds = projectIds; String? _repositoryId; @@ -20774,7 +20775,7 @@ class _$GCreateProjectInput extends GCreateProjectInput { @override final String ownerId; @override - final BuiltList? repositoryIds; + final BuiltList? repositoryIds; @override final GProjectTemplate? template; @@ -20862,10 +20863,10 @@ class GCreateProjectInputBuilder String? get ownerId => _$this._ownerId; set ownerId(String? ownerId) => _$this._ownerId = ownerId; - ListBuilder? _repositoryIds; - ListBuilder get repositoryIds => - _$this._repositoryIds ??= new ListBuilder(); - set repositoryIds(ListBuilder? repositoryIds) => + ListBuilder? _repositoryIds; + ListBuilder get repositoryIds => + _$this._repositoryIds ??= new ListBuilder(); + set repositoryIds(ListBuilder? repositoryIds) => _$this._repositoryIds = repositoryIds; GProjectTemplate? _template; @@ -24827,7 +24828,7 @@ class _$GIssueFilters extends GIssueFilters { @override final String? createdBy; @override - final BuiltList? labels; + final BuiltList? labels; @override final String? mentioned; @override @@ -24835,7 +24836,7 @@ class _$GIssueFilters extends GIssueFilters { @override final GDateTime? since; @override - final BuiltList? states; + final BuiltList? states; @override final bool? viewerSubscribed; @@ -24917,10 +24918,10 @@ class GIssueFiltersBuilder String? get createdBy => _$this._createdBy; set createdBy(String? createdBy) => _$this._createdBy = createdBy; - ListBuilder? _labels; - ListBuilder get labels => - _$this._labels ??= new ListBuilder(); - set labels(ListBuilder? labels) => _$this._labels = labels; + ListBuilder? _labels; + ListBuilder get labels => + _$this._labels ??= new ListBuilder(); + set labels(ListBuilder? labels) => _$this._labels = labels; String? _mentioned; String? get mentioned => _$this._mentioned; @@ -24934,10 +24935,10 @@ class GIssueFiltersBuilder GDateTimeBuilder get since => _$this._since ??= new GDateTimeBuilder(); set since(GDateTimeBuilder? since) => _$this._since = since; - ListBuilder? _states; - ListBuilder get states => - _$this._states ??= new ListBuilder(); - set states(ListBuilder? states) => _$this._states = states; + ListBuilder? _states; + ListBuilder get states => + _$this._states ??= new ListBuilder(); + set states(ListBuilder? states) => _$this._states = states; bool? _viewerSubscribed; bool? get viewerSubscribed => _$this._viewerSubscribed; @@ -27050,7 +27051,7 @@ class _$GRemoveAssigneesFromAssignableInput @override final String assignableId; @override - final BuiltList assigneeIds; + final BuiltList assigneeIds; @override final String? clientMutationId; @@ -27115,10 +27116,10 @@ class GRemoveAssigneesFromAssignableInputBuilder String? get assignableId => _$this._assignableId; set assignableId(String? assignableId) => _$this._assignableId = assignableId; - ListBuilder? _assigneeIds; - ListBuilder get assigneeIds => - _$this._assigneeIds ??= new ListBuilder(); - set assigneeIds(ListBuilder? assigneeIds) => + ListBuilder? _assigneeIds; + ListBuilder get assigneeIds => + _$this._assigneeIds ??= new ListBuilder(); + set assigneeIds(ListBuilder? assigneeIds) => _$this._assigneeIds = assigneeIds; String? _clientMutationId; @@ -27425,7 +27426,7 @@ class _$GRemoveLabelsFromLabelableInput @override final String? clientMutationId; @override - final BuiltList labelIds; + final BuiltList labelIds; @override final String labelableId; @@ -27489,10 +27490,10 @@ class GRemoveLabelsFromLabelableInputBuilder set clientMutationId(String? clientMutationId) => _$this._clientMutationId = clientMutationId; - ListBuilder? _labelIds; - ListBuilder get labelIds => - _$this._labelIds ??= new ListBuilder(); - set labelIds(ListBuilder? labelIds) => _$this._labelIds = labelIds; + ListBuilder? _labelIds; + ListBuilder get labelIds => + _$this._labelIds ??= new ListBuilder(); + set labelIds(ListBuilder? labelIds) => _$this._labelIds = labelIds; String? _labelableId; String? get labelableId => _$this._labelableId; @@ -28278,11 +28279,11 @@ class _$GRequestReviewsInput extends GRequestReviewsInput { @override final String pullRequestId; @override - final BuiltList? teamIds; + final BuiltList? teamIds; @override final bool? union; @override - final BuiltList? userIds; + final BuiltList? userIds; factory _$GRequestReviewsInput( [void Function(GRequestReviewsInputBuilder)? updates]) => @@ -28355,19 +28356,19 @@ class GRequestReviewsInputBuilder set pullRequestId(String? pullRequestId) => _$this._pullRequestId = pullRequestId; - ListBuilder? _teamIds; - ListBuilder get teamIds => - _$this._teamIds ??= new ListBuilder(); - set teamIds(ListBuilder? teamIds) => _$this._teamIds = teamIds; + ListBuilder? _teamIds; + ListBuilder get teamIds => + _$this._teamIds ??= new ListBuilder(); + set teamIds(ListBuilder? teamIds) => _$this._teamIds = teamIds; bool? _union; bool? get union => _$this._union; set union(bool? union) => _$this._union = union; - ListBuilder? _userIds; - ListBuilder get userIds => - _$this._userIds ??= new ListBuilder(); - set userIds(ListBuilder? userIds) => _$this._userIds = userIds; + ListBuilder? _userIds; + ListBuilder get userIds => + _$this._userIds ??= new ListBuilder(); + set userIds(ListBuilder? userIds) => _$this._userIds = userIds; GRequestReviewsInputBuilder(); @@ -30682,11 +30683,11 @@ class _$GUpdateBranchProtectionRuleInput @override final String? pattern; @override - final BuiltList? pushActorIds; + final BuiltList? pushActorIds; @override final int? requiredApprovingReviewCount; @override - final BuiltList? requiredStatusCheckContexts; + final BuiltList? requiredStatusCheckContexts; @override final bool? requiresApprovingReviews; @override @@ -30702,7 +30703,7 @@ class _$GUpdateBranchProtectionRuleInput @override final bool? restrictsReviewDismissals; @override - final BuiltList? reviewDismissalActorIds; + final BuiltList? reviewDismissalActorIds; factory _$GUpdateBranchProtectionRuleInput( [void Function(GUpdateBranchProtectionRuleInputBuilder)? updates]) => @@ -30856,10 +30857,10 @@ class GUpdateBranchProtectionRuleInputBuilder String? get pattern => _$this._pattern; set pattern(String? pattern) => _$this._pattern = pattern; - ListBuilder? _pushActorIds; - ListBuilder get pushActorIds => - _$this._pushActorIds ??= new ListBuilder(); - set pushActorIds(ListBuilder? pushActorIds) => + ListBuilder? _pushActorIds; + ListBuilder get pushActorIds => + _$this._pushActorIds ??= new ListBuilder(); + set pushActorIds(ListBuilder? pushActorIds) => _$this._pushActorIds = pushActorIds; int? _requiredApprovingReviewCount; @@ -30867,11 +30868,11 @@ class GUpdateBranchProtectionRuleInputBuilder set requiredApprovingReviewCount(int? requiredApprovingReviewCount) => _$this._requiredApprovingReviewCount = requiredApprovingReviewCount; - ListBuilder? _requiredStatusCheckContexts; - ListBuilder get requiredStatusCheckContexts => - _$this._requiredStatusCheckContexts ??= new ListBuilder(); + ListBuilder? _requiredStatusCheckContexts; + ListBuilder get requiredStatusCheckContexts => + _$this._requiredStatusCheckContexts ??= new ListBuilder(); set requiredStatusCheckContexts( - ListBuilder? requiredStatusCheckContexts) => + ListBuilder? requiredStatusCheckContexts) => _$this._requiredStatusCheckContexts = requiredStatusCheckContexts; bool? _requiresApprovingReviews; @@ -30909,10 +30910,10 @@ class GUpdateBranchProtectionRuleInputBuilder set restrictsReviewDismissals(bool? restrictsReviewDismissals) => _$this._restrictsReviewDismissals = restrictsReviewDismissals; - ListBuilder? _reviewDismissalActorIds; - ListBuilder get reviewDismissalActorIds => - _$this._reviewDismissalActorIds ??= new ListBuilder(); - set reviewDismissalActorIds(ListBuilder? reviewDismissalActorIds) => + ListBuilder? _reviewDismissalActorIds; + ListBuilder get reviewDismissalActorIds => + _$this._reviewDismissalActorIds ??= new ListBuilder(); + set reviewDismissalActorIds(ListBuilder? reviewDismissalActorIds) => _$this._reviewDismissalActorIds = reviewDismissalActorIds; GUpdateBranchProtectionRuleInputBuilder(); @@ -33587,7 +33588,7 @@ class GUpdateIssueCommentInputBuilder class _$GUpdateIssueInput extends GUpdateIssueInput { @override - final BuiltList? assigneeIds; + final BuiltList? assigneeIds; @override final String? body; @override @@ -33595,11 +33596,11 @@ class _$GUpdateIssueInput extends GUpdateIssueInput { @override final String id; @override - final BuiltList? labelIds; + final BuiltList? labelIds; @override final String? milestoneId; @override - final BuiltList? projectIds; + final BuiltList? projectIds; @override final GIssueState? state; @override @@ -33686,10 +33687,10 @@ class GUpdateIssueInputBuilder implements Builder { _$GUpdateIssueInput? _$v; - ListBuilder? _assigneeIds; - ListBuilder get assigneeIds => - _$this._assigneeIds ??= new ListBuilder(); - set assigneeIds(ListBuilder? assigneeIds) => + ListBuilder? _assigneeIds; + ListBuilder get assigneeIds => + _$this._assigneeIds ??= new ListBuilder(); + set assigneeIds(ListBuilder? assigneeIds) => _$this._assigneeIds = assigneeIds; String? _body; @@ -33705,19 +33706,19 @@ class GUpdateIssueInputBuilder String? get id => _$this._id; set id(String? id) => _$this._id = id; - ListBuilder? _labelIds; - ListBuilder get labelIds => - _$this._labelIds ??= new ListBuilder(); - set labelIds(ListBuilder? labelIds) => _$this._labelIds = labelIds; + ListBuilder? _labelIds; + ListBuilder get labelIds => + _$this._labelIds ??= new ListBuilder(); + set labelIds(ListBuilder? labelIds) => _$this._labelIds = labelIds; String? _milestoneId; String? get milestoneId => _$this._milestoneId; set milestoneId(String? milestoneId) => _$this._milestoneId = milestoneId; - ListBuilder? _projectIds; - ListBuilder get projectIds => - _$this._projectIds ??= new ListBuilder(); - set projectIds(ListBuilder? projectIds) => + ListBuilder? _projectIds; + ListBuilder get projectIds => + _$this._projectIds ??= new ListBuilder(); + set projectIds(ListBuilder? projectIds) => _$this._projectIds = projectIds; GIssueState? _state; @@ -34194,7 +34195,7 @@ class GUpdateProjectInputBuilder class _$GUpdatePullRequestInput extends GUpdatePullRequestInput { @override - final BuiltList? assigneeIds; + final BuiltList? assigneeIds; @override final String? baseRefName; @override @@ -34202,13 +34203,13 @@ class _$GUpdatePullRequestInput extends GUpdatePullRequestInput { @override final String? clientMutationId; @override - final BuiltList? labelIds; + final BuiltList? labelIds; @override final bool? maintainerCanModify; @override final String? milestoneId; @override - final BuiltList? projectIds; + final BuiltList? projectIds; @override final String pullRequestId; @override @@ -34310,10 +34311,10 @@ class GUpdatePullRequestInputBuilder Builder { _$GUpdatePullRequestInput? _$v; - ListBuilder? _assigneeIds; - ListBuilder get assigneeIds => - _$this._assigneeIds ??= new ListBuilder(); - set assigneeIds(ListBuilder? assigneeIds) => + ListBuilder? _assigneeIds; + ListBuilder get assigneeIds => + _$this._assigneeIds ??= new ListBuilder(); + set assigneeIds(ListBuilder? assigneeIds) => _$this._assigneeIds = assigneeIds; String? _baseRefName; @@ -34329,10 +34330,10 @@ class GUpdatePullRequestInputBuilder set clientMutationId(String? clientMutationId) => _$this._clientMutationId = clientMutationId; - ListBuilder? _labelIds; - ListBuilder get labelIds => - _$this._labelIds ??= new ListBuilder(); - set labelIds(ListBuilder? labelIds) => _$this._labelIds = labelIds; + ListBuilder? _labelIds; + ListBuilder get labelIds => + _$this._labelIds ??= new ListBuilder(); + set labelIds(ListBuilder? labelIds) => _$this._labelIds = labelIds; bool? _maintainerCanModify; bool? get maintainerCanModify => _$this._maintainerCanModify; @@ -34343,10 +34344,10 @@ class GUpdatePullRequestInputBuilder String? get milestoneId => _$this._milestoneId; set milestoneId(String? milestoneId) => _$this._milestoneId = milestoneId; - ListBuilder? _projectIds; - ListBuilder get projectIds => - _$this._projectIds ??= new ListBuilder(); - set projectIds(ListBuilder? projectIds) => + ListBuilder? _projectIds; + ListBuilder get projectIds => + _$this._projectIds ??= new ListBuilder(); + set projectIds(ListBuilder? projectIds) => _$this._projectIds = projectIds; String? _pullRequestId; @@ -35426,7 +35427,7 @@ class _$GUpdateTopicsInput extends GUpdateTopicsInput { @override final String repositoryId; @override - final BuiltList topicNames; + final BuiltList topicNames; factory _$GUpdateTopicsInput( [void Function(GUpdateTopicsInputBuilder)? updates]) => @@ -35491,10 +35492,10 @@ class GUpdateTopicsInputBuilder String? get repositoryId => _$this._repositoryId; set repositoryId(String? repositoryId) => _$this._repositoryId = repositoryId; - ListBuilder? _topicNames; - ListBuilder get topicNames => - _$this._topicNames ??= new ListBuilder(); - set topicNames(ListBuilder? topicNames) => + ListBuilder? _topicNames; + ListBuilder get topicNames => + _$this._topicNames ??= new ListBuilder(); + set topicNames(ListBuilder? topicNames) => _$this._topicNames = topicNames; GUpdateTopicsInputBuilder(); diff --git a/examples/gql_example_cli_github/lib/__generated__/serializers.gql.g.dart b/examples/gql_example_cli_github/lib/__generated__/serializers.gql.g.dart index 124f74fd8..3ea2c2933 100644 --- a/examples/gql_example_cli_github/lib/__generated__/serializers.gql.g.dart +++ b/examples/gql_example_cli_github/lib/__generated__/serializers.gql.g.dart @@ -308,95 +308,97 @@ Serializers _$serializers = (new Serializers().toBuilder() ..add(GX509Certificate.serializer) ..addBuilderFactory( const FullType(BuiltList, - const [const FullType(GDraftPullRequestReviewComment)]), - () => new ListBuilder()) + const [const FullType.nullable(GDraftPullRequestReviewComment)]), + () => new ListBuilder()) ..addBuilderFactory( const FullType(BuiltList, const [ - const FullType(GReadRepositoriesData_viewer_repositories_nodes) + const FullType.nullable( + GReadRepositoriesData_viewer_repositories_nodes) ]), () => new ListBuilder< - GReadRepositoriesData_viewer_repositories_nodes>()) + GReadRepositoriesData_viewer_repositories_nodes?>()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(GIssueState)]), - () => new ListBuilder()) + const FullType( + BuiltList, const [const FullType.nullable(GIssueState)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder())) + const FullType(BuiltList, const [const FullType.nullable(String)]), + () => new ListBuilder())) .build(); // 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 diff --git a/examples/gql_example_flutter/lib/graphql/__generated__/serializers.gql.g.dart b/examples/gql_example_flutter/lib/graphql/__generated__/serializers.gql.g.dart index 23526f025..e9dcb9961 100644 --- a/examples/gql_example_flutter/lib/graphql/__generated__/serializers.gql.g.dart +++ b/examples/gql_example_flutter/lib/graphql/__generated__/serializers.gql.g.dart @@ -22,9 +22,9 @@ Serializers _$serializers = (new Serializers().toBuilder() ..add(GPokemonDetailData_pokemon_weight.serializer) ..add(GPokemonDetailVars.serializer) ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(GAllPokemonData_pokemons)]), - () => new ListBuilder())) + const FullType(BuiltList, + const [const FullType.nullable(GAllPokemonData_pokemons)]), + () => new ListBuilder())) .build(); // 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 diff --git a/examples/gql_example_flutter/lib/src/all_pokemon/graphql/__generated__/all_pokemon.data.gql.dart b/examples/gql_example_flutter/lib/src/all_pokemon/graphql/__generated__/all_pokemon.data.gql.dart index 7da161b8a..23b7c55c7 100644 --- a/examples/gql_example_flutter/lib/src/all_pokemon/graphql/__generated__/all_pokemon.data.gql.dart +++ b/examples/gql_example_flutter/lib/src/all_pokemon/graphql/__generated__/all_pokemon.data.gql.dart @@ -23,7 +23,7 @@ abstract class GAllPokemonData b..G__typename = 'Query'; @BuiltValueField(wireName: '__typename') String get G__typename; - BuiltList? get pokemons; + BuiltList? get pokemons; static Serializer get serializer => _$gAllPokemonDataSerializer; Map toJson() => diff --git a/examples/gql_example_flutter/lib/src/all_pokemon/graphql/__generated__/all_pokemon.data.gql.g.dart b/examples/gql_example_flutter/lib/src/all_pokemon/graphql/__generated__/all_pokemon.data.gql.g.dart index e2b372e56..929a6ab34 100644 --- a/examples/gql_example_flutter/lib/src/all_pokemon/graphql/__generated__/all_pokemon.data.gql.g.dart +++ b/examples/gql_example_flutter/lib/src/all_pokemon/graphql/__generated__/all_pokemon.data.gql.g.dart @@ -32,8 +32,8 @@ class _$GAllPokemonDataSerializer result ..add('pokemons') ..add(serializers.serialize(value, - specifiedType: const FullType( - BuiltList, const [const FullType(GAllPokemonData_pokemons)]))); + specifiedType: const FullType(BuiltList, + const [const FullType.nullable(GAllPokemonData_pokemons)]))); } return result; } @@ -57,7 +57,7 @@ class _$GAllPokemonDataSerializer case 'pokemons': result.pokemons.replace(serializers.deserialize(value, specifiedType: const FullType(BuiltList, const [ - const FullType(GAllPokemonData_pokemons) + const FullType.nullable(GAllPokemonData_pokemons) ]))! as BuiltList); break; } @@ -155,7 +155,7 @@ class _$GAllPokemonData extends GAllPokemonData { @override final String G__typename; @override - final BuiltList? pokemons; + final BuiltList? pokemons; factory _$GAllPokemonData([void Function(GAllPokemonDataBuilder)? updates]) => (new GAllPokemonDataBuilder()..update(updates))._build(); @@ -203,10 +203,10 @@ class GAllPokemonDataBuilder String? get G__typename => _$this._G__typename; set G__typename(String? G__typename) => _$this._G__typename = G__typename; - ListBuilder? _pokemons; - ListBuilder get pokemons => - _$this._pokemons ??= new ListBuilder(); - set pokemons(ListBuilder? pokemons) => + ListBuilder? _pokemons; + ListBuilder get pokemons => + _$this._pokemons ??= new ListBuilder(); + set pokemons(ListBuilder? pokemons) => _$this._pokemons = pokemons; GAllPokemonDataBuilder() {