Hi Joseph,
You can define a new custom payload type that includes both the existing list type and an additional field for the total count.
In the Payload Type dropdown of your custom resolver, select ‘Custom Type’. Here’s how you can define the new payload type:
type CustomPayload {
items: [ExistingType]
totalCount: Int!
}
For more guidance on what this looks like in the form of a JSON schema, take a look through our Docs here.
1 Like