public interface Operation<D extends Operation.Data,T,V extends Operation.Variables>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Operation.Data
Abstraction for data returned by the server in response to this operation.
|
static class |
Operation.Variables
Abstraction for the variables which are a part of the GraphQL operation.
|
| Modifier and Type | Field and Description |
|---|---|
static Operation.Variables |
EMPTY_VARIABLES |
| Modifier and Type | Method and Description |
|---|---|
OperationName |
name()
Returns GraphQL operation name.
|
java.lang.String |
operationId()
Returns a unique identifier for this operation.
|
java.lang.String |
queryDocument()
Returns the raw GraphQL operation String.
|
ResponseFieldMapper<D> |
responseFieldMapper()
Returns a mapper that maps the server response data to generated model class
D. |
V |
variables()
Returns the variables associated with this GraphQL operation.
|
T |
wrapData(D data)
Wraps the generated response data class
D with another class. |
static final Operation.Variables EMPTY_VARIABLES
java.lang.String queryDocument()
V variables()
ResponseFieldMapper<D> responseFieldMapper()
D.T wrapData(D data)
D with another class. For example, a use case for this would be to
wrap the generated response data class in an Optional i.e. Optional.fromNullable(data).@Nonnull OperationName name()
OperationName operation name@Nonnull java.lang.String operationId()