What Is GraphQL and Why Use It?

Reaching production-ready and open source status in September 2016, GraphQL is a growing publicly explored query language for APIs and databases. Its appeal among query languages is the simplicity and clarity of a query itself. The query language enables users to receive only what they desire when asking for data from the backend infrastructure simply by specifying in the query the data type and field(s) nested in the type. The user is given the power to intuitively form structured queries that both mirror the hierarchy of the returned JSON and demand a vast quantity of data in a time efficient manner.

Compared to REST, of which GraphQL is an increasingly attractive alternative, GraphQL improves the speed of application development by this realignment of the user's frame of thought. Essentially, GraphQL bridges the gap between data retrieval and incorporation of that data into its application such that the user conceptualizes the query in the same format of the input to the application. Such ideological pairing offered by GraphQL makes the resource URI requests in REST appear unnecessarily burdensome and disparate from their intended use.

GraphQL can be used as an interface to backend infrastructures composed of a number programming/querying languages with some of the most popular including JavaScript, Ruby, Python, Scala, Clojure, Go, PHP, C#, SQL, and NoSQL. Its flexibility is furthered by compatibility with a variety of exploration and visualization tools. The graphiql tool offers an in-browser IDE to explore the process of writing queries and obtaining their results while GraphQL IDE uses a more extensive approach to this functionality. The graphqlviz tool serves as a GraphQL API visualizer in Node.js and GraphQL Voyager facilitates representation of any GraphQL API as an interactive graph. Its integration with a number of other tools and languages gives GraphQL a truly productive appeal to flexible data wrangling and downstream application and visualization.

Learn More

Start Using GraphQL

Interesting Reads

Starting a new project?

Presentation Slides

courses/cs397/winter2017/graphql.txt · Last modified: 2017/04/12 09:31 by oconnorp
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0