Skip to main content

Type Alias: ConnectionArgs<TFilter, TSort>

ConnectionArgs<TFilter, TSort> = object

Defined in: index.ts:30

Standard connection arguments used by resolvers created with composeWithConnection.

Example

import { type ConnectionArgs, type ResolverResolveParams } from '@ttoss/graphql-api';

type NotificationFilter = { isRead?: boolean | null };

NotificationTC.addResolver({
name: 'findMany',
resolve: async ({ args }: ResolverResolveParams<unknown, Context, ConnectionArgs<NotificationFilter>>) => {
return findMany({ first: args.first, after: args.after, filter: args.filter });
},
});

Type Parameters

Type ParameterDefault typeDescription
TFilterunknownShape of the connection-specific filter object. Defaults to unknown.
TSortunknownShape of the sort value. Defaults to unknown.

Properties

after?

optional after?: string | null

Defined in: index.ts:32


before?

optional before?: string | null

Defined in: index.ts:34


filter?

optional filter?: TFilter | null

Defined in: index.ts:38


first?

optional first?: number | null

Defined in: index.ts:31


last?

optional last?: number | null

Defined in: index.ts:33


limit?

optional limit?: number | null

Defined in: index.ts:35


skip?

optional skip?: number | null

Defined in: index.ts:36


sort?

optional sort?: TSort

Defined in: index.ts:37