Inability to do simple GraphQL query filtering on node / edges like other GraphQl BaaS'es offer?

Sure you can!..

There are currently two ways to do this and the latter will be more effective.

  1. Use @cascade if there are other fields that may be empty. Cascade removes any top level nodes post query pre response that have null fields.

  2. Flip the query. This is the better way to do it as it is the graph way. You know a edge that you want to filter by, then use that as the root. This does evolve the app development as the response may then not be modeled exactly as you might expect normally.

{
  getNodeY(id: "456") {
    nodey {
      id
      name
    }
  }
}

But, yes it would be really nice if we could filter by the edges without needing to flip the query.

1 Like