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

Add obj to Directives #314

Merged
merged 1 commit into from
Aug 24, 2018
Merged

Add obj to Directives #314

merged 1 commit into from
Aug 24, 2018

Conversation

vektah
Copy link
Collaborator

@vektah vektah commented Aug 24, 2018

Alternative solution to #301 that passes in obj into directive funcs, instead of creating new ResolverContexts around each element in array responses. Includes an updated todo example to show the usage.

Fixes #289

I have:

  • Added tests covering the bug / feature (see testing)
  • Updated any relevant documentation (see docs)

@vektah
Copy link
Collaborator Author

vektah commented Aug 24, 2018

Going to ship both of them, I think this is a better interface to use most of the time, but reaching up into an ancestor is sometimes useful.

Going to be making some changes to the json marshalling to fix parallelization so I want to get this stuff shipped.

@vvakame
Copy link
Collaborator

vvakame commented Aug 24, 2018

wow, I just reading this PR. suddenly #301 was merged and I was surprise a bit 😉
This PR seems to works fine for my issue. 👍

@vvakame
Copy link
Collaborator

vvakame commented Aug 24, 2018

thanks!

@vektah vektah merged commit 2dcb2dd into master Aug 24, 2018
@vektah vektah deleted the directive-obj branch August 24, 2018 05:18
@pandada8 pandada8 mentioned this pull request Aug 27, 2018
cgxxv pushed a commit to cgxxv/gqlgen that referenced this pull request Mar 25, 2022
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

Successfully merging this pull request may close these issues.

2 participants