toJson method

  1. @override
Map<String, dynamic> toJson()
override

Converts this GridField to a json representation

Implementation

@override
Map<String, dynamic> toJson() {
  final json = super.toJson();
  json['type'] = {
    ...json['type'],
    'referencesField': referencesField.toString(),
    'lookupField': lookUpField.toString(),
    'reducedType': reducedField.toJson()['type'],
    'reduceFunction': reduceFunction,
  };
  return json;
}