From cbe1099214b8016afc69801c9dccae47add83ab7 Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Sun, 14 May 2023 13:03:37 +0200 Subject: [PATCH 1/2] docs: preparing for the beta 2 Signed-off-by: Vincenzo Palazzo --- packages/graphql/CHANGELOG.md | 7 +++++++ packages/graphql/changelog.json | 2 +- packages/graphql/pubspec.yaml | 4 ++-- packages/graphql_flutter/CHANGELOG.md | 9 +++++++++ packages/graphql_flutter/changelog.json | 2 +- packages/graphql_flutter/pubspec.yaml | 6 +++--- 6 files changed, 23 insertions(+), 7 deletions(-) diff --git a/packages/graphql/CHANGELOG.md b/packages/graphql/CHANGELOG.md index 366bf8e1..83fd22e5 100644 --- a/packages/graphql/CHANGELOG.md +++ b/packages/graphql/CHANGELOG.md @@ -1,3 +1,10 @@ +# v5.2.0-beta.2 + +## Added +- bump gql version to 1.0.0 ([commit](https://github.com/zino-hofmann/graphql-flutter/commit/6c991d8e8dc952f9cf0774746ce3d59f48f1ea32)). @ndelanou 03-05-2023 +- print the connection status with ws ([commit](https://github.com/zino-hofmann/graphql-flutter/commit/a9aefc41909eb6911c4c4de1d0477bb620d1098d)). @vytautas-pranskunas- 15-03-2023 + + # v5.2.0-beta.1 ## Fixed diff --git a/packages/graphql/changelog.json b/packages/graphql/changelog.json index 37d24b0a..56266cce 100644 --- a/packages/graphql/changelog.json +++ b/packages/graphql/changelog.json @@ -1,6 +1,6 @@ { "package_name": "graphql", - "version": "v5.2.0-beta.1", + "version": "v5.2.0-beta.2", "api": { "name": "github", "repository": "zino-hofmann/graphql-flutter", diff --git a/packages/graphql/pubspec.yaml b/packages/graphql/pubspec.yaml index 90cf99ec..d0635867 100644 --- a/packages/graphql/pubspec.yaml +++ b/packages/graphql/pubspec.yaml @@ -1,6 +1,6 @@ name: graphql description: A stand-alone GraphQL client for Dart, bringing all the features from a modern GraphQL client to one easy to use package. -version: 5.2.0-beta.1 +version: 5.2.0-beta.2 repository: https://github.com/zino-app/graphql-flutter/tree/main/packages/graphql issue_tracker: https://github.com/zino-hofmann/graphql-flutter/issues @@ -32,4 +32,4 @@ dev_dependencies: lints: ^1.0.1 environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.12.0 <=3.0.0' diff --git a/packages/graphql_flutter/CHANGELOG.md b/packages/graphql_flutter/CHANGELOG.md index 4a425c61..1155b95b 100644 --- a/packages/graphql_flutter/CHANGELOG.md +++ b/packages/graphql_flutter/CHANGELOG.md @@ -1,3 +1,12 @@ +# v5.2.0-beta.2 + +## Fixed +- added missing onSubscriptionResult argument ([commit](https://github.com/zino-hofmann/graphql-flutter/commit/1b17d7709410c2a106d0c0a5d9da3c926001a49c)). @PhilippS93 03-04-2023 + +## Added +- bump gql version to 1.0.0 ([commit](https://github.com/zino-hofmann/graphql-flutter/commit/6c991d8e8dc952f9cf0774746ce3d59f48f1ea32)). @ndelanou 03-05-2023 + + # v5.2.0-beta.1 diff --git a/packages/graphql_flutter/changelog.json b/packages/graphql_flutter/changelog.json index 78c9b1c2..35715cb8 100644 --- a/packages/graphql_flutter/changelog.json +++ b/packages/graphql_flutter/changelog.json @@ -1,6 +1,6 @@ { "package_name": "graphql_flutter", - "version": "v5.2.0-beta.1", + "version": "v5.2.0-beta.2", "api": { "name": "github", "repository": "zino-hofmann/graphql-flutter", diff --git a/packages/graphql_flutter/pubspec.yaml b/packages/graphql_flutter/pubspec.yaml index 5cd9692d..aa43d227 100644 --- a/packages/graphql_flutter/pubspec.yaml +++ b/packages/graphql_flutter/pubspec.yaml @@ -1,6 +1,6 @@ name: graphql_flutter description: A GraphQL client for Flutter, bringing all the features from a modern GraphQL client to one easy to use package. -version: 5.2.0-beta.1 +version: 5.2.0-beta.2 repository: https://github.com/zino-app/graphql-flutter/tree/main/packages/graphql_flutter issue_tracker: https://github.com/zino-hofmann/graphql-flutter/issues @@ -8,7 +8,7 @@ issue_tracker: https://github.com/zino-hofmann/graphql-flutter/issues # publish_to: 'none' dependencies: - graphql: ^5.2.0-beta.1 + graphql: ^5.2.0-beta.2 gql_exec: ^1.0.0 flutter: sdk: flutter @@ -29,7 +29,7 @@ dev_dependencies: test: ^1.17.12 environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.12.0 <=3.0.0' flutter: ">=2.11.0" platforms: From d6f0bd1fc8e402c0b3a2e371a205da30abb9fc44 Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Sun, 14 May 2023 16:24:27 +0200 Subject: [PATCH 2/2] feat: support the flutter 3.10 and dart 3 Signed-off-by: Vincenzo Palazzo --- example/lib/main.dart | 1 + examples/starwars/pubspec.yaml | 7 +++---- packages/graphql/example/lib/main.dart | 2 +- packages/graphql/lib/src/scheduler/scheduler.dart | 2 +- packages/graphql/pubspec.yaml | 2 +- packages/graphql_flutter/example/pubspec.yaml | 1 - packages/graphql_flutter/test/widgets/query_test.dart | 10 ++++++---- .../test/widgets/subscription_test.dart | 11 +++++++---- 8 files changed, 20 insertions(+), 16 deletions(-) create mode 100644 example/lib/main.dart diff --git a/example/lib/main.dart b/example/lib/main.dart new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/example/lib/main.dart @@ -0,0 +1 @@ + diff --git a/examples/starwars/pubspec.yaml b/examples/starwars/pubspec.yaml index c8a3aa07..c1a6dcee 100644 --- a/examples/starwars/pubspec.yaml +++ b/examples/starwars/pubspec.yaml @@ -4,7 +4,7 @@ description: An example graphql_flutter application utilizing graphql_starwars_t publish_to: none environment: - sdk: ">=2.10.0 <3.0.0" + sdk: ">=2.13.0 <=3.0.0" dependencies: flutter: @@ -12,9 +12,8 @@ dependencies: graphql_flutter: path: ../../packages/graphql_flutter graphql: ^5.1.2-beta.1 - universal_platform: - ^0.1.3 + universal_platform: ^1.0.0+1 # https://github.com/flutter/flutter/issues/36126#issuecomment-596215587 flutter: - uses-material-design: true \ No newline at end of file + uses-material-design: true diff --git a/packages/graphql/example/lib/main.dart b/packages/graphql/example/lib/main.dart index 9a9b5db8..c27c4089 100644 --- a/packages/graphql/example/lib/main.dart +++ b/packages/graphql/example/lib/main.dart @@ -78,7 +78,7 @@ void readRepositories() async { result.data!['viewer']['repositories']['nodes'] as List; repositories.forEach( - (dynamic f) => {stdout.writeln('Id: ${f['id']} Name: ${f['name']}')}, + (dynamic f) => stdout.writeln('Id: ${f['id']} Name: ${f['name']}'), ); exit(0); diff --git a/packages/graphql/lib/src/scheduler/scheduler.dart b/packages/graphql/lib/src/scheduler/scheduler.dart index fdbca5d9..9d930775 100644 --- a/packages/graphql/lib/src/scheduler/scheduler.dart +++ b/packages/graphql/lib/src/scheduler/scheduler.dart @@ -57,7 +57,7 @@ class QueryScheduler { } // fetch each query on the interval - intervalQueries[interval]!.forEach(queryManager!.refetchQuery); + intervalQueries[interval]!.forEach(queryManager!.refetchQuery); } void startPollingQuery( diff --git a/packages/graphql/pubspec.yaml b/packages/graphql/pubspec.yaml index d0635867..90bf744a 100644 --- a/packages/graphql/pubspec.yaml +++ b/packages/graphql/pubspec.yaml @@ -32,4 +32,4 @@ dev_dependencies: lints: ^1.0.1 environment: - sdk: '>=2.12.0 <=3.0.0' + sdk: '>=2.15.0 <=3.0.0' diff --git a/packages/graphql_flutter/example/pubspec.yaml b/packages/graphql_flutter/example/pubspec.yaml index 8ccc6990..25f5c038 100644 --- a/packages/graphql_flutter/example/pubspec.yaml +++ b/packages/graphql_flutter/example/pubspec.yaml @@ -9,7 +9,6 @@ module: dependencies: flutter: sdk: flutter - cupertino_icons: ^0.1.3 graphql_flutter: path: .. trash_themes: ^0.0.1 diff --git a/packages/graphql_flutter/test/widgets/query_test.dart b/packages/graphql_flutter/test/widgets/query_test.dart index 66cbbe88..4a131be8 100644 --- a/packages/graphql_flutter/test/widgets/query_test.dart +++ b/packages/graphql_flutter/test/widgets/query_test.dart @@ -42,10 +42,12 @@ Future mockApplicationDocumentsDirectory() async { return null; }; // Mock out the MethodChannel for the path_provider plugin. - const MethodChannel('plugins.flutter.io/path_provider') - .setMockMethodCallHandler(handler); - const MethodChannel('plugins.flutter.io/path_provider_macos') - .setMockMethodCallHandler(handler); + final channel = MethodChannel('plugins.flutter.io/path_provider'); + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockMethodCallHandler(channel, handler); + final channel_osx = MethodChannel('plugins.flutter.io/path_provider_macos'); + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockMethodCallHandler(channel_osx, handler); } class Page extends StatefulWidget { diff --git a/packages/graphql_flutter/test/widgets/subscription_test.dart b/packages/graphql_flutter/test/widgets/subscription_test.dart index 67729a48..2c2c49c8 100644 --- a/packages/graphql_flutter/test/widgets/subscription_test.dart +++ b/packages/graphql_flutter/test/widgets/subscription_test.dart @@ -40,11 +40,14 @@ Future mockApplicationDocumentsDirectory() async { } return null; }; + // Mock out the MethodChannel for the path_provider plugin. - const MethodChannel('plugins.flutter.io/path_provider') - .setMockMethodCallHandler(handler); - const MethodChannel('plugins.flutter.io/path_provider_macos') - .setMockMethodCallHandler(handler); + final channel = MethodChannel('plugins.flutter.io/path_provider'); + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockMethodCallHandler(channel, handler); + final channel_osx = MethodChannel('plugins.flutter.io/path_provider_macos'); + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockMethodCallHandler(channel_osx, handler); } class Page extends StatelessWidget {