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

graphql.nadel.engine.result.ObjectExecutionResultNode Maven / Gradle / Ivy

Go to download

Nadel is a Java library that combines multiple GrahpQL services together into one API.

The newest version!
package graphql.nadel.engine.result;

import graphql.Internal;

import java.util.function.Consumer;

import static graphql.Assert.assertNotNull;

@Internal
public class ObjectExecutionResultNode extends ExecutionResultNode {
    private ObjectExecutionResultNode(Builder builder) {
        super(builder);
        assertNotNull(getFieldDefinition());
    }

    // hack for subclasses to pass in BuilderBase instances
    protected ObjectExecutionResultNode(BuilderBase builder, Object hack) {
        super(builder);
    }

    public static Builder newObjectExecutionResultNode() {
        return new Builder();
    }

    @Override
    public > ObjectExecutionResultNode transform(Consumer builderConsumer) {
        Builder builder = new Builder(this);
        builderConsumer.accept((T) builder);
        return builder.build();
    }

    public static class Builder extends BuilderBase {
        public Builder() {
        }

        public Builder(ObjectExecutionResultNode existing) {
            super(existing);
        }

        @Override
        public ObjectExecutionResultNode build() {
            return new ObjectExecutionResultNode(this);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy