What is GraphQL?

GraphQL is an open source query language created by Facebook. Before GraphQL went open source in 2015, Facebook used it internally for their mobile applications since 2012, as an alternative to the common REST architecture.

svg viewer

REST versus GraphQL

GraphQL allows requests for specific data, giving clients more control over what information is sent. This is more difficult with the alternative architecture (REST) because the backend defines what data is available for each resource on a URL, while the frontend always has to request all the information in a resource – even if only a part of it is needed.

With GraphQL, users can query for and receive only the specific data they’re looking for; not more, not less.

Advantages of GraphQL

Applications using GraphQL have better performance because there’s no over-fetching of data. GraphQL embraces modern trends on how applications are built. You may only have one backend application, but multiple clients on the web, phones, and smartwatches depending on its data.

Free Resources

Copyright ©2024 Educative, Inc. All rights reserved