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: allow includeAll with additional includes #367

Merged
merged 3 commits into from May 19, 2022

Conversation

cbaker6
Copy link
Contributor

@cbaker6 cbaker6 commented May 19, 2022

New Pull Request Checklist

Issue Description

  • Since the server includeAll only provides one level deep, it's currently not possible in the Swift SDK to specify includeAll along with additional include keys, preventing the ability to request the server to includeAll one level deep and individually specify multiple level deep includes
  • When fetching with include, it's currently possible to send duplicate keys to the server because the include argument is an array. Though the server has a dedupe process to handle this, the client will send extra strings when this occurs
  • Revery includeAll property addition and method deprecation in feat: add includeAll computed property to Query #362

Related issue: #359

Approach

  • Allow includeAll key to be sent with additional include keys. Note that as of today, it doesn't look like the server has this feature implemented and will simply includeAll instead of looking at the rest of the keys
  • When fetching, if the include argument is specified, convert it to a Set to prevent duplicate keys from being sent to the server

TODOs before merging

  • Add tests
  • Add entry to changelog
  • Add changes to documentation (guides, repository pages, in-code descriptions)

@parse-github-assistant
Copy link

parse-github-assistant bot commented May 19, 2022

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@codecov
Copy link

codecov bot commented May 19, 2022

Codecov Report

Merging #367 (172b9be) into main (6fc9d2d) will decrease coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #367      +/-   ##
==========================================
- Coverage   87.95%   87.90%   -0.05%     
==========================================
  Files         114      114              
  Lines       12213    12214       +1     
==========================================
- Hits        10742    10737       -5     
- Misses       1471     1477       +6     
Impacted Files Coverage Δ
Sources/ParseSwift/API/API+Command.swift 89.21% <100.00%> (ø)
Sources/ParseSwift/Objects/ParseInstallation.swift 85.39% <100.00%> (ø)
Sources/ParseSwift/Objects/ParseUser.swift 86.03% <100.00%> (-0.18%) ⬇️
Sources/ParseSwift/Types/Query.swift 94.38% <100.00%> (+<0.01%) ⬆️
Sources/ParseSwift/LiveQuery/ParseLiveQuery.swift 76.09% <0.00%> (-0.59%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6fc9d2d...172b9be. Read the comment docs.

@cbaker6 cbaker6 linked an issue May 19, 2022 that may be closed by this pull request
@cbaker6 cbaker6 merged commit c14723a into parse-community:main May 19, 2022
@cbaker6 cbaker6 deleted the revertIncludeAll branch May 19, 2022 23:44
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.

Include keys for multiple levels...
1 participant