Skip to main content

talawa-api / Exports / resolvers/Query/helperFunctions/getWhere

Module: resolvers/Query/helperFunctions/getWhere

Table of contents

Functions

Functions

getWhere

getWhere<T>(where): FilterQuery<T>

This function returns FilterQuery object which can be used to find out documents matching specific args as mentioned in where. When modifying this function, check if the arg to be added isn't present before, and place where argument type if not present before in the intersection type.

Type parameters

NameTypeDescription
Tunknownused to return an object of a generic type FilterQuery\<T\>

Parameters

NameTypeDescription
whereundefined | InputMaybe<Partial<EventWhereInput & OrganizationWhereInput & PostWhereInput & UserWhereInput & DonationWhereInput>>an object that contains properties that can be used to filter out documents.

Returns

FilterQuery<T>

a FilterQuery object to filter out documents

Remarks

You can learn about Generics here.

Example

const inputArgs = getWhere\<InterfaceEvent\>(args.where);

Defined in

src/resolvers/Query/helperFunctions/getWhere.ts:24