diff --git a/example_star_wars/lib/star_wars.dart b/example_star_wars/lib/star_wars.dart index da12ed6c..9334d00e 100644 --- a/example_star_wars/lib/star_wars.dart +++ b/example_star_wars/lib/star_wars.dart @@ -68,7 +68,7 @@ Future configureServer(Angel app) async { // Convert our object types to input objects, so that they can be passed to // mutations. - var humanChangesType = humanType.asInputObject('HumanChanges'); + var humanChangesType = humanType.toInputObject('HumanChanges'); // Create the mutation type. var mutationType = objectType( diff --git a/graphql_schema/lib/src/object_type.dart b/graphql_schema/lib/src/object_type.dart index 92a89fad..1945e3c7 100644 --- a/graphql_schema/lib/src/object_type.dart +++ b/graphql_schema/lib/src/object_type.dart @@ -25,11 +25,11 @@ class GraphQLObjectType @override GraphQLType, Map> coerceToInputObject() { - return asInputObject('${name}Input', description: description); + return toInputObject('${name}Input', description: description); } /// Converts [this] into a [GraphQLInputObjectType]. - GraphQLInputObjectType asInputObject(String name, {String description}) { + GraphQLInputObjectType toInputObject(String name, {String description}) { return new GraphQLInputObjectType(name, description: description ?? this.description, inputFields: fields.map((f) => new GraphQLInputObjectField(