Serialise data when using executeRaw

prisma

#1

I need to use executeRaw to make a search (as Prisma doesn’t allow to do a proper searching by default)

My problem is how to return this data in a query/mutation. Let’s say I have this query:

query {
  myData(orderBy: createdAt_DESC, searchTerm: "something") {
    table {
      id
      title
    }
  }
}

Then, on the backend I’ll use executeRaw:

return context.db.mutation.executeRaw({
  query: 'SELECT * FROM something WHERE something LIKE '%bla%''
});

If I do this I get an error in Playground:

{
“data”: null,
“errors”: [
{
“message”: "Int cannot represent non-integer value: [{ id: “cjvji432r000d0780ae8oyjn2”, createdAt: “2019-05-11 12:44:11.241”, updatedAt: “2019-05-11 12:44:12.264”, title: …

So my question is… how can I “serialize” or “connect” the result coming from executeRaw to the actual fields requested in the query?

Thank you in advance.