# Internal server error when using GraphQL: Probably related to ENSG00000089127

**URL:** <https://community.opentargets.org/t/internal-server-error-when-using-graphql-probably-related-to-ensg00000089127/650>\
**Category:** GraphQL API\
**Created:** [6 June 2022 15:13 UTC](https://community.opentargets.org/t/internal-server-error-when-using-graphql-probably-related-to-ensg00000089127/650 "2022-06-06T15:13:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasperhyp](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/jasperhyp/32/186_2.png) [@jasperhyp](https://community.opentargets.org/u/jasperhyp)\
**Post date:** [6 June 2022 15:13 UTC](https://community.opentargets.org/t/internal-server-error-when-using-graphql-probably-related-to-ensg00000089127/650/1 "2022-06-06T15:13:00Z")

</div>

Hi, I am trying to use GraphQL to access diabete mellitus (EFO\_0000400)'s full association profile, since the webpage downloading has failed due to the previously reported [bug](https://community.opentargets.org/t/cannot-download-associations-data-on-webpage-keeps-loading/585). However, it looks like GraphQL also suffers from this issue.

When I used the following query to access the data, I found that all indices work despite 1131, which raises an “Internal server error”.

```auto
query disease{
    disease(efoId: "EFO_0000400"){
      id
      name
      associatedTargets(page: { index: 1131, size: 1 }) {
        rows {
            score
            datatypeScores{
                id
                score
            }
            target {
                id
                approvedSymbol
            }
        }
      }
    }
  }

```

```auto
{
  "data": {
    "disease": null
  },
  "errors": [
    {
      "message": "Internal server error",
      "path": [
        "disease",
        "associatedTargets",
        "rows",
        0,
        "target"
      ],
      "locations": [
        {
          "line": 12,
          "column": 9
        }
      ]
    }
  ]
}

```

I highly suspect OAS1, i.e. the problematic gene (ENSG00000089127), is exactly this 1131-th record, since it is indeed associated with diabetes, and the webpage [Targets associated with diabetes mellitus](https://platform.opentargets.org/disease/EFO_0000400/associations) also fails to go to page 3 when the rows per page is set to 500, where the 1131-th entry should lie in. I am not sure if this is indeed the case since according to the GitHub issue, this issue has been resolved in the backend.

Of course, one simple work-around is to just avoid querying the 1131-th entry. Yet is there any data querying means that would work without manipulation?

Thanks!

---

<div class="post-metadata">

**Author:** ![Kirill\_Tsukanov](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/kirill_tsukanov/32/31_2.png) [@Kirill\_Tsukanov](https://community.opentargets.org/u/Kirill_Tsukanov)\
**Post date:** [6 June 2022 15:35 UTC](https://community.opentargets.org/t/internal-server-error-when-using-graphql-probably-related-to-ensg00000089127/650/2 "2022-06-06T15:35:53Z")

</div>

Hi [jasperhyp](https://community.opentargets.org/u/jasperhyp), what you’re observing is exactly the bug which was discovered thanks to your original report. It manifests in GraphQL queries, and by extension also on the website and in using the download buttons (which use GraphQL as backend). Unfortunately, as Helena said [here,](https://community.opentargets.org/t/cannot-download-associations-data-on-webpage-keeps-loading/585/4) this will only be fixed in the next release.

---

<div class="post-metadata">

**Author:** ![Kirill\_Tsukanov](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/kirill_tsukanov/32/31_2.png) [@Kirill\_Tsukanov](https://community.opentargets.org/u/Kirill_Tsukanov)\
**Post date:** [6 June 2022 15:36 UTC](https://community.opentargets.org/t/internal-server-error-when-using-graphql-probably-related-to-ensg00000089127/650/3 "2022-06-06T15:36:42Z")

</div>

Speaking of other data access options, you can always download the complete datasets either from FTP or from Google Cloud buckets, as described here: [Data access - Open Targets Platform Documentation](https://platform-docs.opentargets.org/data-access)

---

<div class="post-metadata">

**Author:** ![jasperhyp](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/jasperhyp/32/186_2.png) [@jasperhyp](https://community.opentargets.org/u/jasperhyp)\
**Post date:** [6 June 2022 16:00 UTC](https://community.opentargets.org/t/internal-server-error-when-using-graphql-probably-related-to-ensg00000089127/650/4 "2022-06-06T16:00:24Z")

</div>

Thanks Kirill! I would circumvent that through some code work when querying.

---

<div class="post-metadata">

**Author:** ![jasperhyp](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/jasperhyp/32/186_2.png) [@jasperhyp](https://community.opentargets.org/u/jasperhyp)\
**Post date:** [6 June 2022 16:12 UTC](https://community.opentargets.org/t/internal-server-error-when-using-graphql-probably-related-to-ensg00000089127/650/5 "2022-06-06T16:12:07Z")

</div>

There seems to be another record duplicate issue but I am not sure. So in the 3rd page (size=50) of diabetes mellitus, there is a record of NDUFB4:

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/opentargets/original/1X/cddd8c3c35ce4454b0ff15c7ad94f31c7d90569c.png)

While in the 2nd page, there is also such an identical record:

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/opentargets/original/1X/545d248df142f02e2641c72b1831bdddc075ef80.png)

Hopefully this is just a duplicate and changes nothing.

---

<div class="post-metadata">

**Author:** ![jasperhyp](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/jasperhyp/32/186_2.png) [@jasperhyp](https://community.opentargets.org/u/jasperhyp)\
**Post date:** [6 June 2022 16:18 UTC](https://community.opentargets.org/t/internal-server-error-when-using-graphql-probably-related-to-ensg00000089127/650/6 "2022-06-06T16:18:38Z")

</div>

In fact, GraphQL also gave duplicate responses for some genes. Some examples include: MKKS, Y-RNA, TBCE, PINX1, POLR2J3, etc. The genes with \>1 occurrences in the response of query to diabetes mellitus are:

```python
{'Y_RNA': 52, 'MKKS': 3, 'TBCE': 2, 'PINX1': 2, 'POLR2J3': 2, 'SIGLEC5': 2, 'PFKP': 2, 'ZUP1': 2, 'IGKV1D-37': 2, 'RAB3D': 2, 'ASGR1': 2, 'PLCG2': 2, 'DERL3': 2, 'CSN1S1': 2, 'ANKS1A': 2, 'RNY4': 2, 'HBG2': 2, 'LAMC2': 2, 'MYO1B': 2, 'PNPLA8': 2, 'CLPP': 2, 'ARHGEF3': 2, 'KCNC1': 2, 'H3P7': 2, 'PRELP': 2, 'ETV4': 2, 'NELFCD': 2, 'HORMAD1': 2, 'SH2D1A': 2, 'CIB2': 2, 'ARHGAP22': 2, 'LIMS1': 2, 'HEY1': 2, 'FBLN5': 2, 'HOXC8': 2, 'CELA1': 2, 'MAN1A1': 2, 'SERINC5': 2, 'PPP1R9B': 2, 'PLCD1': 2, 'INHA': 2, 'AREG': 2, 'ABT1': 2, 'FBXO25': 2, 'IL2RG': 2, 'HBS1L': 2, 'FRK': 2, 'OR6C3': 2, 'PPP3R1': 2}

```

Some of those records do not align with one another.
