GraphQLSource static method

RADRetrieve GraphQLSource(
  1. String url,
  2. String body,
  3. Map<String, String> headers,
  4. dynamic script, [
  5. RADType kind = RADType.HttpPost,
])

Implementation

static RADRetrieve GraphQLSource(
    String url, String body, Map<String, String> headers, dynamic script,
    [RADType kind = RADType.HttpPost]) {
  String _body = _formatBody(body);
  return RADRetrieve(
      kind: kind,
      url: url,
      script: radToCbor(script.encode()),
      body: stringToBytes(_body),
      headers: List<StringPair>.from(headers.entries
          .toList()
          .map((e) => StringPair(left: e.key, right: e.value))));
}