# Gecko function in graphql not working

**URL:** https://community.opentargets.org/t/gecko-function-in-graphql-not-working/1103
**Category:** Technical Support
**Created:** [1 June 2023 14:24 UTC](https://community.opentargets.org/t/gecko-function-in-graphql-not-working/1103 "2023-06-01T14:24:04Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Zhana\_Kuncheva](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/zhana_kuncheva/32/435_2.png) [@Zhana\_Kuncheva](https://community.opentargets.org/u/Zhana_Kuncheva)
#### Post date: [1 June 2023 14:24 UTC](https://community.opentargets.org/t/gecko-function-in-graphql-not-working/1103/1 "2023-06-01T14:24:04Z")

</div>

Hi all,

We have been quering the gecko function for indexVariants (and tagVariants) in a region of interest but it has not been outputting anything although we know there is information there.  
Example  
{  
gecko(chromosome:“1”,start:100000000,end:102000000){  
indexVariants{  
rsId  
},  
tagVariants{  
id  
}  
}  
}

---

<div class="post-metadata">

### Author: ![Annalisa\_Buniello](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/annalisa_buniello/32/426_2.png) [@Annalisa\_Buniello](https://community.opentargets.org/u/Annalisa_Buniello)
#### Post date: [9 June 2023 08:51 UTC](https://community.opentargets.org/t/gecko-function-in-graphql-not-working/1103/2 "2023-06-09T08:51:59Z")

</div>

Dear Zhana,  
welcome to our Community!  
The API endpoint you are querying is now obsolete, and has been replaced with the `LocusPageQuery` endpoint. However, [that request](https://api.genetics.opentargets.org/graphql/browser?query=query%20LocusPageQuery(%24optionalVariantId%3A%20String%2C%20%24optionalGeneId%3A%20String%2C%20%24optionalStudyId%3A%20String%2C%20%24chromosome%3A%20String!%2C%20%24start%3A%20Long!%2C%20%24end%3A%20Long!)%20%7B%0A%20%20genes(chromosome%3A%20%24chromosome%2C%20start%3A%20%24start%2C%20end%3A%20%24end)%20%7B%0A%20%20%20%20id%0A%20%20%20%20symbol%0A%20%20%7D%0A%20%20regionPlot(%0A%20%20%20%20optionalVariantId%3A%20%24optionalVariantId%0A%20%20%20%20optionalGeneId%3A%20%24optionalGeneId%0A%20%20%20%20optionalStudyId%3A%20%24optionalStudyId%0A%20%20)%20%7B%0A%20%20%20%20genes%20%7B%0A%20%20%20%20%20%20id%0A%20%20%20%20%20%20symbol%0A%20%20%20%20%7D%0A%20%20%20%20tagVariants%20%7B%0A%20%20%20%20%20%20id%0A%20%20%20%20%20%20rsId%0A%20%20%20%20%20%20position%0A%20%20%20%20%7D%0A%20%20%20%20indexVariants%20%7B%0A%20%20%20%20%20%20id%0A%20%20%20%20%20%20rsId%0A%20%20%20%20%20%20position%0A%20%20%20%20%7D%0A%20%20%20%20studies%20%7B%0A%20%20%20%20%20%20studyId%0A%20%20%20%20%20%20traitReported%0A%20%20%20%20%20%20pubAuthor%0A%20%20%20%20%20%20pubDate%0A%20%20%20%20%20%20pubJournal%0A%20%20%20%20%20%20pmid%0A%20%20%20%20%20%20hasSumstats%0A%20%20%20%20%7D%0A%20%20%20%20geneTagVariants%20%7B%0A%20%20%20%20%20%20geneId%0A%20%20%20%20%20%20tagVariantId%0A%20%20%20%20%20%20overallScore%0A%20%20%20%20%7D%0A%20%20%20%20tagVariantIndexVariantStudies%20%7B%0A%20%20%20%20%20%20tagVariantId%0A%20%20%20%20%20%20indexVariantId%0A%20%20%20%20%20%20studyId%0A%20%20%20%20%20%20r2%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A&operationName=LocusPageQuery&variables=%7B%0A%20%20%22chromosome%22%3A%20%221%22%2C%0A%20%20%22start%22%3A%20100000000%2C%0A%20%20%22end%22%3A%20102000000%2C%0A%20%20%22optionalVariantId%22%3A%20%221_154453788_C_T%22%0A%7D) also returns no tag and lead data for your region of interest. I have passed the issue onto our Back End team, which will further investigate the problem.  
Apologies for any inconvenience this may cause to you.  
Best wishes,  
Annalisa

---

<div class="post-metadata">

### Author: ![gokcen](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/gokcen/32/451_2.png) [@gokcen](https://community.opentargets.org/u/gokcen)
#### Post date: [13 July 2023 01:42 UTC](https://community.opentargets.org/t/gecko-function-in-graphql-not-working/1103/3 "2023-07-13T01:42:39Z")

</div>

Any updates on this? I am having this issue with the following query:

```auto
query rangeQuery {
  gecko(chromosome: "1", start:154053788, end:154953788) {
    studies {
      studyId
      traitReported
      pubAuthor
      pubDate
      pmid
      hasSumstats
    }
  }
}

```

---

<div class="post-metadata">

### Author: ![gokcen](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/gokcen/32/451_2.png) [@gokcen](https://community.opentargets.org/u/gokcen)
#### Post date: [13 July 2023 02:04 UTC](https://community.opentargets.org/t/gecko-function-in-graphql-not-working/1103/4 "2023-07-13T02:04:05Z")

</div>

Or one can try simply this [link](https://api.genetics.opentargets.org/graphql/browser?query=%7B%0A%20%20gecko(chromosome%3A%20%221%22%2C%20start%3A%2010000000%2C%20end%3A%2011000000)%20%7B%0A%20%20%20%20studies%20%7B%0A%20%20%20%20%20%20studyId%0A%20%20%20%20%20%20traitReported%0A%20%20%20%20%20%20pubJournal%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A).

By the way I didn’t understand why the existing answer says it’s replaced with something else. gecko() is still a valid function in the current GraphQL API right?
