-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
@@ -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[]> { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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[]> { |
There was a problem hiding this comment.
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
…enerate proper suggestions
eb0f031
to
5d734aa
Compare
No description provided.