Is the graphql api down?

Im not able to query using the graphql API.


query DrugInsightsByCompany {
  drug(chemblId: "CHEMBL25") { # Replace with the ChEMBL ID from Step 1
    id
    name
    drugType
    isApproved
    maximumClinicalTrialPhase
    yearOfFirstApproval
    indications {
      rows {
        disease {
          id
          name
        }
        maxPhaseForIndication
      }
    }
    mechanismsOfAction {
      rows {
        mechanismOfAction
        targetName
      }
    }
    knownDrugs {
      rows {
        disease {
          name
        }
        drug {
          name
        }
        mechanismOfAction
        phase
      }
    }
  }
}
query CompanyInferredFromDrug {
  search(queryString: "Tagrisso", entityNames: ["drug"], page: {index: 0, size: 1}) {
    hits {
      id
      name
      description
    }
  }

  drug(chemblId: "CHEMBL3137347") { # Replace with the ChEMBL ID of the drug
    id
    name
    knownDrugs {
      rows {
        disease {
          name
        }
        drug {
          name
        }
        mechanismOfAction
        phase
      }
    }
  }
}

The above code (which ran smoothly last week), does results in status code 502. Im pasting the error for reference:

{
  "errors": [
    {
      "message": "Failed to fetch",
      "stack": "TypeError: Failed to fetch\n    at Ryt (https://platform.opentargets.org/assets/index-69c86a20.js:1136:200698)\n    at https://platform.opentargets.org/assets/index-fe6baee2.js:161:776\n    at onMouseUp (https://platform.opentargets.org/assets/index-fe6baee2.js:192:8116)\n    at Object.lue (https://platform.opentargets.org/assets/index-69c86a20.js:37:9873)\n    at uue (https://platform.opentargets.org/assets/index-69c86a20.js:37:10030)\n    at fue (https://platform.opentargets.org/assets/index-69c86a20.js:37:10090)\n    at gD (https://platform.opentargets.org/assets/index-69c86a20.js:37:31583)\n    at xV (https://platform.opentargets.org/assets/index-69c86a20.js:37:32001)\n    at https://platform.opentargets.org/assets/index-69c86a20.js:37:36934\n    at lO (https://platform.opentargets.org/assets/index-69c86a20.js:40:36983)"
    }
  ]
}

Thank you!

Are you still seeing this error? It might have been a temporary hiccup in the API, as we’re able to perform that query successfully.

No, its resolved now. Thank you!

2 Likes

Hello, I am getting 502 “Bad Gateway” errors again from the API. Also, the standard target-disease association demo query on the website produces an error, I have attached the screen shot.

It is working again.