Urigo/graphql-modules

Allows modules to not provide any type definition if they provide at least one provider

darkbasic opened this issue · 0 comments

In Accounts.js 1.0 certain modules like the mongo module are in charge to solely provide a DatabaseInterfaceUserToken or a DatabaseInterfaceSessionsToken: they basically implement a known interface which other modules can use to access either the database used to store user data or the one used to store sessions.
Unfortunately graphql-modules complains about missing typeDefs so I had to work it around by passing fake ones.
Another use case could be modules used solely to provide services consumed by REST-only users.
In either case we shouldn't be forced to provide typeDefs in each and every module if we want to allow the user to use modules to piece together their application.