prisma-appsync icon indicating copy to clipboard operation
prisma-appsync copied to clipboard

Support Prisma 3.3.0 with relation fields for MongoDB and MongoDB 5 support

Open mikerudge opened this issue 4 years ago • 3 comments

Prisma 3.3.0 has been released with two major features we have been waiting for.

  1. Support for MongoDB 5, which means we can use a serverless db, perfect fit for lambda!
  2. Support for ordering by relation fields in MongoDB

I am guessing we can just add a resolutions field in package.json to take advantage of the MongoDB 5 support but the relation fields would need to be added to the generator?

It feels like the prisma team are soon going to support embedded types with MongoDB, which is the biggest feature missing at the moment IMHO. Something to think about maybe?

Thanks!

mikerudge avatar Oct 19 '21 16:10 mikerudge

Since Prisma-AppSync only acts as a wrapper around Prisma Client, you should be able to take advantage of MongoDB support by upgrading the package.json to the latest version of Prisma libraries.

In theory, that should be enough to make it work! Please open a new issue in case you notice some incompatibilities.

maoosi avatar Nov 19 '21 09:11 maoosi

Sorry, maybe should of been clearer. The main thing is that you can now order by relational fields. https://www.prisma.io/docs/concepts/components/prisma-client/filtering-and-sorting#sort-by-relation

Wouldn't the part that generates the queries need to be updated to support this?

mikerudge avatar Nov 20 '21 10:11 mikerudge

Ah, right I see sorry! Yes, there is some work required on Prisma-AppSync to support order by relational fields.

I am still working on a big release in the background, which is taking me longer than anticipated. Will add order by relations as part of it.

maoosi avatar Nov 21 '21 00:11 maoosi