platform/graphql_schema/lib/src/schema.dart

26 lines
628 B
Dart
Raw Normal View History

2018-08-02 13:31:54 +00:00
library graphql_schema.src.schema;
import 'dart:async';
import 'package:meta/meta.dart';
part 'argument.dart';
part 'field.dart';
part 'gen.dart';
part 'object_type.dart';
part 'scalar.dart';
part 'type.dart';
part 'validation_result.dart';
class GraphQLSchema {
final GraphQLObjectType query;
final GraphQLObjectType mutation;
GraphQLSchema({this.query, this.mutation});
}
GraphQLSchema graphQLSchema(
{@required GraphQLObjectType query, GraphQLObjectType mutation}) =>
new GraphQLSchema(query: query, mutation: mutation);
2018-08-02 15:17:14 +00:00
/// A default resolver that always returns `null`.
resolveToNull(_, __) => null;