anyone able to help me understand what SharedLink ...
# orm-help
j
anyone able to help me understand what SharedLink does in the prisma-binding ? https://github.com/graphcool/prisma-binding/blob/master/src/SharedLink.ts
t
Thanks for the question @jjaybrown98! The reason we have the SharedLink, is that we want to reuse the schema for each incoming request as schema generation takes a lot of time. So we use this link that allows us to inject the "inner link" later if we want to replace the link. Why do we want to replace the link? Because when we want dataloader capability and reset the caching after the request was successful, we want to created a new
BatchedHTTPLink
💡 1
j
Thanks for the explanation 🙂