docs(migration-guide-6x): document that strictQuery default will flip-back #14998
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.
I spent many hours migrating a large code base from 5.x to 6.x. By a large margin, more hours were lost as a result of the change to
strictQuery: true
. Parts of my queries had been discarded and it wasn't clear why.Although I had read the migration guide multiple times, perhaps I glossed over this section believing that since I wasn't using the strictQuery option before, this change didn't apply to me.
To limit my scope of work, I always wasn't reading ahead to the changes in 7.x, where the default flipped back to what it was in 5.x.
So only at the very end during peer-review did someone point out that we should set
strictQuery:false
-- the default in both 5.x and >=7.x. Then I re-read that section of the migration guide and all my problems with parts of queries being discarded made sense.So I recommend adding a note about this to the "Migrating to 6.x" guide because I think it could save some other people some headache, if they set
strictQuery:false
when upgrading from 5.x to 6.x.This PR also fixes a closing tag issue in the same document.
Related to this, I would also suggest that there be extra logging when
strictQuery:true
. At least at the debug level if notinfo
orwarn
, include some logging like:foo:'zoo' was discarded from query because strictQuery:true
Considering that could be a separate issue. Really, after living with the effects of having
strictQuery:true
, I think it's dangerous and unintuitive option to silently modify queries, and would prefer that referencing missing schema throw (likestrictQuery:'throw'
or work anyway, likestrictQuery:'false'
).