Module evita.external.api.graphql
Record Class GraphQLRequest
java.lang.Object
java.lang.Record
io.evitadb.externalApi.graphql.io.GraphQLRequest
public record GraphQLRequest(@Nonnull String query, @Nullable String operationName, @Nullable Map<String,Object> variables, @Nullable Map<String,Object> extensions)
extends Record
Client request for GraphQL.
- Author:
- Lukáš Hornych, FG Forrest a.s. (c) 2022
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns client context extensions from sent extensions.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theextensionsrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theoperationNamerecord component.query()Returns the value of thequeryrecord component.graphql.ExecutionInputCopies request data to execution input as well as settings base execution context.final StringtoString()Returns a string representation of this record class.Returns the value of thevariablesrecord component.
-
Constructor Details
-
GraphQLRequest
public GraphQLRequest(@Nonnull String query, @Nullable String operationName, @Nullable Map<String, Object> variables, @Nullable Map<String, Object> extensions) Creates an instance of aGraphQLRequestrecord class.- Parameters:
query- the value for thequeryrecord componentoperationName- the value for theoperationNamerecord componentvariables- the value for thevariablesrecord componentextensions- the value for theextensionsrecord component
-
-
Method Details
-
clientContextExtension
Returns client context extensions from sent extensions. If no client context extension is sent, theClientContextExtension.empty()is returned, so we can at least somehow classify the request. -
toExecutionInput
public graphql.ExecutionInput toExecutionInput()Copies request data to execution input as well as settings base execution context. Currently, only query execution start is filled.- Returns:
- execution input
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
query
Returns the value of thequeryrecord component.- Returns:
- the value of the
queryrecord component
-
operationName
Returns the value of theoperationNamerecord component.- Returns:
- the value of the
operationNamerecord component
-
variables
Returns the value of thevariablesrecord component.- Returns:
- the value of the
variablesrecord component
-
extensions
Returns the value of theextensionsrecord component.- Returns:
- the value of the
extensionsrecord component
-