graphql.spring.web.servlet.GraphQLInvocationData Maven / Gradle / Ivy
package graphql.spring.web.servlet;
import graphql.Assert;
import graphql.PublicApi;
import java.util.Collections;
import java.util.Map;
@PublicApi
public class GraphQLInvocationData {
private final String query;
private final String operationName;
private final Map variables;
public GraphQLInvocationData(String query, String operationName, Map variables) {
this.query = Assert.assertNotNull(query, () -> "query must be provided");
this.operationName = operationName;
this.variables = variables != null ? variables : Collections.emptyMap();
}
public String getQuery() {
return query;
}
public String getOperationName() {
return operationName;
}
public Map getVariables() {
return variables;
}
}