mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-09-07 09:40:19 +00:00
get[Mutation|Subscription]Type() are nullable
According to [`schema.js`](https://github.com/graphql/graphql-js/blob/master/src/type/schema.js#L160), `GraphQLSchema.getMutationType()` and `getSubscriptionType()` may return `undefined`, so the types should reflect that.
This commit is contained in:
Vendored
+2
-2
@@ -49,8 +49,8 @@ export class GraphQLSchema {
|
||||
constructor(config: GraphQLSchemaConfig)
|
||||
|
||||
getQueryType(): GraphQLObjectType;
|
||||
getMutationType(): GraphQLObjectType;
|
||||
getSubscriptionType(): GraphQLObjectType;
|
||||
getMutationType(): GraphQLObjectType|undefined;
|
||||
getSubscriptionType(): GraphQLObjectType|undefined;
|
||||
getTypeMap(): { [typeName: string]: GraphQLNamedType };
|
||||
getType(name: string): GraphQLType;
|
||||
getPossibleTypes(abstractType: GraphQLAbstractType): Array<GraphQLObjectType>;
|
||||
|
||||
Reference in New Issue
Block a user