Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(DataStore): Support all Temporal types in predicates #513

Merged
merged 1 commit into from
Jun 3, 2020

Conversation

palpatim
Copy link
Member

@palpatim palpatim commented Jun 3, 2020

Amplify GraphQL Predicates should support all Temporal types, but only Date was previously supported. This change also reformats the graphQLValue to use a more Swifty switch statement instead of multiple if/thens.

Note: The assertions in the new unit tests aren't terribly meaningful, but by exercising the code, we can ensure we won't hit a precondition failure due to an unsupported type.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@palpatim palpatim requested a review from drochetti June 3, 2020 16:45
Copy link
Contributor

@drochetti drochetti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So much cleaner and also accurate now, thanks for the fix!

@palpatim palpatim merged commit 659afea into master Jun 3, 2020
@palpatim palpatim deleted the palpatim/fix-predicate-support branch June 3, 2020 16:48
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.

2 participants