All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.infomaximum.cluster.graphql.executor.struct.GExecutionResult Maven / Gradle / Ivy

There is a newer version: 1.1.11
Show newest version
package com.infomaximum.cluster.graphql.executor.struct;

import graphql.ExecutionResult;
import graphql.GraphQLError;
import graphql.execution.reactive.SubscriptionPublisher;

import java.util.List;

public class GExecutionResult {

    private final ExecutionResult executionResult;

    public GExecutionResult(ExecutionResult executionResult) {
        this.executionResult = executionResult;
    }

    public  T getData() {
        if (executionResult.getData() instanceof SubscriptionPublisher sp) {
            return (T) new GSubscriptionPublisher(sp);
        } else {
            return executionResult.getData();
        }
    }

    public List getErrors() {
        return executionResult.getErrors();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy