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

Consider decoupling the SearchRequester class from REST #25

Open
toolness opened this issue Mar 31, 2021 · 0 comments
Open

Consider decoupling the SearchRequester class from REST #25

toolness opened this issue Mar 31, 2021 · 0 comments

Comments

@toolness
Copy link
Contributor

I'm not sure exactly how we'd accomplish this, but in JustFixNYC/tenants2#2018 I ended up forking it to work with our GraphQL API. It'd be nice if I didn't have to do that.

toolness added a commit to JustFixNYC/tenants2 that referenced this issue Mar 31, 2021
This is an attempt at adding a user directory with super-friendly autocomplete to the front-end, which would be useful to embed in the Front app plugin.

(This doesn't actually do the embedding in the Front app plugin, that will be done in a future PR.)

It currently adds a very simple user directory at `/admin/directory/` with an autocomplete.  When choosing an autocomplete suggestion, the same "user information" widget that shows in the admin conversations view and Front app plugin is displayed.

From a technical standpoint, the main challenge here was actually accessing a GraphQL endpoint for the search results: until now, all our autocomplete widgets have used a third-party REST API to fetch suggestions.  I actually ended up just forking the `SearchRequester` implementation from `@justfixnyc/geosearch-requester`, calling the new class `GraphQLSearchRequester`.  I don't feel great about this and filed JustFixNYC/justfix-ts#25 to address it later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant