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

egg-graphql add support for custom directive #2023

Closed
foreleven opened this issue Jan 25, 2018 · 3 comments
Closed

egg-graphql add support for custom directive #2023

foreleven opened this issue Jan 25, 2018 · 3 comments

Comments

@foreleven
Copy link

foreleven commented Jan 25, 2018

graphql-tools 在 2.13.0 版本中添加对 directive resolver 的支持,希望 egg-graphql 也升级更新一下。

graphql-tools
issue212
merge518
API文档

@jtyjty99999
Copy link
Member

可以支持,需要改一些逻辑,下周三之前可以搞好,如果来不及的话,可以提一个pr 在这边
https://github.com/eggjs/egg-graphql/blob/master/lib/load_schema.js#L30 加一个 directive resolver的loader即可

@foreleven
Copy link
Author

好的,周末有空的话,我写一下。

const directiveResolverFile = path.join(basePath, type, 'directive.js');
// merge directive resolvers

这样默认合并所有 directive.js

@foreleven
Copy link
Author

foreleven commented Jan 26, 2018

PR 已经提交,帮忙审核一下。 @jtyjty99999

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

No branches or pull requests

2 participants