GraphQL Core: GraphQL Server and Implementations #9
A GraphQL server is a server-side implementation of the GraphQL spec & list of server libraries
GraphQL is often explained as a frontend-focused API technology because it enables clients to get data in a much nicer way than before. But the API itself is, of course, implemented on the server-side.
There are a lot of benefits to be had on the server as well because GraphQL enables the server developer to focus on describing the data available rather than implementing and optimizing specific endpoints.
What is a GraphQL Server/API?
A GraphQL server is a server-side implementation of the GraphQL spec. In other words, a GraphQL server exposes your data as a GraphQL API that your client applications can query for data.
These clients could be a single page application, a CMS like Drupal, a mobile app, or almost anything. For example, say you have a MySQL database and you want to expose the content to a React application.
You could create a GraphQL server that will allow our React application to query the database indirectly through the GraphQL server.
Since GraphQL is simply a specification, you need some GraphQL server implementations to get started.
Many different programming languages support GraphQL. This list contains some of the more popular server-side frameworks
alumbra - A set of reusable GraphQL components for Clojure conforming to the data structures given in alumbra.spec. graphql-kotlin: A set of libraries for running GraphQL server in Kotlin. graphql-perl: A Perl port of GraphQL reference implementation graphql-php: A PHP port of GraphQL reference implementation graphql-relay-php: A library to help construct a graphql-php server supporting react-relay. Railt: A PHP GraphQL Framework. Graphiti: Swift library for building GraphQL schemas/types fast, safely and easily.
In the next tutorial, we will look into the popular libraries that implement the GraphQL client specification.