# \[Python API feedback\] Cross-reference properties

**URL:** <https://forum.weaviate.io/t/python-api-feedback-cross-reference-properties/353>\
**Category:** General\
**Created:** [July 11, 2023, 11:30am UTC](https://forum.weaviate.io/t/python-api-feedback-cross-reference-properties/353 "2023-07-11T11:30:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jphwang](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jphwang/32/38_2.png) [@jphwang](https://forum.weaviate.io/u/jphwang)\
**Post date:** [July 11, 2023, 11:30am UTC](https://forum.weaviate.io/t/python-api-feedback-cross-reference-properties/353/1 "2023-07-11T11:30:09Z")

</div>

Hi Weaviate community - we are looking for your feedback on some **experimental** changes to the Python API.

One area is how we fetch cross-referenced properties. What do you think about this proposal?

```auto
from weaviate import LinkTo

result = (
    client.query.get("Article", [
        "title", "url", "wordCount",
        LinkTo(link_on="inPublication", linked_class="Publication", properties=["name"])
    ])
)

```

This would replace:

```auto
result = (
    client.query.get("Article", [
        "title", "url", "wordCount", 
        "inPublication {... on Publication {name}}"
    ])
)

```

We would love to get your thoughts on the idea, and the specific syntax. Let us know in the thread!

You can test it out with the latest version of the Python client, and on this server:

```auto
client = weaviate.Client(
    url="https://edu-demo.weaviate.network",
    auth_client_secret=weaviate.AuthApiKey(api_key="learn-weaviate"),
)

```

---

<div class="post-metadata">

**Author:** ![gabriel](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/gabriel/32/250_2.png) [@gabriel](https://forum.weaviate.io/u/gabriel)\
**Post date:** [July 13, 2023, 6:33pm UTC](https://forum.weaviate.io/t/python-api-feedback-cross-reference-properties/353/2 "2023-07-13T18:33:27Z")

</div>

Looks good to me – much more precise and will hopefully get type hints. How would it look if we wanted to fetch the reference but not resolve it?

---

<div class="post-metadata">

**Author:** ![jphwang](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jphwang/32/38_2.png) [@jphwang](https://forum.weaviate.io/u/jphwang)\
**Post date:** [July 17, 2023, 1:03pm UTC](https://forum.weaviate.io/t/python-api-feedback-cross-reference-properties/353/3 "2023-07-17T13:03:48Z")

</div>

> [@gabriel](#):
>
> How would it look if we wanted to fetch the reference but not resolve it?

Hi @gabriel - I’m not sure what you mean by this.

Are you looking for some sort a way of lazily loading the cross-reference data so that you don’t have to fetch the `name` property, for example?

---

<div class="post-metadata">

**Author:** ![gabriel](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/gabriel/32/250_2.png) [@gabriel](https://forum.weaviate.io/u/gabriel)\
**Post date:** [July 17, 2023, 3:10pm UTC](https://forum.weaviate.io/t/python-api-feedback-cross-reference-properties/353/4 "2023-07-17T15:10:03Z")

</div>

Yes that would be it – also if I want to group per reference id on the client side …

ie

Get all the books (which and an Author ref) and then group books by author in my app. I don’t need to resolve the reference to then get \_additional.id the reference beacon would suffice.

---

<div class="post-metadata">

**Author:** ![Dirk](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dirk/32/46_2.png) [@Dirk](https://forum.weaviate.io/u/Dirk)\
**Post date:** [July 17, 2023, 3:17pm UTC](https://forum.weaviate.io/t/python-api-feedback-cross-reference-properties/353/5 "2023-07-17T15:17:02Z")

</div>

Could you give an GQL example on how that would look like?

---

<div class="post-metadata">

**Author:** ![jphwang](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jphwang/32/38_2.png) [@jphwang](https://forum.weaviate.io/u/jphwang)\
**Post date:** [July 17, 2023, 7:24pm UTC](https://forum.weaviate.io/t/python-api-feedback-cross-reference-properties/353/6 "2023-07-17T19:24:50Z")

</div>

Hmm. So @gabriel do you mean like this, using the old syntax?

```auto
result = (
    client.query.get("Article", [
        "title", "url", "wordCount",
        "inPublication {... on Publication {_additional {id} }}"
    ]).with_limit(3).do()
)

```

---

<div class="post-metadata">

**Author:** ![gabriel](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/gabriel/32/250_2.png) [@gabriel](https://forum.weaviate.io/u/gabriel)\
**Post date:** [July 19, 2023, 11:03pm UTC](https://forum.weaviate.io/t/python-api-feedback-cross-reference-properties/353/7 "2023-07-19T23:03:17Z")

</div>

@jphwang yeah that’s it but without having to resolve the underlying object. Can we just get the reference data?
