Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
9856678
WIP: Implement support for defer in ExecutableNormalizedOperationFactory
felipe-gdr-atlassian Dec 5, 2023
37b1c4a
WIP: ENF to AST Compiler basic implementation
felipe-gdr-atlassian Dec 5, 2023
8b68720
Fix edge case with non-conditional fields in fragments
felipe-gdr-atlassian Dec 12, 2023
c85cbed
Fix comment and test
felipe-gdr-atlassian Dec 12, 2023
df767cb
Remove commented out code
felipe-gdr Dec 12, 2023
7c047e2
Fix assert error message
felipe-gdr Dec 12, 2023
80dc093
Add tests for 'if' argument
felipe-gdr Dec 12, 2023
407efba
Add dedicated entry point for defer support
felipe-gdr Dec 13, 2023
17f1fab
Add dedicated entrypoint with defer support in the ENFOperationFactory
felipe-gdr Dec 13, 2023
86f9dbe
Add Javadocs
felipe-gdr Dec 14, 2023
0f4abf4
Lots of small adjustments
felipe-gdr Dec 14, 2023
444f775
Add test case for multiple defers at the same level
felipe-gdr Dec 15, 2023
32881a3
Moving over to new implementation: changed method signatures
felipe-gdr Dec 18, 2023
8fe9e38
Conclude refactoring that moves defer support out of ENFs and into ENOs
felipe-gdr Dec 20, 2023
da2761e
Clean up defer execution code
felipe-gdr Dec 20, 2023
3f6e480
Add missing Javadoc
felipe-gdr Dec 20, 2023
7f0a37c
Add Javadocs and one more test
felipe-gdr-atlassian Dec 20, 2023
e979b77
Apply code formatting
felipe-gdr-atlassian Jan 2, 2024
202573f
Fix edge case
felipe-gdr-atlassian Jan 2, 2024
4db220e
Replace Guava's Multimap with Map in public APIs
felipe-gdr-atlassian Jan 2, 2024
6446ad4
Big refactoring:
felipe-gdr-atlassian Jan 5, 2024
b9b0f54
WIP: attempt of getting rid of the NormalizedDeferExecutionFactory
felipe-gdr-atlassian Jan 9, 2024
ca1f6d4
Revert "WIP: attempt of getting rid of the NormalizedDeferExecutionFa…
felipe-gdr-atlassian Jan 9, 2024
6ba3e09
Remove excessive normalization that was resulting in reduced number o…
felipe-gdr-atlassian Jan 9, 2024
b71a9a4
Big refactor: capture defer executions directly in ENFs
felipe-gdr-atlassian Jan 9, 2024
6a0f9f7
Merge branch 'master' into defer-support-in-enf
felipe-gdr-atlassian Jan 9, 2024
eda84d3
post merge adjustments
felipe-gdr-atlassian Jan 9, 2024
87a5b52
Remove irrelevant parameter
felipe-gdr-atlassian Jan 9, 2024
5943b7c
Minor refactors
felipe-gdr-atlassian Jan 9, 2024
b04eadc
Rename predicate function
felipe-gdr-atlassian Jan 9, 2024
f500132
Rename test and add better documentation
felipe-gdr-atlassian Jan 9, 2024
f3e5c84
Small changes after Andi's review
felipe-gdr-atlassian Jan 10, 2024
a91fa64
Add Javadoc for DeferExecution
felipe-gdr-atlassian Jan 10, 2024
b22fe7a
minor changes
andimarek Jan 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix comment and test
  • Loading branch information
felipe-gdr-atlassian committed Dec 12, 2023
commit c85cbed61ad1a99f01e499df03a7b7c667f2cacd
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private static List<Selection<?>> subselectionsForNormalizedField(GraphQLSchema
VariableAccumulator variableAccumulator) {
ImmutableList.Builder<Selection<?>> selections = ImmutableList.builder();

// All conditional fields go here instead of directly to selections, so they can be grouped together
// All conditional and deferred fields go here instead of directly to selections, so they can be grouped together
// in the same inline fragment in the output
//
Map<ExecutionFragmentDetails, List<Field>> fieldsByFragmentDetails = new LinkedHashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,6 @@ class ExecutableNormalizedOperationToAstCompilerDeferTest extends Specification
}
}

VariablePredicate jsonVariables = new VariablePredicate() {
@Override
boolean shouldMakeVariable(ExecutableNormalizedField executableNormalizedField, String argName, NormalizedInputValue normalizedInputValue) {
"JSON" == normalizedInputValue.unwrappedTypeName && normalizedInputValue.value != null
}
}

VariablePredicate allVariables = new VariablePredicate() {
@Override
boolean shouldMakeVariable(ExecutableNormalizedField executableNormalizedField, String argName, NormalizedInputValue normalizedInputValue) {
return true
}
}

String sdl = """
directive @defer(if: Boolean, label: String) on FRAGMENT_SPREAD | INLINE_FRAGMENT

Expand Down Expand Up @@ -252,10 +238,12 @@ class ExecutableNormalizedOperationToAstCompilerDeferTest extends Specification
then:
printed == '''{
animal {
name
... on Dog @defer {
breed
}
... on Dog {
name
}
... on Dog @defer(label: "owner-defer") {
owner {
firstname
Expand Down Expand Up @@ -316,7 +304,12 @@ class ExecutableNormalizedOperationToAstCompilerDeferTest extends Specification
then:
printed == '''{
animal {
name
... on Cat @defer {
breed
}
... on Dog @defer {
breed
}
}
}
'''
Expand Down