how to hide resolvers(like application schema) #71
-
Hello, Coming from the Prisma 1 world to TypeGraphQL :) Back in Prisma 1, we had two graphql schemas; one of them was generated and had tons of types, etc. The other one was maintained by the user and was called Application schema. Now we used to use the application schema to hide some resolvers from the outside world and just expose a few. Since we currently use the typegraphql prisma genertaor, it generates all possible resolvers, many of them we would like to hide. Is that use case possible? And since our previous resolvers had custom logic before saving/deleting/etc, is it possible to have that logic back? Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
You can pick the actions you want: Or have two separate schemas (private and public one): const firstSchema = await buildSchema({
resolvers: [UserCrudResolver],
});
const secondSchema = await buildSchema({
resolvers: [CategoryUpdateResolver],
});
TypeGraphQL hasn't provided any integration with Prisma 1, so I'm not sure about what support should I bring back and what do you expect from this |
Beta Was this translation helpful? Give feedback.
You can pick the actions you want:
https://github.com/MichalLytek/typegraphql-prisma#exposing-selected-prisma-actions-only
Or have two separate schemas (private and public one):