Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
based on the filtering functionality introduced in #209, this PR adds new filtering capabilities for nested objects. reminder: the filtering functionality currently present was designed after [dgraphs filtering proposal](https://dgraph.io/docs/graphql/queries/search-filtering/), so basically via an argument called `filter`, e.g. * filter based on an attributes value `filter: { name: "some name" }` * filter on list membership `filter: { names: { in: {'name one", "name two" } } }` this `filter` argument was applicable only to top level fields of a GQL type, but now it can be applied to filter on nested objects by nesting `filter`s this example query will return information for clusters of a specific organization. the `filter` argument is nested under the `ocm` property, which describes the organization of a cluster. ```gql { clusters: cluster_v1(filter: { ocm: { filter: { orgId: "some org id" } } }) { name } } ``` Signed-off-by: Gerd Oberlechner <[email protected]> * typo Signed-off-by: Gerd Oberlechner <[email protected]> * use Array.isArray Signed-off-by: Gerd Oberlechner <[email protected]> * extractListOfValues remove duplicate logic Signed-off-by: Gerd Oberlechner <[email protected]> * remove obsolete args parameter of resolveValue Signed-off-by: Gerd Oberlechner <[email protected]> * check for unknown fields Signed-off-by: Gerd Oberlechner <[email protected]> * remove list eq Signed-off-by: Gerd Oberlechner <[email protected]> * remove duplicate logic Signed-off-by: Gerd Oberlechner <[email protected]> * cleanup Signed-off-by: Gerd Oberlechner <[email protected]> * readme Signed-off-by: Gerd Oberlechner <[email protected]> * change Signed-off-by: Gerd Oberlechner <[email protected]> --------- Signed-off-by: Gerd Oberlechner <[email protected]>
- Loading branch information