-
Notifications
You must be signed in to change notification settings - Fork 113
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
Use of provider vs. RESTDataSource #174
Comments
DataSources feature looks quite similar to providers while providers feature is part of Dependency Injection and can be connected to each other in modular approach. And providers are constructed in application scope, not in request scope while DataSources are created inside a factory function on each request. But you can call providers inside datasources by using injector inside context, or get datasources inside providers by using onRequest hook inside of providers. |
That's a great questions, @nathanchapman ! |
Then I am planning to create a PR about request scope providers. |
I would love to see some examples in the documentation of when to use a
provider
vs.RESTDataSource
Do they work together? It seems like a
provider
would be re-implementing a lot of methods that already exist in aRESTDataSource
. Also I'm guessing anyRESTDataSource
s would go into thecontextBuilder
?The text was updated successfully, but these errors were encountered: