# API call not working

**URL:** <https://forum.thegraph.com/t/api-call-not-working/5457>\
**Category:** Questions & Feedback\
**Created:** [March 7, 2024, 2:20pm UTC](https://forum.thegraph.com/t/api-call-not-working/5457 "2024-03-07T14:20:27Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![unmadesugar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/unmadesugar/32/2413_2.png) [@unmadesugar](https://forum.thegraph.com/u/unmadesugar)\
**Post date:** [March 7, 2024, 2:20pm UTC](https://forum.thegraph.com/t/api-call-not-working/5457/1 "2024-03-07T14:20:27Z")

</div>

hi im creating calls and using [bubble.io](http://bubble.io) there api caller is not reading the subgraph

this is the one im using

> **[exchange-v3-bsc Subgraph](https://thegraph.com/hosted-service/subgraph/pancakeswap/exchange-v3-bsc)**
>
> PancakeSwap is a multi-chain decentralized exchange and automated market maker protocol.

---

<div class="post-metadata">

**Author:** ![itsjerryokolo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/itsjerryokolo/32/117_2.png) [@itsjerryokolo](https://forum.thegraph.com/u/itsjerryokolo)\
**Post date:** [March 7, 2024, 2:59pm UTC](https://forum.thegraph.com/t/api-call-not-working/5457/2 "2024-03-07T14:59:01Z")

</div>

Hi, I can see that the subgraph is at chain head and returning data.  
Can you share the error you are seeing and the query you are making?

---

<div class="post-metadata">

**Author:** ![unmadesugar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/unmadesugar/32/2413_2.png) [@unmadesugar](https://forum.thegraph.com/u/unmadesugar)\
**Post date:** [March 7, 2024, 3:06pm UTC](https://forum.thegraph.com/t/api-call-not-working/5457/3 "2024-03-07T15:06:39Z")

</div>

![Screenshot 2024-03-07 at 15.02.59](https://us1.discourse-cdn.com/flex020/uploads/thegraph1/original/2X/d/d845dc7621704297c836058291d2d4fd8d3a35c8.png)  
so im trying to get calls for a dapp i have taken this api url  
[https://api.thegraph.com/subgraphs/name/pancakeswap/exchange-v3-bsc](https://api.thegraph.com/subgraphs/name/pancakeswap/exchange-v3-bsc)

added it to bubble and tried to initalize the call i get this error when i do  
saying -

There was an issue setting up your call.

The API call returns a non-object and you picked JSON

in bubble i have put the api call url in place am i missing something

---

<div class="post-metadata">

**Author:** ![unmadesugar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/unmadesugar/32/2413_2.png) [@unmadesugar](https://forum.thegraph.com/u/unmadesugar)\
**Post date:** [March 7, 2024, 3:07pm UTC](https://forum.thegraph.com/t/api-call-not-working/5457/4 "2024-03-07T15:07:12Z")

</div>

this is what the call looks like in bubble

 ![Screenshot 2024-03-07 at 15.05.04](https://us1.discourse-cdn.com/flex020/uploads/thegraph1/original/2X/0/0bd7613cc50ee2517560ff8317bc32555d474017.png)

---

<div class="post-metadata">

**Author:** ![itsjerryokolo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/itsjerryokolo/32/117_2.png) [@itsjerryokolo](https://forum.thegraph.com/u/itsjerryokolo)\
**Post date:** [March 7, 2024, 3:25pm UTC](https://forum.thegraph.com/t/api-call-not-working/5457/5 "2024-03-07T15:25:08Z")

</div>

Have you tried reaching out to Bubble for support? It looks like the issue is on their system. Also, one thing I see is you are using GET, are you able to change that to POST?

---

<div class="post-metadata">

**Author:** ![unmadesugar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/unmadesugar/32/2413_2.png) [@unmadesugar](https://forum.thegraph.com/u/unmadesugar)\
**Post date:** [March 7, 2024, 3:31pm UTC](https://forum.thegraph.com/t/api-call-not-working/5457/6 "2024-03-07T15:31:03Z")

</div>

i have changed it to post and i get a text box like below i have added the quiery to that and still get a error

 ![Screenshot 2024-03-07 at 15.30.48](https://us1.discourse-cdn.com/flex020/uploads/thegraph1/original/2X/7/78ac5e6e6c0fcb6bde8a3238790829bee4733517.png)

---

<div class="post-metadata">

**Author:** ![unmadesugar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/unmadesugar/32/2413_2.png) [@unmadesugar](https://forum.thegraph.com/u/unmadesugar)\
**Post date:** [March 7, 2024, 3:32pm UTC](https://forum.thegraph.com/t/api-call-not-working/5457/7 "2024-03-07T15:32:13Z")

</div>

this is what i have added to the box that comes up after i change the call to pot

 ![Screenshot 2024-03-07 at 15.31.31](https://us1.discourse-cdn.com/flex020/uploads/thegraph1/original/2X/9/9bc281b9d0d8a25d908b5bf5ca3cde562623e13a.png)

---

<div class="post-metadata">

**Author:** ![itsjerryokolo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/itsjerryokolo/32/117_2.png) [@itsjerryokolo](https://forum.thegraph.com/u/itsjerryokolo)\
**Post date:** [March 7, 2024, 3:34pm UTC](https://forum.thegraph.com/t/api-call-not-working/5457/8 "2024-03-07T15:34:53Z")

</div>

Okay, let me share this error with our team.

---

<div class="post-metadata">

**Author:** ![itsjerryokolo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/itsjerryokolo/32/117_2.png) [@itsjerryokolo](https://forum.thegraph.com/u/itsjerryokolo)\
**Post date:** [March 7, 2024, 3:50pm UTC](https://forum.thegraph.com/t/api-call-not-working/5457/9 "2024-03-07T15:50:18Z")

</div>

@unmadesugar Have you tried using another client to see if it works?

---

<div class="post-metadata">

**Author:** ![unmadesugar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/unmadesugar/32/2413_2.png) [@unmadesugar](https://forum.thegraph.com/u/unmadesugar)\
**Post date:** [March 7, 2024, 3:51pm UTC](https://forum.thegraph.com/t/api-call-not-working/5457/10 "2024-03-07T15:51:41Z")

</div>

what do you mean by another client

---

<div class="post-metadata">

**Author:** ![itsjerryokolo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/itsjerryokolo/32/117_2.png) [@itsjerryokolo](https://forum.thegraph.com/u/itsjerryokolo)\
**Post date:** [March 7, 2024, 3:56pm UTC](https://forum.thegraph.com/t/api-call-not-working/5457/11 "2024-03-07T15:56:22Z")

</div>

The team shared this for GraphQL over HTTP POST: [https://graphql.org/learn/serving-over-http/#post-request](https://graphql.org/learn/serving-over-http/#post-request)  
The query should look like this

```auto
 {"query": "pools(...){...}"}

```

---

<div class="post-metadata">

**Author:** ![unmadesugar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/unmadesugar/32/2413_2.png) [@unmadesugar](https://forum.thegraph.com/u/unmadesugar)\
**Post date:** [March 7, 2024, 4:07pm UTC](https://forum.thegraph.com/t/api-call-not-working/5457/12 "2024-03-07T16:07:25Z")

</div>

trying to work out how that would be wrote

---

<div class="post-metadata">

**Author:** ![unmadesugar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/unmadesugar/32/2413_2.png) [@unmadesugar](https://forum.thegraph.com/u/unmadesugar)\
**Post date:** [March 7, 2024, 4:11pm UTC](https://forum.thegraph.com/t/api-call-not-working/5457/13 "2024-03-07T16:11:11Z")

</div>

query Pools {  
pools(orderBy: totalValueLockedUSD,  
orderDirection: desc, first: 5) {  
id  
totalValueLockedUSD  
token0Price  
token1Price  
token0 {  
id  
symbol  
name  
decimals  
}  
token1 {  
id  
symbol  
name  
decimals  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![unmadesugar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/unmadesugar/32/2413_2.png) [@unmadesugar](https://forum.thegraph.com/u/unmadesugar)\
**Post date:** [March 7, 2024, 4:11pm UTC](https://forum.thegraph.com/t/api-call-not-working/5457/14 "2024-03-07T16:11:43Z")

</div>

thats how i have it in sub graph

---

<div class="post-metadata">

**Author:** ![unmadesugar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.thegraph.com/unmadesugar/32/2413_2.png) [@unmadesugar](https://forum.thegraph.com/u/unmadesugar)\
**Post date:** [March 7, 2024, 4:55pm UTC](https://forum.thegraph.com/t/api-call-not-working/5457/15 "2024-03-07T16:55:41Z")

</div>

any ideas on how it writes
