api-platform / create-client

Generate React or Vue.js-based Progressive Web Apps from an Hydra-enabled API. Also support React Native.
https://api-platform.com/docs/client-generator/
MIT License
373 stars 132 forks source link

"Cannot stringify arbitrary non-POJOs" error in Nuxt projects #382

Open robregonm opened 8 months ago

robregonm commented 8 months ago

API Platform version(s) affected: 3.2.18

Description
Clients generated for Nuxt will fail with: "Cannot stringify arbitrary non-POJOs"

How to reproduce

Possible Solution

Additional Context
This is occurring with all projects using Nuxt 3.4 or later. More info at: https://nuxt.com/blog/v3-4#payload-enhancements

J3m5 commented 8 months ago

Hello @robregonm I think we could just store the URL as a string and not as a URL object, what do you think?

robregonm commented 8 months ago

@J3m5 That's another good and simple workaround. Agree.