ChilliCream/graphql-platform

Connection.totalCount returns -1 when it should return 0 using Entity Framework

willgittoes opened this issue · 2 comments

Product

Hot Chocolate

Version

14.0.0

Link to minimal reproduction

ChilliCream/hotchocolate-examples#65

Steps to reproduce

totalCount returns -1 when it should return 0

  1. Check out and run the updated Contoso blog example from here: ChilliCream/hotchocolate-examples#65
  2. Run the following query:
query {
   students ( first:10, where: {id: {eq: 69}} ) {
    nodes {
      id
    }
    totalCount
   }
}

What is expected?

The following response:

{
  "data": {
    "students": {
      "nodes": [],
      "totalCount": 0
    }
  }
}

What is actually happening?

The following response:

{
  "data": {
    "students": {
      "nodes": [],
      "totalCount": -1
    }
  }
}

Relevant log output

No response

Additional context

No response

ALSO: If you remove first: 10 from the query, I get the error:

Never mind: (Just had to read about RequirePagingBoundaries)

Thank you so much! <3