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

Avoid firing http requests when the client is initialized #2

Open
paulsturgess opened this issue Jul 17, 2023 · 0 comments
Open

Avoid firing http requests when the client is initialized #2

paulsturgess opened this issue Jul 17, 2023 · 0 comments

Comments

@paulsturgess
Copy link
Contributor

paulsturgess commented Jul 17, 2023

This is a low-priority tech-debut issue...

Currently when instantiating Dennis::Client it calls ApiaClient.load and this triggers http requests.

This isn't a big deal for production usage but when unit testing, it's not ideal.

Either we need to change the way Dennis::Client initialization works, or we need to change how ApiaClient.load works.

Matt created a spike for lazy loading the schema for ApiaClient.load here:
https://github.com/krystal/apia-ruby-client/pull/1/files

Relates to this PR:
https://github.com/krystal/domains/pull/748

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant