@@ -559,6 +559,37 @@ public void queryAuthorBooksByAlliasesWithInlineWhereSearch() {
559
559
assertThat (result .toString ()).isEqualTo (expected );
560
560
}
561
561
562
+ @ Test
563
+ public void queryAuthorBooksWithNotNullFalseId () {
564
+ //given
565
+ String query = "query { "
566
+ + "Authors(" +
567
+ " where: {" +
568
+ " books: {" +
569
+ " id: {NOT_NULL: false}" +
570
+ " }" +
571
+ " }" +
572
+ " ) {" +
573
+ " select {" +
574
+ " id" +
575
+ " name" +
576
+ " books {" +
577
+ " id" +
578
+ " title" +
579
+ " genre" +
580
+ " }" +
581
+ " }" +
582
+ " }"
583
+ + "}" ;
584
+
585
+ String expected = "{Authors={select=[{id=8, name=Igor Dianov, books=[]}]}}" ;
586
+
587
+ //when
588
+ Object result = executor .execute (query ).getData ();
589
+
590
+ // then
591
+ assertThat (result .toString ()).isEqualTo (expected );
592
+ }
562
593
@ Test
563
594
public void queryAuthorBooksWithIsNullId () {
564
595
//given
@@ -591,6 +622,109 @@ public void queryAuthorBooksWithIsNullId() {
591
622
assertThat (result .toString ()).isEqualTo (expected );
592
623
}
593
624
625
+ @ Test
626
+ public void queryAuthorBooksWithEQNullId () {
627
+ //given
628
+ String query = "query { "
629
+ + "Authors(" +
630
+ " where: {" +
631
+ " books: {" +
632
+ " id: {EQ: null}" +
633
+ " }" +
634
+ " }" +
635
+ " ) {" +
636
+ " select {" +
637
+ " id" +
638
+ " name" +
639
+ " books {" +
640
+ " id" +
641
+ " title" +
642
+ " genre" +
643
+ " }" +
644
+ " }" +
645
+ " }"
646
+ + "}" ;
647
+
648
+ String expected = "{Authors={select=[{id=8, name=Igor Dianov, books=[]}]}}" ;
649
+
650
+ //when
651
+ Object result = executor .execute (query ).getData ();
652
+
653
+ // then
654
+ assertThat (result .toString ()).isEqualTo (expected );
655
+ }
656
+
657
+ @ Test
658
+ public void queryAuthorBooksWithNENullId () {
659
+ //given
660
+ String query = "query { "
661
+ + "Authors(" +
662
+ " where: {" +
663
+ " books: {" +
664
+ " id: {NE: null}" +
665
+ " }" +
666
+ " }" +
667
+ " ) {" +
668
+ " select {" +
669
+ " id" +
670
+ " name" +
671
+ " books {" +
672
+ " id" +
673
+ " title" +
674
+ " genre" +
675
+ " }" +
676
+ " }" +
677
+ " }"
678
+ + "}" ;
679
+
680
+ String expected = "{Authors={select=[" +
681
+ "{id=1, name=Leo Tolstoy, books=[{id=2, title=War and Peace, genre=NOVEL}, {id=3, title=Anna Karenina, genre=NOVEL}]}, " +
682
+ "{id=4, name=Anton Chekhov, books=[{id=5, title=The Cherry Orchard, genre=PLAY}, {id=6, title=The Seagull, genre=PLAY}, {id=7, title=Three Sisters, genre=PLAY}]}" +
683
+ "]}}" ;
684
+
685
+ //when
686
+ Object result = executor .execute (query ).getData ();
687
+
688
+ // then
689
+ assertThat (result .toString ()).isEqualTo (expected );
690
+ }
691
+
692
+
693
+ @ Test
694
+ public void queryAuthorBooksWithNOT_NULLId () {
695
+ //given
696
+ String query = "query { "
697
+ + "Authors(" +
698
+ " where: {" +
699
+ " books: {" +
700
+ " id: {NOT_NULL: true}" +
701
+ " }" +
702
+ " }" +
703
+ " ) {" +
704
+ " select {" +
705
+ " id" +
706
+ " name" +
707
+ " books {" +
708
+ " id" +
709
+ " title" +
710
+ " genre" +
711
+ " }" +
712
+ " }" +
713
+ " }"
714
+ + "}" ;
715
+
716
+ String expected = "{Authors={select=[" +
717
+ "{id=1, name=Leo Tolstoy, books=[{id=2, title=War and Peace, genre=NOVEL}, {id=3, title=Anna Karenina, genre=NOVEL}]}, " +
718
+ "{id=4, name=Anton Chekhov, books=[{id=5, title=The Cherry Orchard, genre=PLAY}, {id=6, title=The Seagull, genre=PLAY}, {id=7, title=Three Sisters, genre=PLAY}]}" +
719
+ "]}}" ;
720
+
721
+ //when
722
+ Object result = executor .execute (query ).getData ();
723
+
724
+ // then
725
+ assertThat (result .toString ()).isEqualTo (expected );
726
+ }
727
+
594
728
@ Test
595
729
public void queryBooksAuthorWithExplictOptionalTrue () {
596
730
//given
0 commit comments