add error extensions support and export exceptions file
host applications can't effectively catch errors if they can't see the
types.
MODIFY
graphql.iml
graphql.iml
<excludeFolder url="file://$MODULE_DIR$/.idea" />
<excludeFolder url="file://$MODULE_DIR$/.pub" />
<excludeFolder url="file://$MODULE_DIR$/build" />
+ <excludeFolder url="file://$MODULE_DIR$/example/.dart_tool" />
+ <excludeFolder url="file://$MODULE_DIR$/example/.pub" />
+ <excludeFolder url="file://$MODULE_DIR$/example/build" />
</content>
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="library" name="Dart Packages" level="project" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Flutter Plugins" level="project" />
+ <orderEntry type="library" name="Dart Packages" level="project" />
</component>
</module>
\ No newline at end of file

MODIFY
lib/graphql_flutter.dart
lib/graphql_flutter.dart
@@ -14,3 +14,5 @@ export 'package:graphql_flutter/src/widgets/graphql_consumer.dart';
export 'package:graphql_flutter/src/widgets/query.dart';
export 'package:graphql_flutter/src/widgets/mutation.dart';
export 'package:graphql_flutter/src/widgets/subscription.dart';
+
+export 'package:graphql_flutter/src/exceptions.dart';

MODIFY
lib/src/exceptions.dart
lib/src/exceptions.dart
@@ -26,12 +26,15 @@ class GQLError {
/// The path of the field in error.
final List<dynamic> path;
+ final Map<String, dynamic> extensions;
+
/// Constructs a [GQLError] from a JSON map.
GQLError.fromJSON(Map data)
: message = data['message'],
locations = new List.from(
(data['locations']).map((d) => new Location.fromJSON(d))),
- path = data['path'];
+ path = data['path'],
+ extensions = data['extensions'];
@override
String toString() =>

MODIFY
pubspec.yaml
pubspec.yaml
@@ -19,4 +19,4 @@ dev_dependencies:
sdk: flutter
environment:
- sdk: ">=2.0.0-dev.52.0"
+ sdk: ">=2.0.0-dev.52.0 <3.0.0"

add error extensions support and export exceptions file

host applications can't effectively catch errors if they can't see the
types.