Skip to content

feat(): Add DynamoDB filter expression support#35

Open
jaiswalsk wants to merge 4 commits into
intuit:masterfrom
jaiswalsk:feature/dynamodb-support
Open

feat(): Add DynamoDB filter expression support#35
jaiswalsk wants to merge 4 commits into
intuit:masterfrom
jaiswalsk:feature/dynamodb-support

Conversation

@jaiswalsk
Copy link
Copy Markdown
Contributor

Adds DynamoDBExpressionVisitor that translates GraphQL filter ASTs into DynamoDB FilterExpression strings with a corresponding ExpressionAttributeValues map. Registers DYNAMODB in ExpressionFormat and ExpressionVisitorFactory.

Operator mappings:

  • CONTAINS → contains(field, :field)
  • STARTS → begins_with(field, :field)
  • EQ/EQUALS → field = :field
  • GT/GTE → field > / >= :min_field
  • LT/LTE → field < / <= :max_field
  • IN → field IN (:field_0, :field_1, ...)
  • BETWEEN → field BETWEEN :min_field AND :max_field
  • NOT → ( NOT (...))
  • AND/OR → compound with parentheses for precedence

1. Issue Link:

2. Brief explanation of a change:

3. Will it break existing clients and code in production?

jaiswalsk and others added 4 commits May 13, 2026 13:04
Adds DynamoDBExpressionVisitor that translates GraphQL filter ASTs into
DynamoDB FilterExpression strings with a corresponding ExpressionAttributeValues
map. Registers DYNAMODB in ExpressionFormat and ExpressionVisitorFactory.

Operator mappings:
- CONTAINS → contains(field, :field)
- STARTS   → begins_with(field, :field)
- EQ/EQUALS → field = :field
- GT/GTE   → field > / >= :min_field
- LT/LTE   → field < / <= :max_field
- IN       → field IN (:field_0, :field_1, ...)
- BETWEEN  → field BETWEEN :min_field AND :max_field
- NOT      → ( NOT (...))
- AND/OR   → compound with parentheses for precedence

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds AFTER, BEFORE, ON_OR_AFTER, ON_OR_BEFORE, ON date operators to
Operator.java, mirroring the internal graphql-query-filters implementation.
Updates DynamoDBExpressionVisitor to map these to the correct DynamoDB
comparison operators and :min_/:max_ parameter naming convention.

Also extends the test schema's DateExpression and adds 5 date operator
test cases to DynamoDBExpressionTest.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add DynamoDB FilterExpression to Supported Formats and Databases sections
- Add DynamoDB usage section with code example and operator mapping table
- Update Schema section to include DateExpression and full StringExpression/IntExpression operators

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant