Breaking changes in TC.addRelation(fieldName, opts)
method:
opts
became regular objectopts.resolver
now is thunk. It solves hoisting problems with
cross imported modules.opts.args
renamed toopts.prepareArgs
. Better naming, causeargs
used for GraphQLArgsConfigMap, but here is a special instruction how to prepare args of existed Resolver. Removing misunderstanding.
- UserTC.addRelation('lastArticle', () => {
+ UserTC.addRelation('lastArticle', {
- resolver: ArticleTC.getResolver('findOne'),
+ resolver: () => ArticleTC.getResolver('findOne'),
- args: { /* ... */ },
+ prepareArgs: { /* ... */ },
});
More information about changes can be found in issue #66