Suppose I already have a Keystone setup installed in a folder, and now I want to extend this app by adding some REST API endpoints to it. The standard way to achieve this is by using extendExpressApp, but it doesn't work when all my development tools are in a different framework like NestJS. In order to run my queries and perform other actions, I need to incorporate KeystoneJS as a library inside my NestJS framework. (I can set up the NestJS server inside or beside or as a parent folder of the keystone setup but I don't think it is a best practice to mix two different frameworks in the same folder).
There are a few workarounds available:
One option is to use a separate Prisma client to work with the same configuration, but this approach doesn't handle the access controls defined within Keystone. Another option is to use a GraphQL client to access the Keystone server as a client. However, in my opinion, this approach is not very efficient in terms of both development and performance, especially when dealing with a codebase that contains numerous GraphQL queries.