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

feat(api): add support for GraphQL filter attributeExists #3838

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

5d
Copy link
Member

@5d 5d commented Aug 27, 2024

Issue #

This is reopen PR for #3484

Description

  • add support for AppSync GraphQL filter attributeExists
  • fix query filter with nil value.
  • optimize the SQL query generation for attributeExists and eq(nil)/ne(nil)

General Checklist

  • Added new tests to cover change, if needed
  • Build succeeds with all target using Swift Package Manager
  • All unit tests pass
  • All integration tests pass
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
  • Documentation update for the change if required
  • PR title conforms to conventional commit style
  • New or updated tests include Given When Then inline code documentation and are named accordingly testThing_condition_expectation()
  • If breaking change, documentation/changelog update with migration instructions

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

Copy link

codecov bot commented Aug 27, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 52 lines in your changes missing coverage. Please review.

Project coverage is 68.42%. Comparing base (cb80b91) to head (a6c0a26).
Report is 31 commits behind head on main.

Files with missing lines Patch % Lines
...egories/DataStore/Model/Internal/Persistable.swift 8.33% 33 Missing ⚠️
...ify/Categories/DataStore/Query/QueryOperator.swift 0.00% 12 Missing ⚠️
Amplify/Categories/DataStore/Query/ModelKey.swift 0.00% 2 Missing ⚠️
...mplify/Categories/DataStore/Query/QueryField.swift 0.00% 2 Missing ⚠️
...ries/DataStore/Query/QueryOperator+Equatable.swift 50.00% 1 Missing ⚠️
...fy/Categories/DataStore/Query/QueryPredicate.swift 0.00% 1 Missing ⚠️
...Plugin/Storage/SQLite/SQLStatement+Condition.swift 97.56% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3838      +/-   ##
==========================================
- Coverage   68.44%   68.42%   -0.02%     
==========================================
  Files        1082     1082              
  Lines       37699    37783      +84     
==========================================
+ Hits        25803    25854      +51     
- Misses      11896    11929      +33     
Flag Coverage Δ
API_plugin_unit_test 69.32% <ø> (ø)
AWSPluginsCore 68.64% <100.00%> (+0.10%) ⬆️
Amplify 47.36% <7.27%> (-0.20%) ⬇️
Analytics_plugin_unit_test 84.52% <ø> (ø)
Auth_plugin_unit_test 79.48% <ø> (-0.02%) ⬇️
DataStore_plugin_unit_test 81.39% <97.77%> (+0.12%) ⬆️
Geo_plugin_unit_test 72.00% <ø> (ø)
Logging_plugin_unit_test 62.95% <ø> (ø)
Predictions_plugin_unit_test 36.86% <ø> (ø)
PushNotifications_plugin_unit_test 86.21% <ø> (ø)
Storage_plugin_unit_test 76.81% <ø> (ø)
unit_tests 68.42% <50.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@5d 5d marked this pull request as ready for review September 20, 2024 19:01
@5d 5d requested a review from a team as a code owner September 20, 2024 19:01
@5d 5d merged commit 815bf2a into main Sep 23, 2024
79 checks passed
@5d 5d deleted the 5d/graphql-filter-support branch September 23, 2024 18:23
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