File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ ### Tranforms: Filtering
2+
3+ ## ECMAScript
4+
5+ The ` ecmascript ` argument is great for writing filters.
6+ See https://stepzen.com/docs/custom-graphql-directives/directives#ecmascript for more information on ` ecmascript ` .
7+ We are picturing a real-life scenario in which you call a backend using the ` endpoint ` argument.
8+ See https://stepzen.com/docs/connecting-backends/how-to-connect-a-rest-service for more information on ` @rest ` .
9+
10+ ### Quick try
11+ ```
12+ stepzen deploy
13+ stepzen request '{customer(name: "John Doe") {id name}}'
14+ ```
15+
16+ ## JSONata
17+
18+ JSONata transforms provdes an alternate method for filtering
19+ customer_1 uses the ` [ ... ] ` filter to return all "customers" (` $ ` ) that
20+ contain ` name = the argument name `
21+
22+ The outer array constructor ` [] ` is used to defeat singleton sequence equivalence.
23+
24+ ### Quick try
25+ ```
26+ stepzen deploy
27+ stepzen request '{customer_1(name: "John Doe") {id name}}'
28+ ```
You can’t perform that action at this time.
0 commit comments