Mesh use cases are Api gateway only-no resolver support? | Community
Skip to main content
HeenaMadan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
April 15, 2025
Question

Mesh use cases are Api gateway only-no resolver support?

  • April 15, 2025
  • 2 replies
  • 664 views

Hi team,

 

Last year when i worked on Adobe Mesh then it provided support to use additionalresolver and perform operation in the same mesh. Now i can see it act as Api gateway just to provide single endpoint for multiple platforms like magento, rest apis, third party api etc.

SO we can't use additionalresolvers, operation now in api mesh rather calling apis via gateway for safety purposes ?

 

Please share thoughts as we are planning to use mesh to perform operations.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Adobe Employee
April 15, 2025

Hello Heena,

Thank you for your insightful question about the potential use cases of API Mesh.

API Mesh is an extensible reverse GraphQL proxy. To break this down:

  • Reverse Proxy: It provides a single public endpoint that routes requests to multiple backend services.

  • GraphQL Proxy: The public endpoint, generated after deploying the mesh, is a GraphQL endpoint.

  • Extensible: You can enhance it by adding custom resolvers or hooks to modify how GraphQL operations are executed.

To answer your question, API Mesh functions as a gateway while also offering the flexibility to extend your sources with custom resolvers, enabling more advanced use cases.

We maintain a samples repository with various use cases and their corresponding mesh configurations. You can explore it here: Adobe Commerce Samples - API Mesh. We regularly update this repository with new use cases, and we'd love to have you contribute any additional ones you may have.

For a deeper understanding of the use cases and the inner workings of the mesh, I recommend checking out this video: Deep Dive into API Mesh.

Additionally, you can refer to the official documentation for comprehensive details: API Mesh Service Documentation.

I hope this clarifies things. Let me know if you have any further questions.

HeenaMadan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
April 17, 2025

yes @ananvara 

we are on same page now. I have created project using aio app init and it has created project where web-src is generated and once you deployed it has html and web endpoints.

For my case, i need mesh.json file where i need to perform some magento operation say add to cart which will call to magento and return true /false accordingly.

So fir this i have created project using npm init -y and added mesh.json file with resolver file like:

mesh.json:

{
"meshConfig": {
"sources": [
{
"name": "MagentoGraphQL",
"handler": {
"graphql": {
"endpoint": "https://domain.com/graphql",
"operationHeaders": {
"Content-Type": "application/json",
"store": "mystore"
}
}
}
}
],
"additionalResolvers": ["./mesh/customResolver.js"]
}
}

 

not able to deploy locally and on app builder project. Can you help me here?

AnkitJasani29
Level 6
April 24, 2025

Hi @heenamadan ,

 

Use aio app init to scaffold the project.

Choose API Mesh extension during setup.

 

Ensure you place your mesh.json and customResolver.js correctly:

Your project should look like:

 

/src
   /api-mesh
       mesh.json
       customResolver.js
.env
.aio
package.json

 

Define the resolver in mesh.json like you already did:

{
"meshConfig": {
"sources": [
{
"name": "MagentoGraphQL",
"handler": {
"graphql": {
"endpoint": "https://domain.com/graphql",
"operationHeaders": {
"Content-Type": "application/json",
"store": "mystore"
}
}
}
}
],
"additionalResolvers": ["./customResolver.js"]
}
}

 

Install required dependencies:

npm install @graphql-mesh/cli @graphql-mesh/runtime @graphql-mesh/graphql

 

Add build command in your package.json (if needed):

"scripts": {
"mesh:dev": "graphql-mesh serve",
"mesh:build": "graphql-mesh build"
}

 

Run it locally to test (if needed):

npm run mesh:dev

 

Deployment with App Builder:
If you’re still getting issues on deployment:

  • Make sure your .aio configuration includes your API Mesh extension.
  • Use the aio app deploy command from the project root.
  • Log into Adobe I/O with aio login if you haven’t.
  • Check Adobe I/O Console for mesh-specific logs and failures.