GraphQL mutation generates non-specific error

Using the information from Send a graphql request

I created a POST mutation using the body:

mutation {
  shipment_create(
    data: {
      order_id: "snmdlwerewrfnalksnflskdf"
      warehouse_id:"Vehijlkopjneignsdfkgn"
      address: {
        name: "John"
        address1: "2543 Johnson St."
        address2: "Apt. 2"
        city: "Oklahoma"
        state: "Oklahoma"
        zip: "73008"
        country: "US"
        phone: "5555555555"
      }
      line_items: { line_item_id: "khenkjfgnhosdfjlkadsjfg", quantity: 1 }
      labels: {
        address: {
          name: "John"
          address1: "2543 Johnson St."
          address2: "Apt. 2"
          city: "Oklahoma"
          state: "Oklahoma"
          zip: "73008"
          country: "US"
          phone: "5555555555"
        }
        carrier: "UPS"
        shipping_name: "UPS - Ground"
        shipping_method: "Ground"
        cost: "1.00"
        dimensions: { weight: "12", height: "12", width: "12", length: "12" }
        label: {
          paper_pdf_location: "https://www.example.com/files/print.pdf"
        }
        line_item_ids: "khenkjfgnhosdfjlkadsjfg"
        tracking_number: "1234434242444444434"
      }
      notify_customer_via_shiphero: true
      notify_customer_via_store: true
    }
  ) {
    request_id
    complexity
  }
} 

I just get error 400 “Please contact admin”. When I send the same mutation through a GraphQL IDE like Altair, it’s successful. Sending a GET query (different type) through Make.com HTTP module using the query string works.

Are you trying to do this using the shiphero API?

I was running into the same problem trying to setup the shiphero API. I had to pickup apart the Altair request to see what was going on. After doing so I changed the body type and I was able to a valid response for the webhook query.

It took me a bit too long to figure this out. I hope it helps you.

3 Likes

@ChrisHT Thank you so much! Changing the body type worked perfectedly.

2 Likes