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
attachConnectorsToContext undefined #47
Comments
@mimamuh Thanks for reporting this, I did indeed forget to export them. I will fix it with the next PR. You're right, these two definitions are not exactly the same. We're still working on the details for connectors, and it has even evolved a bit since then. I'm currently working on PR #46 that has a bit more specifics, but is still not quite final. Would be great if you could give that a read and tell me if it makes sense! Once we have something more stable, the docs should be updated. |
Hi, yeah, it makes sense at first glance. I like your ideas! If I understood it properly, the connectors would cache and maybe batch my calls to the db automatically per graphql-query? It would be awesome. And the models are there to manage different connector per query when needed. Would things like permission handling be part of models or the resolve functions then? |
Yes, connectors would cache per query and batch (per tick on Node). They could also be made to cache for longer, of course, that should be easy. Permissions should be handled in models, or in some cases resolvers (not 100% sure yet). I'm thinking that decorators will be very interesting for permissions. |
Inline with graphql documentation.
Hi,
I can't load the attachConnectorsToContext tool as described here: http://docs.apollostack.com/apollo-server/connectors.html. It seems it isn't included in the src/index.js
By the way: Are the connectors from the tutorial the same as the connectors from the docs here conceptually?
The first is to connect to my dbs, the second to have a cache for the current query. I see they fit together but it's confusing as the names are almost the same but for slightly different purposes. Is it on purpose?
Thx!
The text was updated successfully, but these errors were encountered: