copyWith method

Query copyWith({
  1. String? document,
  2. Map<String, dynamic>? variables,
  3. Map<String, String>? headers,
  4. String? key,
})

The method copyWith will copy Query into a new object, changing the variable values

Implementation

Query copyWith({
  String? document,
  Map<String, dynamic>? variables,
  Map<String, String>? headers,
  String? key,
}) {
  return Query(
    document: document ?? this.document,
    variables: variables ?? this.variables,
    headers: headers ?? this.headers,
    key: key ?? this.key,
  );
}