Why use GraphQL vs. the more traditional REST technology in the WorkLink API?
Over the past 18 months, I (and many other ScopeAR customers) were introduced to GraphQL API technology for the first time.
Facebook originally developed GraphQL in 2012 before it was open-sourced in 2015. So it is a relatively new API technology when compared to REST.
So why did Scope AR adopt GraphQL over the more traditional REST API?
The key benefit of GQL is the ability to send requests to the API and retrieve the exact data required without excessive calls or unwanted inclusions.
For example - Let's say we wanted to retrieve a user's first and last name and email address using a traditional REST API.
A REST API will generally gather data by accessing multiple endpoints.
Request 1 - to the user/name endpoint might be used to fetch a list of the first and last names.
Request 2 - to the user/name/email endpoint might be used to fetch the email addresses
With GraphQL, we can send one request that specifies the desired data, and the server will respond with all three fields (First Name, Last Name, Email)
In order words, GQL allows the retrieval of the precise data needed in a predefined structure (JSON) which is great for communication with mobile-responsive platforms like smartphones, tablets, or other edge devices.
Exciting real-time integrations such as the Smart Tool IoT capabilities are being made possible with the help of the GQL WorkLink API.
It feels like we are just now starting to scratch the surface of integration potential using the WorkLink API. What other use cases do you think could be a game changer for your business?
Please sign in to leave a comment.
Comments
0 comments