parseError method Null safety

GraphQLError parseError(
  1. Map<String, dynamic> error
)

Parses a response error

Extend this to add non-standard behavior

Implementation

GraphQLError parseError(Map<String, dynamic> error) => GraphQLError(
      message: error["message"] as String,
      path: error["path"] as List?,
      locations: (error["locations"] as List?)
          ?.map(
            (dynamic location) =>
                parseLocation(location as Map<String, dynamic>),
          )
          .toList(),
      extensions: error["extensions"] as Map<String, dynamic>?,
    );