Back to Blog
Anyone been to godocs7/11/2023 ![]() gqlgenįinally, we are caught up with the basics, so I would like to introduce you to gqlgen, a graphql implementation on the Go language. ![]() GraphQL was developed to cope with the need for more flexibility and efficiency! It solves many of the shortcomings and difficulties that developers experienced when interacting with REST APIs. REST APIs were slow – each change on the client query took a significant amount of time on the server due to its dependencies on the backend.Each endpoint, even though it may contain only ONE section of the data needed would provide additional unnecessary information. In REST API, there was a big problem of over fetching – which meant we would typically gather the data by accessing multiple endpoints.If the data came from multiple sources across the organization, it becomes quite difficult to coherently define efficient processes and ensure that clients get the data they want.The traditional way to make queries through APIs used REST API as its interface. However, if we search for all the albums released by a certain studio, and casting a specific pair of actors in the last decade, we start getting into problems with the relational database. To explain it simply, if you’ve ever used an API, you know how difficult it is to get exactly what you want – the names of all albums released in 2020 are quite easy to find. It is not a software implementation, but rather a specification – which means that it can be implemented by anyone and any language, and we as programmers are not confined to using something distributed by a company like Facebook. ![]() Developed by Facebook in 2012, it was released as Open Source in 2015. It is like an interface between your database, client, and server. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools. GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. Combining it with a language like Go seems intuitive and I’ll tell you why. GraphQL has been a buzzword for the better half of the past decade, and rightly so because of its advantages and simplicity.
0 Comments
Read More
Leave a Reply. |