Skip to content

Commit 405b38e

Browse files
committed
graphql: Do not set first/skip in prefetch
1 parent 86e395a commit 405b38e

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

graphql/src/store/prefetch.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -832,23 +832,12 @@ fn fetch<S: Store>(
832832
store: &S,
833833
parents: &Vec<Node>,
834834
join: &Join<'_>,
835-
mut arguments: HashMap<&q::Name, q::Value>,
835+
arguments: HashMap<&q::Name, q::Value>,
836836
multiplicity: ChildMultiplicity,
837837
types_for_interface: &BTreeMap<s::Name, Vec<s::ObjectType>>,
838838
block: BlockNumber,
839839
max_first: u32,
840840
) -> Result<Vec<Node>, QueryExecutionError> {
841-
if multiplicity == ChildMultiplicity::Single {
842-
// For non-list fields, get up to 2 entries so we can spot
843-
// ambiguous references that should only have one entry
844-
arguments.insert(&*ARG_FIRST, q::Value::Int(2.into()));
845-
}
846-
847-
if !arguments.contains_key(&*ARG_SKIP) {
848-
// Use the default in build_range
849-
arguments.insert(&*ARG_SKIP, q::Value::Null);
850-
}
851-
852841
let mut query = build_query(
853842
join.child_type,
854843
block,

0 commit comments

Comments
 (0)