mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +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:
4
types/graphql/type/schema.d.ts
vendored
4
types/graphql/type/schema.d.ts
vendored
@@ -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