How to efficiently use GraphQL APIs to get business insights

By

In this blogpost I describe why using GraphQL APIs is different from using any other kind of API and which benefits it brings to the user.

Usually APIs are used for machine to machine communication. That's why often the definition of an API is quite strict so that it does not break the communication between two services if it is changed. This surely is a benefit if the API contains all the functionalities that you currently need and also all that you will need in the future. However, processes are improved over time and knowledge gets better. So also the functionality of an API should be extended over time without breaking the communication between two services.

That is where GraphQL enters the game. With GraphQL you are able to define how your response should look like. This means that it does not matter if the API changes as long as the response still looks the same. You can add new functionality without the need for versioning as long as it is downwards compatible.

Based on customer feedback we created a complete set of API methods for filtering, statistics and aggregation. You can find the full list of features in our documentation.

Let’s look at an example to see how it is working.

We ingest these records into Tilores:

If we then search for it 

we would get this result

The problem is that you now get information about 3 different records, however most of the information is duplicate. With our new Records Insights functionality you can change that. 

The query would look like this:

And this is the result:

You can now see that the duplicate data is gone. Instead of getting the same first name, last name and email three times, you now only get the unique values - so only one first and last name and the three different email addresses. The other difference between both queries is that now we can see the total price that John Doe paid for all orders as a sum.

Additionally to the shown functionality you can now also filter, sort, group or otherwise optimize the result that the GraphQL query delivers. This will be quite useful also for machine learning as you can exactly define the features that your model needs.

Related

Posts

Explore Similar Articles

Identity resolution for fraud prevention, KYC and marketing.

Get the latest updates

©2023 Tilores, All right reserved.