Skip to content

how to hide resolvers(like application schema) #71

Answered by MichalLytek
omar-dulaimi asked this question in Q&A
Discussion options

You must be logged in to vote

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?

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):

const firstSchema = await buildSchema({
  resolvers: [UserCrudResolver],
});
const secondSchema = await buildSchema({
  resolvers: [CategoryUpdateResolver],
});

And since our previous resolvers had custom logic before saving/deleting/etc, is it pos…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@MichalLytek
Comment options

@MichalLytek
Comment options

@omar-dulaimi
Comment options

@MichalLytek
Comment options

@omar-dulaimi
Comment options

Answer selected by omar-dulaimi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants