![]() The cool thing about the GraphQL schema is that it can be sent over to the client. This means that if the API exists, so does it’s schema. A GraphQL schema (the file that describes the data model) is the byproduct of creating a GraphQL API. The most beautiful thing about GraphQL is that it is its own data model. No matter how you do it, using REST means managing your own data model. I could go on and on, but even this small example is enough to prove how quickly the complexity grows when we need to manage our own data model. Any components we miss will still appear to be working because they are still displaying posts … just not the right ones. If we’re lucky, a tester or product manager will find this bug before the users do. ![]() At this point, we now need to go back and edit the as well as any other React components that display posts from userpPosts and tell them to only display posts from userPostsByUserId. How front enders feel every time they need to change the data model.ġ0. ![]() } // How we've decided to store data returned from `/users/:id/posts` How we've decided to store data returned from `/users/:id` We might end up storing the data something like this: To do this, we get data from /users/:id and /users/:id/posts. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |