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

serializer has a bad design (express-bff) #95

Open
pyoner opened this issue Jun 12, 2023 · 1 comment
Open

serializer has a bad design (express-bff) #95

pyoner opened this issue Jun 12, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@pyoner
Copy link
Contributor

pyoner commented Jun 12, 2023

We use a serializer to prevent JSON Circular Reference Error, but in the initialization stage of SSE (express-bff) we pass an instance of serializer.

The serializer instance has its own state until the application is restarted.
The problem: serializer returns null every time it found a value in WeakSet for different json data.

See 6856d94

I think serializer should replace a default JSON.stringify code in the express-bff

data = serializer ? serializer(data) : JSON.stringify(data);

@blokhin

@blokhin
Copy link
Member

blokhin commented Jun 19, 2023

discussed in PaulMaly/express-bff#5

@blokhin blokhin added the enhancement New feature or request label Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants