Skip to content

Commit

Permalink
update naming
Browse files Browse the repository at this point in the history
  • Loading branch information
nhannah committed Nov 17, 2023
1 parent f78f79c commit 89e7408
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions links/gql_dedupe_link/lib/gql_dedupe_link.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ import "package:gql_link/gql_link.dart";

/// A [Link] to deduplicate [Request]s
class DedupeLink extends Link {
final List<OperationType> _nonDedupeTypes;
final List<OperationType> _nonDedupeOperationTypes;
final Map<Request, StreamSplitter<Response>> _inFlight = {};

DedupeLink({List<OperationType> nonDedupeTypes = const []})
: _nonDedupeTypes = nonDedupeTypes;
DedupeLink({List<OperationType> nonDedupeOperationTypes = const []})
: _nonDedupeOperationTypes = nonDedupeOperationTypes;

@override
Stream<Response> request(
Request request, [
NextLink? forward,
]) {
final shouldDedupe = !_nonDedupeTypes.contains(
final shouldDedupe = !_nonDedupeOperationTypes.contains(
request.operation.getOperationType(),
);

Expand Down
2 changes: 1 addition & 1 deletion links/gql_dedupe_link/test/gql_dedupe_link_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ void main() {
});

final link = Link.from([
DedupeLink(nonDedupeTypes: [OperationType.query]),
DedupeLink(nonDedupeOperationTypes: [OperationType.query]),
mockLink,
]);

Expand Down

0 comments on commit 89e7408

Please sign in to comment.