Expand my Community achievements bar.

Get ready! An upgraded Experience League Community experience is coming in January.

Multi Source Mesh Api not working

Avatar

Community Advisor and Adobe Champion

Hi Team,

 

I have installed live search on my local instance and it is working fine. Now i want to create mesh api for the same. I have multiple sources and it works fine with one endpoint only. When i add graphql commerce endpoint as one source and live search config as second source then it gives error. Below is my example file for mesh.json

  {
  "meshConfig": {
    "sources": [
      {
        "name": "mystoredata",
        "handler": {
          "graphql": {
            "endpoint": "https://<login.abc.com>/graphql/",
            "operationHeaders": {
              "store": "abc",
              "Content-Type": "application/json",
              "httpMethod": "POST",
              "allowHttpProtocol": "true"
            }
          }
        }
      },
      {
        "name": "LiveSearch",
        "handler": {
          "graphql": {
            "endpoint": "https://commerce.adobe.io/search/graphql",
            "operationHeaders": {
              "Magento-Store-View-Code": "default",
              "Magento-Website-Code": "default",
              "Magento-Store-Code": "default",
              "Magento-Environment-Id": "<Magento-Environment-Id>",
              "x-api-key": "search_gql",
              "Content-Type": "application/json"
            },
            "schemaHeaders": {
              "x-api-key": "search_gql"
            }
          }
        }
      }
    ]
  }
}

getting below error with multi sources:

    "errors": [
        {
            "message": "Interface field InvoiceItemInterface.id expects type ID! but InvoiceItem.id is type Int.\n\nInterface field ShipmentItemInterface.id expects type ID! but ShipmentItem.id is type Int.\n\nInterface field ShipmentItemInterface.quantity_shipped expects type Float! but ShipmentItem.quantity_shipped is type Float."
        }
    ]
}
 
TIA

 

0 Replies