This repository has been archived by the owner on Sep 3, 2021. It is now read-only.
Reflexive relation types, fixes for #113 and #124 #125
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.
Fixes
Don't drop non-Query/Mutation resolvers passed into makeAugmentedExecutableSchema Don't drop non-Query/Mutation resolvers passed into makeAugmentedExecutableSchema #113
Basic schema with non nullable property gives error when calling mutation Basic schema with non nullable property gives error when calling mutation #124
Error when adding directive declarative to SDL Error when adding directive declarative to SDL #116
Features:
Reflexive Relation API
The following
FriendOf
relation type is reflexive in the sense that it comesfrom
and goesto
the same type. There is now support in the generated Query and Mutation API for reflexive relation types.Given the above SDL format (what you write), the following SDL is generated as a result of the schema augmentation process (
augmentSchema
ormakeAugmentedSchema
). Thesince
argument on thefriends
is distributed over the directed fields,from
andto
.This results in support for the following selection set format:
Tests
The following tests have been added in
cypherTest.js
for the reflexive relation type API:Other
This PR also introduces a new
translate.js
file, from which helpers are exported and used inindex.js
, refactoring the recursive GraphQL to Cypher translation process.