Skip to content

Attempt to support nested Transformers#83

Open
marcuspoehls wants to merge 1 commit intoadonisjs:4.xfrom
marcuspoehls:nested-transformers
Open

Attempt to support nested Transformers#83
marcuspoehls wants to merge 1 commit intoadonisjs:4.xfrom
marcuspoehls:nested-transformers

Conversation

@marcuspoehls
Copy link
Contributor

🔗 Linked issue

❓ Type of change

  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

The serialization of Transformers used within an array that is part of the Inertia response props is not working as expected. The transferred JSON from the server to the client is a representation of the transformer, with $type and data attribute instead of the resolved resource.

I’ve added a test case and a sample implementation that would solve the issue with nested transformers in array response props. I’m seeing a TypeScript issue that I wasn’t able to solve. Maybe you have an idea how to approach it.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.
  • I have added a failing test for my reported issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant