Search in sources :

Example 1 with ObjectExecutionResultNode

use of graphql.execution.nextgen.result.ObjectExecutionResultNode in project graphql-java by graphql-java.

the class BatchedExecutionStrategy method resolveZipper.

private NodeZipper<ExecutionResultNode> resolveZipper(NodeZipper<ExecutionResultNode> unresolvedNodeZipper, List<FetchedValueAnalysis> fetchedValuesForNode) {
    UnresolvedObjectResultNode unresolvedNode = (UnresolvedObjectResultNode) unresolvedNodeZipper.getCurNode();
    List<ExecutionResultNode> newChildren = util.fetchedValueAnalysisToNodes(fetchedValuesForNode);
    ObjectExecutionResultNode newNode = unresolvedNode.withNewChildren(newChildren);
    return unresolvedNodeZipper.withNewNode(newNode);
}
Also used : ExecutionResultNode(graphql.execution.nextgen.result.ExecutionResultNode) ObjectExecutionResultNode(graphql.execution.nextgen.result.ObjectExecutionResultNode) RootExecutionResultNode(graphql.execution.nextgen.result.RootExecutionResultNode) ObjectExecutionResultNode(graphql.execution.nextgen.result.ObjectExecutionResultNode) UnresolvedObjectResultNode(graphql.execution.nextgen.result.UnresolvedObjectResultNode)

Example 2 with ObjectExecutionResultNode

use of graphql.execution.nextgen.result.ObjectExecutionResultNode in project graphql-java by graphql-java.

the class DefaultExecutionStrategy method resolveNode.

private CompletableFuture<NodeZipper<ExecutionResultNode>> resolveNode(ExecutionContext executionContext, NodeZipper<ExecutionResultNode> unresolvedNode) {
    ExecutionStepInfo executionStepInfo = unresolvedNode.getCurNode().getExecutionStepInfo();
    ResolvedValue resolvedValue = unresolvedNode.getCurNode().getResolvedValue();
    FieldSubSelection fieldSubSelection = util.createFieldSubSelection(executionContext, executionStepInfo, resolvedValue);
    return resolveSubSelection(executionContext, fieldSubSelection).thenApply(resolvedChildMap -> unresolvedNode.withNewNode(new ObjectExecutionResultNode(executionStepInfo, resolvedValue, resolvedChildMap)));
}
Also used : ExecutionStepInfo(graphql.execution.ExecutionStepInfo) ObjectExecutionResultNode(graphql.execution.nextgen.result.ObjectExecutionResultNode) ResolvedValue(graphql.execution.nextgen.result.ResolvedValue)

Aggregations

ObjectExecutionResultNode (graphql.execution.nextgen.result.ObjectExecutionResultNode)2 ExecutionStepInfo (graphql.execution.ExecutionStepInfo)1 ExecutionResultNode (graphql.execution.nextgen.result.ExecutionResultNode)1 ResolvedValue (graphql.execution.nextgen.result.ResolvedValue)1 RootExecutionResultNode (graphql.execution.nextgen.result.RootExecutionResultNode)1 UnresolvedObjectResultNode (graphql.execution.nextgen.result.UnresolvedObjectResultNode)1