---
title: "Comment by Luiz Carlos Rodrigues on \"Write Reusable Code for AppSync JavaScript Resolvers\" | Hashnode"
description: "That´s the perfect article. Really helpfull. I have a situation where I have an API that have different resolvers and functions and i want to reuse code inside"
url: "https://hashnode.com/posts/write-reusable-code-for-appsync-javascript-resolvers/6405845d3de7f6cfae338c89/comment/657d99b19ceff72bc0c5b471"
---

[Discussion](https://hashnode.com/posts/write-reusable-code-for-appsync-javascript-resolvers/6405845d3de7f6cfae338c89)

Comment [Write Reusable Code for AppSync JavaScript Resolvers](https://hashnode.com/posts/write-reusable-code-for-appsync-javascript-resolvers/6405845d3de7f6cfae338c89)

[Luiz Carlos Rodrigues](https://hashnode.com/@luizcarlos)

[Dec 16, 2023](https://hashnode.com/posts/write-reusable-code-for-appsync-javascript-resolvers/6405845d3de7f6cfae338c89/comment/657d99b19ceff72bc0c5b471)

That´s the perfect article. Really helpfull. I have a situation where I have an API that have different resolvers and functions and i want to reuse code inside different functions. I also have the build and deploy automated with Azure devops. When i use esbuild I understood that I need to bundle file per file, when you have 10 different functions that you need to bundle with reused code how would you approach that.

example:

/functions/getPolicy.js /functions/getAccounts.js /functions/GetRoles.js /helpers/log.js /resolvers/default.js

the link between the resolver and functions are make on the cloudformation file
