Skip to content

error when trying to call aggregate function #439

@thormengkheang

Description

@thormengkheang

I can query customersConnection via GraphQL playground but I can't access vai code like in the document https://www.prisma.io/docs/prisma-client/basic-data-access/reading-data-JAVASCRIPT-rsc2/#aggregations

await prisma.customersConnection().aggregate().count()

got an error like this

{
  "data": null,
  "errors": [
    {
      "message": "prisma.customersConnection is not a function",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "customers"
      ]
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions