It specifies what queries clients can make, the types of data retrievable, and relationships between types. → Schema: The blueprint for communication between client and server. What you would get in return for this query are all the first names of the players of our fictional sport league. GraphQL is an API syntax that defines how to fetch data from one or many databases. What is GraphQL (& why should you use it)? For now, let’s start with a few definitions. Linking the GraphQL API to a PostgreSQL databaseīut let’s not get ahead of ourselves just yet. For this use case, I’ll also throw in PostgreSQL as a database and the Join Monster library to optimize my queries. ![]() To do so, I’ll leverage these tools to create and expose a simple API. More precisely, I’ll go on and craft a GraphQL server using Node.js Express. ![]() For this, I need to jump to the obscure place that is server-side development. Here, I’ll be trying something different. We’ve already played with GraphQL a few times on the blog.Īlways with great results as GraphQL is pretty awesome-and more in vogue than ever!īut we’ve mostly stuck to the frontend side of things, using existing APIs and built-in GraphQL implementations. In a rush? Skip to technical tutorial or live demo
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |