File tree Expand file tree Collapse file tree
graphile/graphile-postgis Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,23 +81,50 @@ COMMENT ON COLUMN <owner_table>.<owner_col> IS
8181
8282### Filter shapes
8383
84- 2-arg operators use the familiar ` some ` / ` every ` / ` none ` shape:
84+ 2-arg operators use the familiar ` some ` / ` every ` / ` none ` shape.
85+
86+ Through the generated ORM (` where: ` ):
87+
88+ ``` ts
89+ await orm .telemedicineClinic
90+ .findMany ({
91+ select: { id: true , name: true },
92+ where: { county: { some: { name: { equalTo: ' California County' } } } },
93+ })
94+ .execute ();
95+ ```
96+
97+ Or equivalently at the GraphQL layer (` filter: ` ):
8598
8699``` graphql
87100telemedicineClinics (
88- filter : { county : { some : { name : { eq : "California County" } } } }
101+ filter : { county : { some : { name : { equalTo : "California County" } } } }
89102) { nodes { id name } }
90103```
91104
92105` st_dwithin ` takes its distance at the relation level (it parametrises
93106the join, not the joined row):
94107
108+ ``` ts
109+ await orm .telemedicineClinic
110+ .findMany ({
111+ select: { id: true , name: true },
112+ where: {
113+ nearbyClinic: {
114+ distance: 5000 ,
115+ some: { specialty: { equalTo: ' pediatrics' } },
116+ },
117+ },
118+ })
119+ .execute ();
120+ ```
121+
95122``` graphql
96123telemedicineClinics (
97124 filter : {
98125 nearbyClinic : {
99126 distance : 5000
100- some : { specialty : { eq : "pediatrics" } }
127+ some : { specialty : { equalTo : "pediatrics" } }
101128 }
102129 }
103130) { nodes { id name } }
You can’t perform that action at this time.
0 commit comments