graphql-platform
graphql-platform copied to clipboard
"LegacySupport" flag was removed between v12.7.0-preview.41 and v12.7.0
Is there an existing issue for this?
- [X] I have searched the existing issues
Describe the bug
A flag was added in https://github.com/ChilliCream/hotchocolate/pull/4709 for the related issue: https://github.com/ChilliCream/hotchocolate/issues/4706
But after upgrading to v12.7.0, the flag is no longer there:

Steps to reproduce
- Try to use the
LegacySupportflag in thePagingOptions
.SetPagingOptions(
new PagingOptions
{
LegacySupport = true,
IncludeTotalCount = true,
InferConnectionNameFromField = false,
}
)
Relevant log output
No response
Additional Context?
No response
Product
Hot Chocolate
Version
12.7.0
@sgabler-solytic 12.7.0-preview.41 is now the current working branch of v13. We backported a lot of changes for another (two?) releases of v12. What exactly are you using of v12.7 preview? can you just "go back" to 12.7?
I assumed that v12.7.0-preview.41 is a lower version than v12.7.0, because it's a preview of the upcoming stable version v12.7.0. Maybe that's a wrong assumption?
I originally raised this issue in the slack chat: https://hotchocolategraphql.slack.com/archives/CD9TNKT8T/p1643307651419039, but then later created #4706.
After reading the slack discussion again, I can now see that @michaelstaib originally added the legacy support in v12.7.0-preview.2.

I then upgraded to preview.41 some time later and the legacy support still worked. Only after upgrading to v12.7.0 (without any preview suffix) it stopped working.
We (or anyone who wants to upgrade from v10) need this flag, otherwise we can't upgrade from HC10 to HC12, as it's a breaking change between the versions.
Or am I missing something? 🤔
12.7 preview became 13 and we reset the version 12.7
The feature is not gone ... we probably can cherry-pick it to 12.9
👍 That would be highly appreciated. Then I'll be able to finalize the upgrade from HC10 to HC12
@michaelstaib @PascalSenn what was the final outcome here? I remember reading something somewhere, but can't find it anymore
I will put it in 12.12
We have moved this one to 12.13
@michaelstaib I assume the preferred way of dealing with this issue it now to use a rewriter?
To avoid breaking schemas on a stitched schema, you can add a rewriter that rewrites all first: Int and last: Int on a connection to first: PaginationAmount and last: PaginationAmount. You also have to make sure that you register a new IntType on the root schema and rewrite all downstream schemas.
If yes, then I think we can close this issue
The issue is fixed on 13 with the legacy support available.
Just to give some background here. The change was not the simplest and we could not make it work in 12 without introducing another breaking change. I am closing this issue since it is solved with 13.