fix: App crash when using QueryConstraint #193
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New Pull Request Checklist
Issue Description
Closes #169
Approach
Don't use any ParseSwift.configuration parameters in a QueryConstraint since none of the constraints have the ability to wait until initialization is complete.
The default of using the
equalTo
query constraint now uses the$eq
comparator, which can be combined with other query constraints. The limitation is for Parse LiveQuery servers<6.3.0
; this constraint doesn't work, and theequalToNoComparator
should be used instead. The assumption is that since Parse Server 6 is in LTS (will be out-of-LTS when Parse Server 8 is released in 2025), developers are expected to keep their servers up-to-date for security reasons and be at least Parse Server>=6.3.0
. Please take a look at the API documentation for more details.For those using Parse Server
<6.3.0
an example of usingequalToNoComaparator
is below:Parse-Swift/Tests/ParseSwiftTests/APICommandTests.swift
Lines 411 to 416 in 157401b
TODOs before merging