refactor: Selection Set Template - Basic #113
Closed
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.
This PR refactors the selection set template to correctly render basic deferred inline fragments. By 'basic' I mean a simple
@defer
directive on an inline fragment with and without a type case specification, on the same and on a different type case.This is not intended to be a complete change set for all deferred fragments. Instead this will allow generation of a complete model for a simple deferred fragment operation so I can move on to the next piece of the stack - the executor. There are warnings in place to mark where more complex test cases are needed.
This will generate the following sections of an operation model for deferred inline fragments:
The selection set template test diff still looks like a bit of a mess so the tests to focus on are:
test__render_deferredTypeCase__givenDeferredInlineFragmentWithoutTypeCase_rendersRootEntityType
test__render_deferredTypeCase__givenDeferredInlineFragmentOnSameTypeCase_rendersRootEntityType
test__render_deferredTypeCase__givenDeferredInlineFragmentOnDifferentTypeCase_rendersRootEntityType