We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
API Platform version(s) affected: 3.2.18
Description Clients generated for Nuxt will fail with: "Cannot stringify arbitrary non-POJOs"
How to reproduce
yarn create @api-platform/client https://localhost/ . --generator nuxt --resource animal
Possible Solution
nuxt.config.js
experimental: { renderJsonPayloads: false, },
./nuxt/stores/animal/list.ts
shallowRef()
setHubUrl
setHubUrl(hubUrl?: URL) { this.hubUrl = shallowRef(hubUrl); },
./composables/api.ts
shallowRef() to all
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
The text was updated successfully, but these errors were encountered:
Hello @robregonm I think we could just store the URL as a string and not as a URL object, what do you think?
Sorry, something went wrong.
@J3m5 That's another good and simple workaround. Agree.
No branches or pull requests
API Platform version(s) affected: 3.2.18
Description
Clients generated for Nuxt will fail with: "Cannot stringify arbitrary non-POJOs"
How to reproduce
yarn create @api-platform/client https://localhost/ . --generator nuxt --resource animal
)You'll get a message saying: "Cannot stringify arbitrary non-POJOs"
Possible Solution
nuxt.config.js
and add the following:./nuxt/stores/animal/list.ts
and addshallowRef()
tosetHubUrl
function:./composables/api.ts
and addshallowRef() to all
onResponse()` functions.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
The text was updated successfully, but these errors were encountered: