Java client_ Retrieving id of a object using filters. How to handle _additional parameters in java

Im working in a project which I need to update the already saved object in the db. I can get the object using a filter but how to get the id also in the response

Hi @Ashmi_Fernando

You can get the ID in the response as shown here in Java:

Please see the code example relating to:

    Field _additional = Field.builder()
      .name("_additional")
      .fields(new Field[]{
        Field.builder().name("id").build(),
        Field.builder().name("distance").build()
      }).build();

    ...

    Result<GraphQLResponse> result = client.graphQL().get()
      .withClassName("Article")
      .withFields(title, _additional)
      .withNearText(explore)
      .run();