Your query returned errors on prisma admin & Whoops. Looks like an internal server error


#1

Hi all,

I hope very much that someone can hint me in the right direction with the below errors.

I used prisma introspect to generate the datamodel which I’ve changed it afterwards (it’s worth nothing that this datamodel worked perfectly in the past on older versions).

I have 2 errors at the moment.

  1. on prisma admin
    “message”: “Cannot query field ‘id’ on type ‘Listing’. Did you mean ‘_id’? (line 27, column 5):\n __id: id\n ^”,
    “message”: “Cannot query field ‘id’ on type ‘UserLocal’. (line 7, column 7):\n __id: id\n ^”,
    Which I totally don’t understand where is coming from as the query runs perfectly fine in the playground.

  2. the second errors is when I am trying to do a query from my own graphql api with
    await context.prisma.listings({where: {something}})

    “message”: “Whoops. Looks like an internal server error. Search your server logs for request ID: local:cjudva4yn000d0782tfkdo7wn”,

here is the log when I run the query (which I totally don’t understand at all)

prisma_1 |
prisma_1 | java.lang.RuntimeException: Not implemented: com.prisma.shared.models.TypeIdentifier$Float$@6bb8923cBsonInt32{value=5}
prisma_1 | at scala.sys.package$.error(package.scala:26)
prisma_1 | at com.prisma.api.connector.mongo.extensions.BisonToGC$.apply(MongoExtensions.scala:90)
prisma_1 | at com.prisma.api.connector.mongo.extensions.BisonToGC$.apply(MongoExtensions.scala:65)
prisma_1 | at com.prisma.api.connector.mongo.extensions.DocumentToRoot$.$anonfun$apply$6(MongoExtensions.scala:124)
prisma_1 | at scala.Option.map(Option.scala:146)
prisma_1 | at com.prisma.api.connector.mongo.extensions.DocumentToRoot$.$anonfun$apply$5(MongoExtensions.scala:124)
prisma_1 | at scala.collection.immutable.List.map(List.scala:282)
prisma_1 | at com.prisma.api.connector.mongo.extensions.DocumentToRoot$.apply(MongoExtensions.scala:124)
prisma_1 | at com.prisma.api.connector.mongo.extensions.MongoResultReader.readsPrismaNode(MongoExtensions.scala:102)
prisma_1 | at com.prisma.api.connector.mongo.extensions.MongoResultReader.readsPrismaNode$(MongoExtensions.scala:101)
prisma_1 | at com.prisma.api.connector.mongo.database.MongoActionsBuilder.readsPrismaNode(MongoActionsBuilder.scala:18)
prisma_1 | at com.prisma.api.connector.mongo.database.NodeManyQueries.$anonfun$getNodes$3(NodeManyQueries.scala:20)
prisma_1 | at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:233)
prisma_1 | at scala.collection.immutable.List.foreach(List.scala:388)
prisma_1 | at scala.collection.TraversableLike.map(TraversableLike.scala:233)
prisma_1 | at scala.collection.TraversableLike.map$(TraversableLike.scala:226)
prisma_1 | at scala.collection.immutable.List.map(List.scala:294)
prisma_1 | at com.prisma.api.connector.mongo.database.NodeManyQueries.$anonfun$getNodes$2(NodeManyQueries.scala:20)
prisma_1 | at scala.util.Success.$anonfun$map$1(Try.scala:251)
prisma_1 | at scala.util.Success.map(Try.scala:209)
prisma_1 | at scala.concurrent.Future.$anonfun$map$1(Future.scala:288)
prisma_1 | at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:29)
prisma_1 | at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:29)
prisma_1 | at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:60)
prisma_1 | at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
prisma_1 | at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
prisma_1 | at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
prisma_1 | at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
prisma_1 | at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
prisma_1 | {“key”:“error/unhandled”,“requestId”:“local:cjudvfvll000h0782cclx0nlt”,“clientId”:“default_default”,“payload”:{“exception”:“java.lang.RuntimeException: Not implemented: com.prisma.shared.models.TypeIdentifier$Float$@6bb8923cBsonInt32{value=5}”,“query”:“query ($where: ListingWhereInput) {\n listings(where: $where) {\n _id\n authorId\n title\n content\n type\n amenities\n price\n lat\n lng\n beds\n bath\n garage\n parking\n sq\n address\n county\n area\n city\n eircode\n image1\n image2\n createdAt\n property_type\n rent_price_type\n }\n}\n”,“variables”:"{“where”:{“property_type”:“House”}}",“code”:“0”,“stack_trace”:“scala.sys.package$.error(package.scala:26)\n com.prisma.api.connector.mongo.extensions.BisonToGC$.apply(MongoExtensions.scala:90)\n com.prisma.api.connector.mongo.extensions.BisonToGC$.apply(MongoExtensions.scala:65)\n com.prisma.api.connector.mongo.extensions.DocumentToRoot$.$anonfun$apply$6(MongoExtensions.scala:124)\n scala.Option.map(Option.scala:146)\n com.prisma.api.connector.mongo.extensions.DocumentToRoot$.$anonfun$apply$5(MongoExtensions.scala:124)\n scala.collection.immutable.List.map(List.scala:282)\n com.prisma.api.connector.mongo.extensions.DocumentToRoot$.apply(MongoExtensions.scala:124)\n com.prisma.api.connector.mongo.extensions.MongoResultReader.readsPrismaNode(MongoExtensions.scala:102)\n com.prisma.api.connector.mongo.extensions.MongoResultReader.readsPrismaNode$(MongoExtensions.scala:101)\n com.prisma.api.connector.mongo.database.MongoActionsBuilder.readsPrismaNode(MongoActionsBuilder.scala:18)\n com.prisma.api.connector.mongo.database.NodeManyQueries.$anonfun$getNodes$3(NodeManyQueries.scala:20)\n scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:233)\n scala.collection.immutable.List.foreach(List.scala:388)\n scala.collection.TraversableLike.map(TraversableLike.scala:233)\n scala.collection.TraversableLike.map$(TraversableLike.scala:226)\n scala.collection.immutable.List.map(List.scala:294)\n com.prisma.api.connector.mongo.database.NodeManyQueries.$anonfun$getNodes$2(NodeManyQueries.scala:20)\n scala.util.Success.$anonfun$map$1(Try.scala:251)\n scala.util.Success.map(Try.scala:209)\n scala.concurrent.Future.$anonfun$map$1(Future.scala:288)\n scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:29)\n scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:29)\n scala.concurrent.impl.CallbackRunnable.run(Promise.scala:60)\n java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)\n java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)\n java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)\n java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)\n java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)”,“message”:“Not implemented: com.prisma.shared.models.TypeIdentifier$Float$@6bb8923cBsonInt32{value=5}”}}

If anyone could hint me in the right direction from where the issue might come from I would greatly appreciate the help.

Thanks in advance,
Alex


#2

Can you please share your datamodel?


#3

Hi, thanks for your reply. Please see the datamodel below. Thanks again.

type Listing @db(name: “listings”) {
_id: ID! @id
authorId: String
title: String
content: String
type: String
amenities: [String]
price: Int
lat: Float
lng: Float
beds: Int
bath: Int
garage: Int
parking: Boolean
sq: Int
address: String
county: String
area: String
city: String
eircode: String
image1: String
image2: String
createdAt: DateTime
property_type: String @db(name: “property_type”)
rent_price_type: String @db(name: “rent_price_type”)
}

type User @db(name: “users”) {
_id: ID! @id
local: UserLocal
profile: UserProfile
}

type UserLocal @embedded {
email: String
password: String
username: String
verificationToken: String
verificationTokenExpiresAt: DateTime
}

type UserProfile @embedded {
age: Int
firstName: String
lastName: String
phoneNo: Int
} `