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

Open
raymondk-nf opened this issue May 1, 2024 · 0 comments
Open

Add debugDescription api for Apollo generated types #3374

raymondk-nf opened this issue May 1, 2024 · 0 comments
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
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

No branches or pull requests

2 participants