Articles tagged with graphql
How to set up a project with Ruby on Rails, PostgreSQL and GraphQL
Setting up a project with Ruby on Rails, PostgreSQL and GraphQL is actually pretty straightforward. But first, some prerequisites. For this tutorial (tested on versions 2.7.3, 188.8.131.52 and 11.0 respectively), you must have all three, Ruby on Rails, PostgreSQL and GraphQL installed on your development machine. Some general knowledge of Ruby and Rails is also recommended. Before we begin, however, you might be wondering why anyone would want to replace the perfectly fine experience provided by the traditional REST API with one offered by GraphQL. Well, one obvious reason is that GraphQL deals quite elegantly with resources over- and under-fetching. With GraphQL you are given the exact information you request - nothing more, nothing less. Moreover, it is almost self-documenting, making that one less item on your list of things to worry about. And there are other pros to GraphQL, such as it being both strongly typed and language and database independent. But in the meantime, I'll leave those for you to explore on your own. So, without further ado, let’s set up our first GraphQL API on Ruby on Rails.
Why You Should Use GraphQL-Code Generator with React and GraphQL
What is Graphql-Code Generator (CodeGen)? GraphQL-CodeGen is a CLI that can generate code from your GraphQL operations and schema. In React projects using typescript operations, it is very helpful to map GraphQL schema into interfaces. GraphQL can also generate hooks from email@example.com
2020 Tech Stack: GraphQL Apollo server with React.js
Since 2000, RESTful principles have been the industry standard for building web APIs. While REST solved many problems that previous protocols could not, it has flaws. In modern applications, the data interconnects in complex relations which can create performance issues in product development. This is exactly what GraphQL aims at solving.