graphql – When to add fields to a Relay connection or edge type?

I have a Seller and a Product node types, and a schema that looks like this:

seller { # Seller node
  products @connection {
    edges {
      node { # Product node

I would like to expose a field to know if a seller has any free products, and I’m not sure if I should put it in the connection or in the seller type?

I think having it in the connection would make sense since this information is derived from the link between a creator and its products, but I can’t find any guidance if that’s a good practice or not.

In my mind it would be:

seller { # Seller node
  products @connection {
    freeProductsCount
    edges {
      node { # Product node

Read more here: Source link