Skip to content

Commit f5e2287

Browse files
committed
update docs and demo schema
1 parent a0d4e08 commit f5e2287

File tree

2 files changed

+80
-150
lines changed

2 files changed

+80
-150
lines changed

docs/api.md

Lines changed: 41 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -583,15 +583,10 @@ Where the `<Table>Filter` type enumerates filterable fields and their associated
583583
Boolean expression comparing fields on type "StringList"
584584
"""
585585
input StringListFilter {
586-
cd: [String!]
587-
cs: [String!]
586+
contains: [String!]
587+
containedBy: [String!]
588588
eq: [String!]
589-
gt: [String!]
590-
gte: [String!]
591-
lt: [String!]
592-
lte: [String!]
593-
neq: [String!]
594-
ov: [String!]
589+
overlaps: [String!]
595590
}
596591
```
597592

@@ -607,24 +602,24 @@ Where the `<Table>Filter` type enumerates filterable fields and their associated
607602
The following list shows the operators that may be available on `<Type>Filter` types.
608603

609604

610-
| Operator | Description |
611-
|------------|-------------------------------------------------------------------|
612-
| eq | Equal To |
613-
| neq | Not Equal To |
614-
| gt | Greater Than |
615-
| gte | Greater Than Or Equal To |
616-
| in | Contained by Value List |
617-
| lt | Less Than |
618-
| lte | Less Than Or Equal To |
619-
| is | Null or Not Null |
620-
| startsWith | Starts with prefix |
621-
| like | Pattern Match. '%' as wildcard |
622-
| ilike | Pattern Match. '%' as wildcard. Case Insensitive |
623-
| regex | POSIX Regular Expression Match |
624-
| iregex | POSIX Regular Expression Match. Case Insensitive |
625-
| cs | Contains. Applies to array columns only. |
626-
| cd | Contained in. Applies to array columns only. |
627-
| ov | Overlap (have points in common). Applies to array columns only. |
605+
| Operator | Description |
606+
|-------------|-------------------------------------------------------------------|
607+
| eq | Equal To |
608+
| neq | Not Equal To |
609+
| gt | Greater Than |
610+
| gte | Greater Than Or Equal To |
611+
| in | Contained by Value List |
612+
| lt | Less Than |
613+
| lte | Less Than Or Equal To |
614+
| is | Null or Not Null |
615+
| startsWith | Starts with prefix |
616+
| like | Pattern Match. '%' as wildcard |
617+
| ilike | Pattern Match. '%' as wildcard. Case Insensitive |
618+
| regex | POSIX Regular Expression Match |
619+
| iregex | POSIX Regular Expression Match. Case Insensitive |
620+
| contains | Contains. Applies to array columns only. |
621+
| containedBy | Contained in. Applies to array columns only. |
622+
| overlaps | Overlap (have points in common). Applies to array columns only. |
628623

629624
Not all operators are available on every `<Type>Filter` type. For example, `UUIDFilter` only supports `eq` and `neq` because `UUID`s are not ordered.
630625

@@ -675,13 +670,13 @@ Not all operators are available on every `<Type>Filter` type. For example, `UUID
675670

676671
**Example: array column**
677672

678-
The `cs` filter is used to return results where all the elements in the input array appear in the array column.
673+
The `contains` filter is used to return results where all the elements in the input array appear in the array column.
679674

680-
=== "`cs` Filter Query"
675+
=== "`contains` Filter Query"
681676
```graphql
682677
{
683678
blogCollection(
684-
filter: {tags: {cs: ["tech", "innovation"]}},
679+
filter: {tags: {contains: ["tech", "innovation"]}},
685680
) {
686681
edges {
687682
cursor
@@ -696,7 +691,7 @@ The `cs` filter is used to return results where all the elements in the input ar
696691
}
697692
```
698693

699-
=== "`cs` Filter Result"
694+
=== "`contains` Filter Result"
700695
```json
701696
{
702697
"data": {
@@ -726,13 +721,13 @@ The `cs` filter is used to return results where all the elements in the input ar
726721
}
727722
```
728723

729-
The `cs` filter can also accept a single scalar.
724+
The `contains` filter can also accept a single scalar.
730725

731-
=== "`cs` Filter with Scalar Query"
726+
=== "`contains` Filter with Scalar Query"
732727
```graphql
733728
{
734729
blogCollection(
735-
filter: {tags: {cs: "tech"}},
730+
filter: {tags: {contains: "tech"}},
736731
) {
737732
edges {
738733
cursor
@@ -747,7 +742,7 @@ The `cs` filter can also accept a single scalar.
747742
}
748743
```
749744

750-
=== "`cs` Filter with Scalar Result"
745+
=== "`contains` Filter with Scalar Result"
751746
```json
752747
{
753748
"data": {
@@ -777,13 +772,13 @@ The `cs` filter can also accept a single scalar.
777772
}
778773
```
779774

780-
The `cd` filter is used to return results where every element of the array column appears in the input array.
775+
The `containedBy` filter is used to return results where every element of the array column appears in the input array.
781776

782-
=== "`cd` Filter Query"
777+
=== "`containedBy` Filter Query"
783778
```graphql
784779
{
785780
blogCollection(
786-
filter: {tags: {cd: ["entrepreneurship", "innovation", "tech"]}},
781+
filter: {tags: {containedBy: ["entrepreneurship", "innovation", "tech"]}},
787782
) {
788783
edges {
789784
cursor
@@ -798,7 +793,7 @@ The `cd` filter is used to return results where every element of the array colum
798793
}
799794
```
800795

801-
=== "`cd` Filter Result"
796+
=== "`containedBy` Filter Result"
802797
```json
803798
{
804799
"data": {
@@ -828,13 +823,13 @@ The `cd` filter is used to return results where every element of the array colum
828823
}
829824
```
830825

831-
The `cd` filter can also accept a single scalar. In this case, only results where the only element in the array column is the input scalar are returned.
826+
The `containedBy` filter can also accept a single scalar. In this case, only results where the only element in the array column is the input scalar are returned.
832827

833-
=== "`cd` Filter with Scalar Query"
828+
=== "`containedBy` Filter with Scalar Query"
834829
```graphql
835830
{
836831
blogCollection(
837-
filter: {tags: {cd: "travel"}},
832+
filter: {tags: {containedBy: "travel"}},
838833
) {
839834
edges {
840835
cursor
@@ -849,7 +844,7 @@ The `cd` filter can also accept a single scalar. In this case, only results wher
849844
}
850845
```
851846

852-
=== "`cd` Filter with Scalar Result"
847+
=== "`containedBy` Filter with Scalar Result"
853848
```json
854849
{
855850
"data": {
@@ -870,13 +865,13 @@ The `cd` filter can also accept a single scalar. In this case, only results wher
870865
}
871866
```
872867

873-
The `ov` filter is used to return results where the array column and the input array have at least one element in common.
868+
The `overlaps` filter is used to return results where the array column and the input array have at least one element in common.
874869

875-
=== "`ov` Filter Query"
870+
=== "`overlaps` Filter Query"
876871
```graphql
877872
{
878873
blogCollection(
879-
filter: {tags: {ov: ["tech", "travel"]}},
874+
filter: {tags: {overlaps: ["tech", "travel"]}},
880875
) {
881876
edges {
882877
cursor
@@ -891,7 +886,7 @@ The `ov` filter is used to return results where the array column and the input a
891886
}
892887
```
893888

894-
=== "`ov` Filter Result"
889+
=== "`overlaps` Filter Result"
895890
```json
896891
{
897892
"data": {

0 commit comments

Comments
 (0)