# \[Question\] Convert GraphQL query to Filter object

**URL:** https://forum.weaviate.io/t/question-convert-graphql-query-to-filter-object/9826
**Category:** Support
**Created:** [January 20, 2025, 8:34pm UTC](https://forum.weaviate.io/t/question-convert-graphql-query-to-filter-object/9826 "2025-01-20T20:34:07Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Axel\_Straminsky](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/axel_straminsky/32/3112_2.png) [@Axel\_Straminsky](https://forum.weaviate.io/u/Axel_Straminsky)
#### Post date: [January 20, 2025, 8:34pm UTC](https://forum.weaviate.io/t/question-convert-graphql-query-to-filter-object/9826/1 "2025-01-20T20:34:07Z")

</div>

Hi, I’m using the Python v4 client, and I have a graphql filter (an example could be something like “{‘where\_filter’: {‘path’: [‘KM’], ‘operator’: ‘LessThan’, ‘valueInt’: 200000}}”). I wanted to know if there is a way to automatically convert this filter into a “Filter” object, i.e., a method that takes the graphql query and returns something like “Filter.by\_property(“KM”).less\_than(200000)”

---

<div class="post-metadata">

### Author: ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)
#### Post date: [January 24, 2025, 8:33pm UTC](https://forum.weaviate.io/t/question-convert-graphql-query-to-filter-object/9826/2 "2025-01-24T20:33:41Z")

</div>

hi @Axel_Straminsky !!

Welcome to our community 🤗

I believe some user have written some parser to generate weaviate python \_Filters (I believe it was shared on slack as I did not find it here.)

note that you can still do graphql calls using python v4:

```python
client.graphql_raw_query()

```

I understand that there were some implementations generating graphql filters, but unfortunately we doesn’t have some code to convert those 😬

Let me know if this helps!
