part of graphql_schema.src.schema; typedef FutureOr GraphQLFieldResolver( Serialized serialized, Map argumentValues); class GraphQLField { final List arguments = []; final String name; final GraphQLFieldResolver resolve; final GraphQLType type; GraphQLField(this.name, {Iterable arguments: const [], this.resolve, this.type}) { this.arguments.addAll(arguments ?? []); } FutureOr serialize(Value value) { return type.serialize(value); } FutureOr deserialize(Serialized serialized, [Map argumentValues = const {}]) { if (resolve != null) return resolve(serialized, argumentValues); return type.deserialize(serialized); } }