parseResponse method Null safety

Response parseResponse(
  1. Map<String, dynamic> body
)

Parses the response body

Extend this to add non-standard behavior

Implementation

Response parseResponse(Map<String, dynamic> body) => Response(
      errors: (body["errors"] as List?)
          ?.map(
            (dynamic error) => parseError(error as Map<String, dynamic>),
          )
          .toList(),
      data: body["data"] as Map<String, dynamic>?,
      context: Context().withEntry(
        ResponseExtensions(
          body["extensions"],
        ),
      ),
    );