-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add feature flag for new batch hydrator (#470)
- Loading branch information
Showing
4 changed files
with
46 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
lib/src/main/java/graphql/nadel/engine/transform/hydration/batch/NadelNewBatchHydrator.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package graphql.nadel.engine.transform.hydration.batch | ||
|
||
import graphql.nadel.NextgenEngine | ||
import graphql.nadel.engine.blueprint.NadelOverallExecutionBlueprint | ||
import graphql.nadel.engine.transform.hydration.batch.NadelBatchHydrationTransform.State | ||
import graphql.nadel.engine.transform.result.NadelResultInstruction | ||
import graphql.nadel.engine.transform.result.json.JsonNode | ||
|
||
internal class NadelNewBatchHydrator( | ||
private val engine: NextgenEngine, | ||
) { | ||
fun hydrate( | ||
state: State, | ||
executionBlueprint: NadelOverallExecutionBlueprint, | ||
parentNodes: List<JsonNode>, | ||
): List<NadelResultInstruction> { | ||
throw UnsupportedOperationException() | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
lib/src/main/java/graphql/nadel/hints/NewBatchHydrationGroupingHint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package graphql.nadel.hints | ||
|
||
fun interface NewBatchHydrationGroupingHint { | ||
/** | ||
* Uses new grouping algorithm for batched hydrations. | ||
*/ | ||
operator fun invoke(): Boolean | ||
} |