Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#756 autocomplete suggestions v2 #148

Merged
merged 10 commits into from
May 17, 2022
Merged

Conversation

mspratt-biot
Copy link

No description provided.

@@ -29,4 +29,24 @@ export class DeviceDataSource extends GraphQLDataSource {
async getPoints(deviceId: string): Promise<Point[]> {
return this.deviceDAO.getPoints(deviceId);
}

async getDeviceNames(term?: string, limit?: number): Promise<String[]> {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets call this something like 'search' or 'filter' isntead of term

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'searchTerm' ?

return searchOptions.sortOptions ? getSort(searchOptions.sortOptions) : { _id: 1 };
}

private async getDistinct(field: string, term?: string, limit?: number): Promise<string[]> {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

limit needs to be validated/defaulted

@mspratt-biot mspratt-biot marked this pull request as draft May 12, 2022 14:29
@mspratt-biot mspratt-biot force-pushed the #756-AutocompleteSuggestionsV2 branch from eb0f031 to 5d734aa Compare May 16, 2022 19:11
@mspratt-biot mspratt-biot marked this pull request as ready for review May 16, 2022 20:31
@mspratt-biot mspratt-biot merged commit 93ad5f2 into master May 17, 2022
@slevertbiot slevertbiot deleted the #756-AutocompleteSuggestionsV2 branch August 4, 2022 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants