part of graphql_schema.src.schema; typedef FutureOr GraphQLFieldResolver( Serialized serialized); class GraphQLField { final String name; final GraphQLFieldArgument argument; final GraphQLFieldResolver resolve; final GraphQLType type; GraphQLField(this.name, {this.argument, this.resolve, this.type}); FutureOr serialize(Value value) { return type.serialize(value); } FutureOr deserialize(Serialized serialized) { if (resolve != null) return resolve(serialized); return type.deserialize(serialized); } }