-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: Search endpoint #35
Conversation
config/config.exs
Outdated
base_url_fn: fn -> | ||
"https://#{Application.get_env(:mobile_app_backend, MobileAppBackend.Search.Algolia)[:app_id]}-dsn.algolia.net" | ||
end |
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.
I don't love this as a function - probably would be nicer as an environment variable passed at runtime
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.
Looks like mix release doesn't support configuring functions in config! Going the env var approach - will open a PR in the devops repo
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.
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.
Should we add an .envrc.template
so devs know what needs to be set locally?
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.
Added in 0b352df
Coverage of commit
|
Coverage of commit
|
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.
I think it feels a little weird to be mocking the network call both via the application config and via options passed as a separate argument, and in a vacuum I'd rather stick to one or the other (maybe application config with something like Mox), but I think we already don't have a coherent approach to mocking, so adding one will be a separate task anyway, and this PR doesn't necessarily need to be blocked on taking care of that.
…jection Co-authored-by: Melody Horn <[email protected]>
Coverage of commit
|
Coverage of commit
|
Coverage of commit
|
This way the defined API url can be used for organizing test files without being relient on what is configured in the envrc.template
Coverage of commit
|
ticket: https://app.asana.com/0/1205425564113216/1206267623655566/f
This is heavily inspired by how dotcom does algolia search. My goal was to extract the pieces that are most relevant for what we know now about how search will work in the app.
Some differences from dotcom:
functionality
organization
HttpPoison.encode_query
covers what we need.TODO: