Hi. I've been attempting to reduce the amount of d...
# orm-help
r
Hi. I've been attempting to reduce the amount of data that is possible to retrieve in a single query from our graphql-endpoint. One of the things I am doing here is setting the default
first
value to 100 for all array-type queries. I've successfully added this to the schema, and I can see that
first
is defaulted to 100 in all queries. However, it doesn't apply correctly to nested queries. Is this a bug, or am I doing something wrong here?
Copy code
type Query  {
  cats(first: Int = 2, last: Int): [Cat]!
}

type Cat implements,Node {
  name: String!
  slaves(first: Int = 2, last: Int): [Person!]
}
Copy code
query {
    cats{name slaves{name}}
}
# results has the first 2 cats and all their slaves, while they should only have the first 2 slaves, a total of 4 here.
h
You will require to limit them as well
relation stuff also have these pagination filters
r
yes, but the default value is not applied
the default-value works in that query for
cats
, but not for
slaves
should I open an issue with this? Would that be with
graphql-yoga
?
@Harshit any thooughts on this?