Add support for field aliases and multiple root fields #39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It is now possible for a query to contain more than one root field as described in the spec discussion linked to in #13. Where the root queries differ only in their arguments they must be renamed using
field aliases (described in section 2.7 of the spec) to ensure that their result fields don't conflict.
Adding the support for renaming revealed a bug in the schema/interpreter composition mechanism which is now fixed.
Adding support for multiple root nodes revealed a bug in the handling of
Unique
queries where the expected type is nullable. Prior to this commit, if there was no unique match the query would fail incorrectly rather than returning a null value. This is now also fixed.Fixes #12 and #13.