However, this time, only the first instance of a movie contains the attributes describing the movie. However, the associated movies are repeating. type Query Įvery event is unique – therefore none of the events are stripped. You would query the events resource to obtain a list of events matching your criteria (date, location, etc.), e.g. Normalized schemaĬonsider a resource that describes events (event being a screening of a movie in the cinema). This happens when you normalize your resources (as you should). However, I have soon hit a limitation–the response size can become huge. There has been steep learning curve - nonetheless, it was an enjoyable journey. I have started to use GraphQL in 2017 and since then without exception used it for every project. Having all of these interactions defined by a standard is a superior option over using (what is loosely referred to) a “REST API” (GraphQL itself is a specification of a RESTful API) – the latter is an inevitable journey of reinventing the wheel. Strongly typed - inspect the API to learn about the available resources.Declarative - declare exactly which resource fields you want to get.Compositional - combine multiple resource queries into a single request.If you are reading this you probably don’t need an intro to GraphQL – you chose GraphQL because it is: Using basic principles of compression to reduce the response size
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |