All Implemented Interfaces:
AsyncClientResult<GraphQLResponse>

  • Constructor Details

    • Get

      public Get(org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient client, Config config, AccessTokenProvider tokenProvider)
  • Method Details

    • withClassName

      public Get withClassName(String className)
    • withFields

      public Get withFields(Field... fields)
    • withWhere

      @Deprecated public Get withWhere(WhereFilter where)
      Deprecated.
    • withWhere

      public Get withWhere(WhereArgument where)
    • withLimit

      public Get withLimit(Integer limit)
    • withOffset

      public Get withOffset(Integer offset)
    • withAfter

      public Get withAfter(String after)
    • withBm25

      public Get withBm25(Bm25Argument bm25)
    • withHybrid

      public Get withHybrid(HybridArgument hybrid)
    • withAsk

      public Get withAsk(AskArgument ask)
    • withNearText

      public Get withNearText(NearTextArgument nearText)
    • withNearObject

      public Get withNearObject(NearObjectArgument nearObject)
    • withNearVector

      public Get withNearVector(NearVectorArgument nearVector)
    • withNearImage

      public Get withNearImage(NearImageArgument nearImage)
    • withNearAudio

      public Get withNearAudio(NearAudioArgument nearAudio)
    • withNearVideo

      public Get withNearVideo(NearVideoArgument nearVideo)
    • withNearDepth

      public Get withNearDepth(NearDepthArgument nearDepth)
    • withNearThermal

      public Get withNearThermal(NearThermalArgument nearThermal)
    • withNearImu

      public Get withNearImu(NearImuArgument nearImu)
    • withGroup

      public Get withGroup(GroupArgument group)
    • withSort

      public Get withSort(SortArgument... sort)
    • withGenerativeSearch

      public Get withGenerativeSearch(GenerativeSearchBuilder generativeSearch)
    • withConsistencyLevel

      public Get withConsistencyLevel(String level)
    • withGroupBy

      public Get withGroupBy(GroupByArgument groupBy)
    • withTenant

      public Get withTenant(String tenant)
    • withAutocut

      public Get withAutocut(Integer autocut)
    • run

      public Future<Result<GraphQLResponse>> run(org.apache.hc.core5.concurrent.FutureCallback<Result<GraphQLResponse>> callback)
      Specified by:
      run in interface AsyncClientResult<GraphQLResponse>
    • run

      public <C> Future<Result<GraphQLTypedResponse<C>>> run(Class<C> classOfC)
      This method provides a better way of serializing a GraphQL response using one's defined classes. Example: In Weaviate we have defined collection named Soup with name and price properties. For client to be able to properly serialize GraphQL response to an Object with convenient methods accessing GraphQL settings one can create a class, example:
      
       import com.google.gson.annotations.SerializedName;
      
       public class Soups {
         {@literal @}SerializedName(value = "Soup")
         List<Soup> soups;
      
         public List<Soup> getSoups() {
           return soups;
         }
      
         public static class Soup extends GraphQLGetBaseObject {
           String name;
           Float price;
      
           public String getName() {
             return name;
           }
      
           public Float getPrice() {
             return price;
           }
         }
       }
       
      Type Parameters:
      C - - Class of C
      Parameters:
      classOfC - - class describing Weaviate object, example: Soups class
      Returns:
      Result of GraphQLTypedResponse of a given class
      See Also:
    • run

      public <C> Future<Result<GraphQLTypedResponse<C>>> run(Class<C> classOfC, org.apache.hc.core5.concurrent.FutureCallback<Result<GraphQLTypedResponse<C>>> callback)
      This method provides a better way of serializing a GraphQL response using one's defined classes. Example: In Weaviate we have defined collection named Soup with name and price properties. For client to be able to properly serialize GraphQL response to an Object with convenient methods accessing GraphQL settings one can create a class, example:
      
       import com.google.gson.annotations.SerializedName;
      
       public class Soups {
         {@literal @}SerializedName(value = "Soup")
         List<Soup> soups;
      
         public List<Soup> getSoups() {
           return soups;
         }
      
         public static class Soup extends GraphQLGetBaseObject {
           String name;
           Float price;
      
           public String getName() {
             return name;
           }
      
           public Float getPrice() {
             return price;
           }
         }
       }
       
      Type Parameters:
      C - - Class of C
      Parameters:
      classOfC - - class describing Weaviate object, example: Soups class
      callback - - Result of GraphQLTypedResponse of a given class callback
      Returns:
      Result of GraphQLTypedResponse of a given class
      See Also: