asInputObject -> toInputObject
This commit is contained in:
parent
69b898ff16
commit
5b0062b657
2 changed files with 3 additions and 3 deletions
|
@ -68,7 +68,7 @@ Future configureServer(Angel app) async {
|
||||||
|
|
||||||
// Convert our object types to input objects, so that they can be passed to
|
// Convert our object types to input objects, so that they can be passed to
|
||||||
// mutations.
|
// mutations.
|
||||||
var humanChangesType = humanType.asInputObject('HumanChanges');
|
var humanChangesType = humanType.toInputObject('HumanChanges');
|
||||||
|
|
||||||
// Create the mutation type.
|
// Create the mutation type.
|
||||||
var mutationType = objectType(
|
var mutationType = objectType(
|
||||||
|
|
|
@ -25,11 +25,11 @@ class GraphQLObjectType
|
||||||
@override
|
@override
|
||||||
GraphQLType<Map<String, dynamic>, Map<String, dynamic>>
|
GraphQLType<Map<String, dynamic>, Map<String, dynamic>>
|
||||||
coerceToInputObject() {
|
coerceToInputObject() {
|
||||||
return asInputObject('${name}Input', description: description);
|
return toInputObject('${name}Input', description: description);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Converts [this] into a [GraphQLInputObjectType].
|
/// Converts [this] into a [GraphQLInputObjectType].
|
||||||
GraphQLInputObjectType asInputObject(String name, {String description}) {
|
GraphQLInputObjectType toInputObject(String name, {String description}) {
|
||||||
return new GraphQLInputObjectType(name,
|
return new GraphQLInputObjectType(name,
|
||||||
description: description ?? this.description,
|
description: description ?? this.description,
|
||||||
inputFields: fields.map((f) => new GraphQLInputObjectField(
|
inputFields: fields.map((f) => new GraphQLInputObjectField(
|
||||||
|
|
Loading…
Reference in a new issue