graphql.execution.RawVariables Maven / Gradle / Ivy
package graphql.execution;
import graphql.PublicApi;
import graphql.collect.ImmutableKit;
import graphql.collect.ImmutableMapWithNullValues;
import java.util.Map;
/**
* Holds raw variables, which have not been coerced yet into {@link CoercedVariables}
*/
@PublicApi
public class RawVariables {
private final ImmutableMapWithNullValues rawVariables;
public RawVariables(Map rawVariables) {
this.rawVariables = ImmutableMapWithNullValues.copyOf(rawVariables);
}
public Map toMap() {
return rawVariables;
}
public boolean containsKey(String key) {
return rawVariables.containsKey(key);
}
public Object get(String key) {
return rawVariables.get(key);
}
public static RawVariables emptyVariables() {
return RawVariables.of(ImmutableKit.emptyMap());
}
public static RawVariables of(Map rawVariables) {
return new RawVariables(rawVariables);
}
@Override
public String toString() {
return rawVariables.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy