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 & ActionItemWhereInput & FundWhereInput & VenueWhereInput >> | 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);