Skip to content

graphql connection not returning correct results anymore #9146

@laurenskling

Description

@laurenskling

Bug report

Describe the bug

So a bunch of changes to the graphql queries in 3.4.2 and 3.4.3 gave me the following: I have about 700 vehicles in my Strapi. When running this query:

query  {
  vehiclesConnection {
    groupBy {
      make {
        key
      }
    }
  }
}

I used to get all the makes, but with the latest release, the list is shorter. Playing with the limit gave me a hint. I think the limit actually limits the amount of vehicles that are taking into account. Since I can never seem to limit about 100 in graphql, only the first 100 vehicles are taking into account for finding the make. So I get only a subset of all actual available makes in the db.

Steps to reproduce the behavior

  1. Add hundreds of items to a model (vehicles)
  2. request the connection in graphql (vehicleConnection)
  3. Use the sort to play around with the result set and see that you can actually get a different result, still not being all makes

Expected behavior

I'd expect to get every single make present in the db with this query

System

  • Node.js version :v14.15.1
  • NPM version: 6.14.8
  • Strapi version: 3.4.3
  • Database: mongo atlas
  • Operating system: macos

Additional context

Had no problems in 3.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: bugIssue reporting a bugseverity: mediumIf it breaks the basic use of the product but can be worked aroundsource: plugin:graphqlSource is plugin/graphql packagestatus: confirmedConfirmed by a Strapi Team member or multiple community members

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions