I can't see the vectors when getting my objects

Hello. I’m using Weaviate cloud.

When trying to get my stored objects using the Go client. The response has no vectors in it.

get := client.GraphQL().Get().
	WithClassName("SourceCollection").
	WithLimit(1).
	WithFields(graphql.Field{Name: "_additional", Fields: []graphql.Field{
		{Name: "vector"},
	}})
x, err := get.Do(context.Background())
if err != nil {
	fmt.Println(err)
}
fmt.Println(x.Data["Get"])

The response I get is

map[SourceCollection:[map[_additional:map[vector:[]]]]]

The same is true when using cURL.

curl https://REDACTED.c0.asia-southeast1.gcp.weaviate.cloud/v1/graphql -X POST -H 'Authorization: Bearer REDACTED' -H 'Content-type: application/json' -d  '{"query": "{Get {SourceCollection (limit: 1) {_additional{vector}}}}"}'

I get

{"data":{"Get":{"SourceCollection":[{"_additional":{"vector":[]}}]}}}

As you can see, no vectors. However, when not using GraphQL,

curl 'https://READACTED.c0.asia-southeast1.gcp.weaviate.cloud/v1/objects?include=vector&limit=1' \
  --header 'Authorization: Bearer REDACTED'

This response includes the vectors just fine. The Python client works fine too.

Is this a bug with the GraphQL implementation?

Hi! Welcome to our community :hugs:

Can you share the version you are using?

Also, can you try this?

{
  Get {
    SourceCollection {
      _additional {
        vector
      }
    }
  }
}

This has worked for me:

I have generated the content with this python code:

col = client.collections.create("Test")
col.data.insert({"text": "hello"}, vector=[1, 2, 3])

Let me know if this helps!

THanks!