Skip to content

Latest commit

 

History

History
51 lines (30 loc) · 2.96 KB

resolvers_Query_helperFunctions_getWhere.md

File metadata and controls

51 lines (30 loc) · 2.96 KB

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

Name Type Description
T unknown used to return an object of a generic type FilterQuery\<T\>

Parameters

Name Type Description
where undefined | 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