Skip to content

Example > getTopSightings query Error #158

@sugasaki

Description

@sugasaki

This will result in a query error.

https://github.com/aPureBase/KGraphQL/blob/main/kgraphql-example/src/main/kotlin/com/apurebase/kgraphql/service/UFOSightingService.kt#L64

{
  "errors": [
    {
      "message": "org.h2.jdbc.JdbcSQLSyntaxErrorException: Table \"UFOSIGHTING\" not found; SQL statement:\nSELECT state, country, COUNT(state) as numOccurrences FROM ufosighting group by state, country order by COUNT(state) DESC [42102-200]",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": []
    }
  ]
}

If you make the following changes, it should work correctly

ufosighting -> ufosightings

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