Graphiti icon indicating copy to clipboard operation
Graphiti copied to clipboard

Is it possible to add custom fields to Connections?

Open cshadek opened this issue 5 years ago • 2 comments

For example, how could we add a totalCount field to the Connection or maybe even another field to the Edge object.

This use case is discussed here: https://graphql.org/learn/pagination/

This is also used in the Github API.

cshadek avatar Oct 31 '20 18:10 cshadek

Hey, @cshadek. We don't provide a way to do that with the existing infrastructure for Connection. You can always create your own connection type with any extra data you might want.

paulofaria avatar Feb 10 '21 17:02 paulofaria

Thanks @paulofaria. One of the main useful additions to Connections I can think of would be having a totalCount field. Have you considered this in the past?

cshadek avatar Feb 21 '21 02:02 cshadek