@@ -151,6 +151,58 @@ describe("the graphql journey", () => {
151151 . catch ( ( e ) => fail ( "it should not have error'd" + e ) ) ;
152152 } ) ;
153153
154+ test ( "graphql get bm25 with query (without properties)" , ( ) => {
155+ return client . graphql
156+ . get ( )
157+ . withClassName ( "Article" )
158+ . withBm25 ( { query : "Article" , } )
159+ . withFields ( "_additional { id }" )
160+ . do ( )
161+ . then ( ( res ) => {
162+ expect ( res . data . Get . Article . length ) . toBe ( 3 ) ;
163+ } )
164+ . catch ( ( e ) => fail ( "it should not have error'd" + e ) ) ;
165+ } ) ;
166+
167+ test ( "graphql get bm25 with query (with properties)" , ( ) => {
168+ return client . graphql
169+ . get ( )
170+ . withClassName ( "Article" )
171+ . withBm25 ( { query : "Article" , properties : [ "title" , "url" ] } )
172+ . withFields ( "_additional { id }" )
173+ . do ( )
174+ . then ( ( res ) => {
175+ expect ( res . data . Get . Article . length ) . toBe ( 3 ) ;
176+ } )
177+ . catch ( ( e ) => fail ( "it should not have error'd" + e ) ) ;
178+ } ) ;
179+
180+ test ( "graphql get hybrid with query (no vector)" , ( ) => {
181+ return client . graphql
182+ . get ( )
183+ . withClassName ( "Article" )
184+ . withHybrid ( { query : "Apple" , alpha : 3 } )
185+ . withFields ( "_additional { id }" )
186+ . do ( )
187+ . then ( ( res ) => {
188+ expect ( res . data . Get . Article . length ) . toBe ( 3 ) ;
189+ } )
190+ . catch ( ( e ) => fail ( "it should not have error'd" + e ) ) ;
191+ } ) ;
192+
193+ test ( "graphql get hybrid with query (with vector)" , ( ) => {
194+ return client . graphql
195+ . get ( )
196+ . withClassName ( "Article" )
197+ . withHybrid ( { query : "Apple" , alpha : 0.3 , vector : [ 0.1 , 0.2 , 0.3 ] } )
198+ . withFields ( "_additional { id }" )
199+ . do ( )
200+ . then ( ( res ) => {
201+ expect ( res . data . Get . Article . length ) . toBe ( 3 ) ;
202+ } )
203+ . catch ( ( e ) => fail ( "it should not have error'd" + e ) ) ;
204+ } ) ;
205+
154206 test ( "graphql get with nearText (with certainty)" , ( ) => {
155207 return client . graphql
156208 . get ( )
0 commit comments