HOWTO: Recipes for working with GraphQL or normalization [cache, normalizers, repositories]
At the moment, the documentation does not answer the question of which layer might be responsible for distributing data from the API to the different entities
@SuperOleg39 thanks for issue!
Could you please specify some details?
"which layer might be responsible for distributing data from the API to the different entities"
-
For GraphQL - there is usually responsible for-cache client (e.g. ApolloClient) Thus any API-request will be distributed to "entities" automatically with this cache-client, won't it? And the question is, what exactly would you like to see in the documentation with GraphQL?
-
For normalization in general Would you like to see dataflow recommendations like these?
- "How to organize data normalization in FSD layers?"
- "Where to store normalizers of entities and how to bind them with API requests?"
Good point for GraphQL, i did not think about the fact that the results of the query do not need to be stored somewhere else.
About normalization, both of recommendations sounds very useful!
Good point for GraphQL, i did not think about the fact that the results of the query do not need to be stored somewhere else.
Yeah, we'll try to describe it in documentation, but at least we have representive GraphQL example https://github.com/ani-team/github-client/tree/workshop/feature-sliced-next
About normalization, both of recommendations sounds very useful!
Good! At the moment @RinAkaia is writing article about "Entities normalization" And we will do everything possible to make this article appear sooner
But while waiting for the article, you can look up these materials:
- https://t.me/feature_sliced/12404
- https://t.me/feature_sliced/11657
- https://github.com/feature-sliced/documentation/discussions/396
Thanks you very much! Will be waiting for a new article)