Filter on sub-fields in graphql-js

560 views Asked by At

I'm using graph-ql-js on a node server. I've written the following query and am trying to filter on a subfield, but haven't been able to find documentation to do this successfully. I'm wondering if it's possible to filter on a sub-field using graph-ql-js or if I'll need to use an ORM or external library?

I'm using the following documentation but don't see syntax to sort sub-fields. I've only been able to find options to filter on query args:

https://www.howtographql.com/graphql-js/8-filtering-pagination-and-sorting/

Thanks in advance!

Here is my code:

            scope(name: "${custName}") {
                    ... on Customer{
                        field_a,
                        field_b,
                        field_c
                        scope {
                            ... on Member {
                                field_a,
                                field_b, 
 *** line in question *** >     field_c(filter: in_scope{name: ${custName}}){
                                    field_a, 
                                    field_b,
                                }
                        }



 
0

There are 0 answers