diff --git a/packages/ferry/lib/src/request_controller_typed_link.dart b/packages/ferry/lib/src/request_controller_typed_link.dart index a989a1f1..83457ad9 100644 --- a/packages/ferry/lib/src/request_controller_typed_link.dart +++ b/packages/ferry/lib/src/request_controller_typed_link.dart @@ -69,7 +69,7 @@ class RequestControllerTypedLink extends TypedLink { /// Temporarily add a listener so that [prev] doesn't shut down when /// switchMap is updating the stream. final sub = prev?.listen(null); - scheduleMicrotask(() => sub?.cancel()); + Future.delayed(Duration.zero, () => sub?.cancel()); }, ).switchMap( (req) { diff --git a/packages/ferry/pubspec.yaml b/packages/ferry/pubspec.yaml index e41b7871..7bbf8e42 100644 --- a/packages/ferry/pubspec.yaml +++ b/packages/ferry/pubspec.yaml @@ -12,7 +12,7 @@ topics: - ferry dependencies: gql: '>=0.14.0 <2.0.0' - rxdart: ^0.27.1 + rxdart: ^0.28.0 gql_link: '>=0.5.0 <2.0.0' gql_exec: '>=0.4.0 <2.0.0' meta: ^1.3.0 diff --git a/packages/ferry/test/client/json_operation_test.dart b/packages/ferry/test/client/json_operation_test.dart index 0e73a580..90017808 100644 --- a/packages/ferry/test/client/json_operation_test.dart +++ b/packages/ferry/test/client/json_operation_test.dart @@ -15,18 +15,21 @@ void main() { addTearDown(client.dispose); - final req = - JsonOperationRequest(operation: Operation(document: gql.parseString(r''' + final req = JsonOperationRequest( + operation: Operation(document: gql.parseString(r''' query Reviews { reviews(episode: $episode, first: $first, offset: $offset) { id stars } - }''')), fetchPolicy: FetchPolicy.CacheFirst, vars: { - 'episode': 'NEWHOPE', - 'first': 3, - 'offset': 0, - }); + }''')), + fetchPolicy: FetchPolicy.CacheFirst, + vars: { + 'episode': 'NEWHOPE', + 'first': 3, + 'offset': 0, + }, + ); final result = await client.request(req).first; diff --git a/packages/ferry_cache/lib/src/utils/operation_root_data.dart b/packages/ferry_cache/lib/src/utils/operation_root_data.dart index 561f67eb..33ecdd90 100644 --- a/packages/ferry_cache/lib/src/utils/operation_root_data.dart +++ b/packages/ferry_cache/lib/src/utils/operation_root_data.dart @@ -13,8 +13,8 @@ Map operationRootData( ) { final fieldNames = operationFieldNames( request.operation.document, - request.operation.operationName!, - (request.vars as dynamic).toJson(), + request.operation.operationName, + request.varsToJson(), typePolicies, possibleTypes, ); diff --git a/packages/ferry_cache/pubspec.yaml b/packages/ferry_cache/pubspec.yaml index 985a62c2..42b64535 100644 --- a/packages/ferry_cache/pubspec.yaml +++ b/packages/ferry_cache/pubspec.yaml @@ -12,7 +12,7 @@ topics: dependencies: ferry_exec: ^0.6.1-dev.1 meta: ^1.3.0 - rxdart: ^0.27.1 + rxdart: ^0.28.0 normalize: ^0.9.1 ferry_store: ^0.6.0-dev.0 collection: ^1.15.0 diff --git a/packages/ferry_hive_store/pubspec.yaml b/packages/ferry_hive_store/pubspec.yaml index e8eeee7e..83960b4e 100644 --- a/packages/ferry_hive_store/pubspec.yaml +++ b/packages/ferry_hive_store/pubspec.yaml @@ -13,7 +13,7 @@ topics: dependencies: hive: ^2.0.0 ferry_store: ^0.6.0-dev.0 - rxdart: ^0.27.1 + rxdart: ^0.28.0 collection: ^1.15.0 dev_dependencies: test: ^1.16.8 diff --git a/packages/ferry_store/pubspec.yaml b/packages/ferry_store/pubspec.yaml index 55cf3320..0ab09de2 100644 --- a/packages/ferry_store/pubspec.yaml +++ b/packages/ferry_store/pubspec.yaml @@ -10,7 +10,7 @@ topics: - gql - ferry dependencies: - rxdart: ^0.27.1 + rxdart: ^0.28.0 collection: ^1.15.0 dev_dependencies: test: ^1.16.8 diff --git a/packages/normalize/lib/src/utils/operation_field_names.dart b/packages/normalize/lib/src/utils/operation_field_names.dart index 5a22fe9c..eb426fff 100644 --- a/packages/normalize/lib/src/utils/operation_field_names.dart +++ b/packages/normalize/lib/src/utils/operation_field_names.dart @@ -10,7 +10,7 @@ import 'package:normalize/src/policies/type_policy.dart'; /// Returns the root field names for a given operation. List operationFieldNames( DocumentNode document, - String operationName, + String? operationName, Map vars, Map typePolicies, Map> possibleTypes,