Combining AND / OR filters with SELECT function in @aws-appsync/utils/rds (createPgStatement)

0

I'm trying to use the new Aurora resolver tools in Appsync, but it seems that the select utility function is incomplete.

It appears that there is not a supported operator for IN LIST, so my backup attempt was to use several "eq" filters in an "or" list. The problem is that when combining "or" filters with other unrelated filters, the helper function does not separate the "or" items with parenthesis.

For example:

"filter": {
        "vendor": {"eq": "No Vendor"},
        "or": [{"txnNumber": {"eq": 162228}},
                 {"txnNumber": {"eq": 162460}}]
          },

Creates the following query:

WHERE \"vendor\" = :P0 AND (\"txnNumber\" = :P1) OR (\"txnNumber\" = :P2) LIMIT :P3 OFFSET :P4"

I know I can create my SQL statement in a more manual fashion, but I'd rather not recreate logic for the simpler filter values. Is there a hybrid approach that would allow me to use the helper function for the simpler FilterTypes, but allow me to implement an IN LIST type?

Is there a road map for adding IN LIST and improving the "OR" behavior?

No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions