From 1372043e8fd907da18dc44ff1d3d88419d9570d2 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Sun, 3 Feb 2019 15:25:02 -0500 Subject: [PATCH] schema 1.0.2 --- graphql_schema/CHANGELOG.md | 4 ++++ graphql_schema/lib/src/schema.dart | 17 ++++++++++++++--- graphql_schema/pubspec.yaml | 2 +- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/graphql_schema/CHANGELOG.md b/graphql_schema/CHANGELOG.md index 1b851166..aeea689d 100644 --- a/graphql_schema/CHANGELOG.md +++ b/graphql_schema/CHANGELOG.md @@ -1,2 +1,6 @@ +# 1.0.2 +* Added `GraphQLClass()`. +* Added `typeName`. + # 1.0.1 * Dart 2 updates. \ No newline at end of file diff --git a/graphql_schema/lib/src/schema.dart b/graphql_schema/lib/src/schema.dart index 394525dc..e32add0c 100644 --- a/graphql_schema/lib/src/schema.dart +++ b/graphql_schema/lib/src/schema.dart @@ -129,7 +129,7 @@ class GraphExceptionErrorLocation { } } -typedef GraphQLType _GraphDocumentationTypeProvider(); +typedef GraphQLType GraphDocumentationTypeProvider(); /// A metadata annotation used to provide documentation to `package:graphql_server`. class GraphQLDocumentation { @@ -141,8 +141,19 @@ class GraphQLDocumentation { /// A constant callback that returns an explicit type for the annotated field, rather than having it be assumed /// via `dart:mirrors`. - final _GraphDocumentationTypeProvider type; + final GraphDocumentationTypeProvider type; + + /// The name of an explicit type for the annotated field, rather than having it be assumed. + final Symbol typeName; const GraphQLDocumentation( - {this.description, this.deprecationReason, GraphQLType this.type()}); + {this.description, this.deprecationReason, this.type, this.typeName}); +} + +/// The canonical instance. +const GraphQLClass graphQLClass = const GraphQLClass._(); + +/// Signifies that a class should statically generate a [GraphQLSchema]. +class GraphQLClass { + const GraphQLClass._(); } diff --git a/graphql_schema/pubspec.yaml b/graphql_schema/pubspec.yaml index 482d72d1..00f55d0d 100644 --- a/graphql_schema/pubspec.yaml +++ b/graphql_schema/pubspec.yaml @@ -1,5 +1,5 @@ name: graphql_schema -version: 1.0.1 +version: 1.0.2 description: An implementation of GraphQL's type system in Dart. author: Tobe O homepage: https://github.com/angel-dart/graphql