query method

Future<Response> query(
  1. String queryString,
  2. Map<String, dynamic> variables
)

Implementation

Future<Response> query(
  String queryString,
  Map<String, dynamic> variables,
) async {
  if (!this.checkQueryString(queryString)) {
    return throw const FormatException(
        'The provided query string is malformed');
  }

  final Map<String, dynamic> bodyMap = <String, dynamic>{
    'query': queryString,
    'variables': variables,
  };

  return this.postWithTimeout(bodyMap);
}