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

apollo-ios-pagination: data arg for callbacks is incorrectly documented with v0.3.0 (RocketReserver fails to build) #3484

Closed
damian0815 opened this issue Dec 5, 2024 · 2 comments
Labels
bug Generally incorrect behavior needs investigation

Comments

@damian0815
Copy link
Contributor

damian0815 commented Dec 5, 2024

Summary

On upgrading the demo RocketReserver app's apollo-ios-pagination version to 0.3.0, build fails because the type of the data argument has changed in undocumented ways:

/Users/<username>/Apollo-PaginationSample-SwiftUI/RocketReserver/LaunchListViewModel.swift:33:26 Cannot convert value of type '(LaunchListQuery.Data) -> CursorBasedPagination.Forward' to expected argument type '(PageExtractionData<LaunchListQuery, LaunchListQuery, PaginationOutput<LaunchListQuery, LaunchListQuery>?>) -> CursorBasedPagination.Forward'

/Users/<username>/Apollo-PaginationSample-SwiftUI/RocketReserver/LaunchListViewModel.swift:40:16 Value of type 'PaginationOutput<LaunchListQuery, LaunchListQuery>' has no member 'launches'

Version

1.9.1 (apollo-ios-pagination 0.3.0, Xcode 15.4)

Steps to reproduce the behavior

  1. Download and open https://github.com/Iron-Ham/PaginationSample-SwiftUI in Xcode
  2. In the left panel (Cmd-1), locate the ApolloPagination package dependency, note version 0.1.0. Now build → success.
  3. Right click on the package dependency and select Update Package. Note that version is now 0.3.0.
  4. Build → failure with above error message

Logs

/Users/<username>/Apollo-PaginationSample-SwiftUI/RocketReserver/LaunchListViewModel.swift:33:26 Cannot convert value of type '(LaunchListQuery.Data) -> CursorBasedPagination.Forward' to expected argument type '(PageExtractionData<LaunchListQuery, LaunchListQuery, PaginationOutput<LaunchListQuery, LaunchListQuery>?>) -> CursorBasedPagination.Forward'

/Users/<username>/Apollo-PaginationSample-SwiftUI/RocketReserver/LaunchListViewModel.swift:40:16 Value of type 'PaginationOutput<LaunchListQuery, LaunchListQuery>' has no member 'launches'
@damian0815 damian0815 added bug Generally incorrect behavior needs investigation labels Dec 5, 2024
@calvincestari
Copy link
Member

Hi @damian0815 - I suggest you raise this issue directly in the sample project repo since it's not owned by Apollo. I'm sure @Iron-Ham is also open to accepting a PR with the relevant update.

@calvincestari calvincestari closed this as not planned Won't fix, can't repro, duplicate, stale Dec 6, 2024
Copy link
Contributor

github-actions bot commented Dec 6, 2024

Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo iOS usage and allow us to serve you better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Generally incorrect behavior needs investigation
Projects
None yet
Development

No branches or pull requests

2 participants