Public facing vs Admin facing apis #141
Unanswered
cipriancaba
asked this question in
Q&A
Replies: 1 comment 4 replies
-
@cipriancaba If you want to keep your endpoints and GraphQL schemas separate, then you'd probably have to create 2 distinct Prisma-AppSync projects under "public" and "private":
You could then add a tool like prisma-merge to your workflow to merge “shared + private” and “shared + public” schemas. Similarly, you could have all your Prisma-AppSync shared business logic (hooks, resolvers, ...) inside the “shared” folder and import things as needed. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Been trying to figure out an elegant solution for creating 2 different graphql endpoints. One would be the one with CRUD operations, which will be admin facing and the other would be public(client) facing and will just contain a subset of the operations and potentially some custom resolvers.
The complication comes from the fact that I need to use one prisma schema and the generated graphql schemas would obviously be different. Also would need to disable the crud resolvers altogether in one of the instances.
Any idea on how I could achieve this?
Been using a gateway before that would proxy the graphql requests and only expose a subset of the schema, but would like to avoid this if possible.
Beta Was this translation helpful? Give feedback.
All reactions