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 support for InputObjects and Objects as args #6

Merged
merged 5 commits into from
Sep 23, 2017

Conversation

wokalski
Copy link
Contributor

@wokalski wokalski commented Sep 16, 2017

  • fix infinite recursion in recursive objects
  • add support for lists
  • properly report errors
  • use rec flag only if needed

@wokalski wokalski changed the title Add support for InputObjects and Objects as args [WIPAdd support for InputObjects and Objects as args Sep 16, 2017
@wokalski wokalski changed the title [WIPAdd support for InputObjects and Objects as args [WIP] Add support for InputObjects and Objects as args Sep 16, 2017
Objects can have bidirectional relationships.
Therefore their relationship cannot be expressed
using a acyclic graph and therefore we cannot
create the encoders inline because it causes
infinite recursion. I.e. if User has
a relationship to User the depth of users can
be infinitely big.

That's why separate encoders are introduced.
They are defined according to the following scheme:
json_of_TYPE where TYPE is type name from the schema

This commit screws up error locations though,
but it will be fixed in the following commits.
@wokalski wokalski changed the title [WIP] Add support for InputObjects and Objects as args Add support for InputObjects and Objects as args Sep 19, 2017
@wokalski
Copy link
Contributor Author

@mhallin this is ready for review. I'll be using it from now on to see if there are some new bugs so you might want to wait with public release. If I don't discover any bugs in the next two days I'll let you know.

@wokalski
Copy link
Contributor Author

There were no issues so far for me. Good to merge IMO!

@mhallin
Copy link
Owner

mhallin commented Sep 23, 2017

Nice, thank you!

@mhallin mhallin merged commit 71203bf into mhallin:master Sep 23, 2017
@wokalski wokalski deleted the input-object-support branch September 23, 2017 19:47
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