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

Add debugDescription api for Apollo generated types #3374

Closed
raymondk-nf opened this issue May 1, 2024 · 1 comment · Fixed by apollographql/apollo-ios-dev#412
Closed
Assignees
Labels
feature New addition or enhancement to existing solutions planned-next Slated to be included in the next release

Comments

@raymondk-nf
Copy link

Use case

Given any schema, the code generated by Apollo allows for elegant use of those strong types within Swift code. When debugging though, it's another story. Currently, developers are forced to po individual value type fields and cannot print top level objects to the debug console.

type Book {
  summary: Summary
}

type Summary {
  title: String
}

Here if you po on a book's summary, you get a DataDict

(lldb) po book.summary
▿ Optional<Summary>
  ▿ some : Summary
    ▿ __data : DataDict
      ▿ _storage : <_Storage: 0x3036f1f80>

Developers are forced to print out values for value types only.

(lldb) po book.summary.title
▿ Optional<String>
  - some : "My Book"

Describe the solution you'd like

Feature request here is to add a debugDescription to any code generated type from provided schema to allow for debugging capabilities.

@raymondk-nf raymondk-nf added the feature New addition or enhancement to existing solutions label May 1, 2024
@calvincestari calvincestari added the planned-next Slated to be included in the next release label May 2, 2024
@AnthonyMDev AnthonyMDev self-assigned this Jun 13, 2024
Copy link
Contributor

github-actions bot commented Jul 2, 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
feature New addition or enhancement to existing solutions planned-next Slated to be included in the next release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants