Skip to content

Commit

Permalink
feat: use equatable package to make it easier to compare links
Browse files Browse the repository at this point in the history
allows to compare if two instance of a class are the same
  • Loading branch information
mainawycliffe committed Nov 6, 2019
1 parent e14349d commit a7ed072
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/graphql/lib/src/link/link.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:async';

import 'package:equatable/equatable.dart';
import 'package:graphql/src/link/fetch_result.dart';
import 'package:graphql/src/link/operation.dart';

Expand All @@ -26,7 +27,7 @@ Link _concat(
});
}

class Link {
class Link extends Equatable {
Link({this.request});

RequestHandler request;
Expand All @@ -37,6 +38,9 @@ class Link {
}

Link concat(Link next) => _concat(this, next);

@override
List<Object> get props => null;
}

Stream<FetchResult> execute({Link link, Operation operation}) =>
Expand Down
1 change: 1 addition & 0 deletions packages/graphql/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dependencies:
rxdart: ^0.22.0
websocket: ^0.0.5
quiver: ">=2.0.0 <3.0.0"
equatable: ^0.6.0
dev_dependencies:
pedantic: ^1.8.0+1
mockito: ^4.0.0
Expand Down

0 comments on commit a7ed072

Please sign in to comment.