ObjectType [UsePaging] PagingArguments being included in schema
PHILLIPS71 opened this issue · 2 comments
PHILLIPS71 commented
Product
Hot Chocolate
Version
14.0.0-p.188
Link to minimal reproduction
https://github.com/PHILLIPS71/HC-7572
Steps to reproduce
The following object type definition causes the PagingArguments
to be included in the schema, leading to the need for defining multiple sets of paging arguments.
[ObjectType<Brand>]
public static partial class BrandType
{
[UsePaging]
internal static Connection<Product> GetProducts(
[Parent] Brand parent,
PagingArguments arguments)
{
var edges = Constants
.Brands
.Where(x => x.Id == parent.Id)
.SelectMany(x => x.Products)
.Select(user => new Edge<Product>(user, y => y.Id.ToString()))
.ToList();
var info = new ConnectionPageInfo(false, false, null, null);
var connection = new Connection<Product>(edges, info);
return connection;
}
}
What is expected?
the arguments
object to be omitted
What is actually happening?
the PagingArguments
that are used in the [UsePaging]
resolver are being included in the GraphQL schema
Relevant log output
No response
Additional context
No response
glen-84 commented
You need to call AddPagingArguments
on the IRequestExecutorBuilder
.
PHILLIPS71 commented
Thanks @glen-84, that's fixed it!