I commented on this issue already but hoping someo...
# orm-help
z
I commented on this issue already but hoping someone here might have some insight on the magical back relations. (https://github.com/prisma/prisma/issues/2693) Are we no longer able to use these back relations in our resolvers? We were using them and now they are no longer generated when doing a codegen to our server. They are still generated when deploying locally though. Is there a recommended way to reverse lookup through types? We have the following resolver that no longer seems to work remotely:
Copy code
async getDebitTransactionsForWriteOffReport(_, args, ctx: Context, info) { return ctx.db.query.debitTransactions({ where: { _MagicalBackRelation_DebitTransactionsInClaim_every: { _MagicalBackRelation_ClaimsForPatient_every: { _MagicalBackRelation_PatientsInWriteOffReport_every: { id: args.id } } } } }, info)
d
This was an API that was exposed inadvertently, the solution to this would be to add the relation in your datamodel, deploying it, and using the correct filter from the generated schema API.