mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 20:21:46 +00:00
feat(types): make graphql type parameters not required
This commit is contained in:
@@ -20,7 +20,7 @@ export default class QueryComplexity {
|
||||
onOperationDefinitionEnter(operation: OperationDefinitionNode): void;
|
||||
onOperationDefinitionLeave(): GraphQLError | undefined;
|
||||
nodeComplexity(node: FieldNode | FragmentDefinitionNode | InlineFragmentNode |
|
||||
OperationDefinitionNode, typeDef: GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType, complexity?: number): number;
|
||||
OperationDefinitionNode, typeDef: GraphQLObjectType<any, any> | GraphQLInterfaceType | GraphQLUnionType, complexity?: number): number;
|
||||
createError(): GraphQLError;
|
||||
getDefaultComplexity(args: object, childScore: number): number;
|
||||
}
|
||||
|
||||
@@ -49,8 +49,8 @@ const resolve: GraphQLFieldResolver<any, any> = (source, args, context, info) =>
|
||||
context.flag = "f";
|
||||
};
|
||||
const fields: GraphQLFieldConfigMap<any, any> = {};
|
||||
let t: GraphQLObjectType;
|
||||
let e: GraphQLObjectType;
|
||||
let t: GraphQLObjectType<any, any>;
|
||||
let e: GraphQLObjectType<any, any>;
|
||||
const def = connectionDefinitions({
|
||||
connectionFields: fields,
|
||||
edgeFields: fields,
|
||||
|
||||
Vendored
+5
-5
@@ -56,7 +56,7 @@ export const connectionArgs: GraphQLFieldConfigArgumentMap & ForwardConnectionAr
|
||||
|
||||
export type ConnectionConfigNodeTypeNullable =
|
||||
| GraphQLScalarType
|
||||
| GraphQLObjectType
|
||||
| GraphQLObjectType<any, any>
|
||||
| GraphQLInterfaceType
|
||||
| GraphQLUnionType
|
||||
| GraphQLEnumType;
|
||||
@@ -75,8 +75,8 @@ export interface ConnectionConfig {
|
||||
}
|
||||
|
||||
export interface GraphQLConnectionDefinitions {
|
||||
edgeType: GraphQLObjectType;
|
||||
connectionType: GraphQLObjectType;
|
||||
edgeType: GraphQLObjectType<any, any>;
|
||||
connectionType: GraphQLObjectType<any, any>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -256,8 +256,8 @@ export interface GraphQLNodeDefinitions {
|
||||
nodesField: GraphQLFieldConfig<any, any>;
|
||||
}
|
||||
|
||||
export type typeResolverFn = ((any: any) => GraphQLObjectType) |
|
||||
((any: any) => Promise<GraphQLObjectType>);
|
||||
export type typeResolverFn = ((any: any) => GraphQLObjectType<any, any>) |
|
||||
((any: any) => Promise<GraphQLObjectType<any, any>>);
|
||||
|
||||
/**
|
||||
* Given a function to map from an ID to an underlying object, and a function
|
||||
|
||||
Vendored
+1
-1
@@ -342,7 +342,7 @@ export interface GraphQLScalarTypeConfig<TInternal, TExternal> {
|
||||
* });
|
||||
*
|
||||
*/
|
||||
export class GraphQLObjectType<TSource, TContext> {
|
||||
export class GraphQLObjectType<TSource = any, TContext = any> {
|
||||
name: string;
|
||||
description: Maybe<string>;
|
||||
astNode: Maybe<ObjectTypeDefinitionNode>;
|
||||
|
||||
Reference in New Issue
Block a user