diff --git a/src/connection/connection.d.ts b/src/connection/connection.d.ts index 295e7c4..d979b3b 100644 --- a/src/connection/connection.d.ts +++ b/src/connection/connection.d.ts @@ -1,50 +1,35 @@ import type { GraphQLNonNull, - GraphQLNamedOutputType, - GraphQLScalarType, GraphQLObjectType, + GraphQLNamedOutputType, GraphQLFieldConfigArgumentMap, GraphQLFieldConfigMap, GraphQLFieldResolver, Thunk, } from 'graphql'; -interface ForwardConnectionArgs { - after: { type: GraphQLScalarType }; - first: { type: GraphQLScalarType }; -} - /** * Returns a GraphQLFieldConfigArgumentMap appropriate to include on a field * whose return type is a connection type with forward pagination. */ -export const forwardConnectionArgs: GraphQLFieldConfigArgumentMap & - ForwardConnectionArgs; - -interface BackwardConnectionArgs { - before: { type: GraphQLScalarType }; - last: { type: GraphQLScalarType }; -} +export declare const forwardConnectionArgs: GraphQLFieldConfigArgumentMap; /** * Returns a GraphQLFieldConfigArgumentMap appropriate to include on a field * whose return type is a connection type with backward pagination. */ -export const backwardConnectionArgs: GraphQLFieldConfigArgumentMap & - BackwardConnectionArgs; +export declare const backwardConnectionArgs: GraphQLFieldConfigArgumentMap; /** * Returns a GraphQLFieldConfigArgumentMap appropriate to include on a field * whose return type is a connection type with bidirectional pagination. */ -export const connectionArgs: GraphQLFieldConfigArgumentMap & - ForwardConnectionArgs & - BackwardConnectionArgs; +export declare const connectionArgs: GraphQLFieldConfigArgumentMap; /** * A type alias for cursors in this implementation. */ -export type ConnectionCursor = string; +export declare type ConnectionCursor = string; /** * A type describing the arguments a connection field receives in GraphQL. diff --git a/src/mutation/mutation.d.ts b/src/mutation/mutation.d.ts index ac54aad..838a33c 100644 --- a/src/mutation/mutation.d.ts +++ b/src/mutation/mutation.d.ts @@ -7,7 +7,11 @@ import type { Thunk, } from 'graphql'; -type MutationFn = (object: any, ctx: any, info: GraphQLResolveInfo) => unknown; +declare type MutationFn = ( + object: any, + ctx: any, + info: GraphQLResolveInfo, +) => unknown; /** * A description of a mutation consumable by mutationWithClientMutationId @@ -39,4 +43,4 @@ interface MutationConfig { */ export declare function mutationWithClientMutationId( config: MutationConfig, -): GraphQLFieldConfig; +): GraphQLFieldConfig; diff --git a/src/node/node.d.ts b/src/node/node.d.ts index f6bdc93..9476540 100644 --- a/src/node/node.d.ts +++ b/src/node/node.d.ts @@ -7,8 +7,8 @@ import type { interface GraphQLNodeDefinitions { nodeInterface: GraphQLInterfaceType; - nodeField: GraphQLFieldConfig; - nodesField: GraphQLFieldConfig; + nodeField: GraphQLFieldConfig; + nodesField: GraphQLFieldConfig; } /** @@ -39,7 +39,7 @@ interface ResolvedGlobalId { * Takes a type name and an ID specific to that type name, and returns a * "global ID" that is unique among all types. */ -export declare function toGlobalId(type: string | number, id: string): string; +export declare function toGlobalId(type: string, id: string | number): string; /** * Takes the "global ID" created by toGlobalID, and returns the type name and ID diff --git a/src/node/plural.d.ts b/src/node/plural.d.ts index 623d1a8..b38f245 100644 --- a/src/node/plural.d.ts +++ b/src/node/plural.d.ts @@ -19,4 +19,4 @@ interface PluralIdentifyingRootFieldConfig { export declare function pluralIdentifyingRootField( config: PluralIdentifyingRootFieldConfig, -): GraphQLFieldConfig; +): GraphQLFieldConfig;