# Trouble getting Supabase query to work

**URL:** https://community.thunkable.com/t/trouble-getting-supabase-query-to-work/2784610
**Category:** Questions about Thunkable X
**Created:** [January 16, 2024, 1:11am UTC](https://community.thunkable.com/t/trouble-getting-supabase-query-to-work/2784610 "2024-01-16T01:11:09Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![steve\_synopsis](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@steve\_synopsis](https://community.thunkable.com/u/steve_synopsis)
#### Post date: [January 16, 2024, 1:11am UTC](https://community.thunkable.com/t/trouble-getting-supabase-query-to-work/2784610/1 "2024-01-16T01:11:09Z")

</div>

I am running an API Endpoint query with a filter on my Supabase table in Postman and it generates the correct result but when I run it through the API URL/Headers in Thunkable, the filter does not work

 ![2024-01-15 21-06-11](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/3/7317e6089b47f649daae3dc43d00adb61eb615fe.png)

 ![2024-01-15 21-09-51](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/b/3b16a0103f8440bf398965f139a6ad4b9842eb7c.png)

![2024-01-15 21-10-22](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/f/ffbd83d5df0c8a78112aeea58c927b0771f5e884.png)

What am I missing?

Thanks  
Steve

---

<div class="post-metadata">

### Author: ![samclever](https://avatars.discourse-cdn.com/v4/letter/s/ec9cab/32.png) [@samclever](https://community.thunkable.com/u/samclever)
#### Post date: [January 16, 2024, 3:37am UTC](https://community.thunkable.com/t/trouble-getting-supabase-query-to-work/2784610/2 "2024-01-16T03:37:56Z")

</div>

It must be how the data is stored. Are you trying to get a list of all the retailers? If so you need to parse the object data even further.

---

<div class="post-metadata">

### Author: ![steve\_synopsis](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@steve\_synopsis](https://community.thunkable.com/u/steve_synopsis)
#### Post date: [January 16, 2024, 11:31am UTC](https://community.thunkable.com/t/trouble-getting-supabase-query-to-work/2784610/3 "2024-01-16T11:31:08Z")

</div>

I just want data for retailerID = 1. I can do this via the URL in Postman, so I am assuming that it should work the same if I create the URL in Thunkable and call the API via the URL block.

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [January 16, 2024, 1:24pm UTC](https://community.thunkable.com/t/trouble-getting-supabase-query-to-work/2784610/4 "2024-01-16T13:24:57Z")

</div>

> [@samclever](#):
>
> It must be how the data is stored.

Not an issue here. @steve_synopsis You need to get object from Json. Not Json from object.

You need to convert the Json string being passed back into an object before trying to access the properties held within.

[see this example app that i’ve built](https://x.thunkable.com/projectPage/652308d92ecc34478bef887d)

or see these blocks

 ![Screenshot 2024-01-16 at 8.28.17 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/9/e974dede979a9d615560f3e13cc68fd41d259d58.jpeg)

---

<div class="post-metadata">

### Author: ![steve\_synopsis](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@steve\_synopsis](https://community.thunkable.com/u/steve_synopsis)
#### Post date: [January 16, 2024, 2:51pm UTC](https://community.thunkable.com/t/trouble-getting-supabase-query-to-work/2784610/5 "2024-01-16T14:51:20Z")

</div>

My issue is the filtering - if I view the response it shows all of the records.

 ![2024-01-15 21-09-51](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/b/3b16a0103f8440bf398965f139a6ad4b9842eb7c.png)

![2024-01-15 21-10-22](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/f/ffbd83d5df0c8a78112aeea58c927b0771f5e884.png)

The retailerID.eq.1 should filter the table to only respond with retailer ID 1 which is what happens in postman or if I run it directly in a browser.

 ![2024-01-16 10 24 05](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/a/8aa59aaaafea61e914e48633f67d4cf1cb21d45b.png)

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [January 16, 2024, 4:40pm UTC](https://community.thunkable.com/t/trouble-getting-supabase-query-to-work/2784610/6 "2024-01-16T16:40:12Z")

</div>

That’s because filters go in the url. Not the header

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)
#### Post date: [April 15, 2024, 4:41pm UTC](https://community.thunkable.com/t/trouble-getting-supabase-query-to-work/2784610/7 "2024-04-15T16:41:10Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
