6

Trace — For GraphQL query tracing at the resolver level

 2 years ago
source link: https://medium.com/@patconstant_9253/trace-for-graphql-query-tracing-at-the-resolver-level-59dcdab757e7
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Trace — For GraphQL query tracing at the resolver level

Trace is a lightweight, open-source GraphQL query performance monitoring GUI that provides users with real-time, resolver-level performance tracing metrics and error logging.

Trace — a lightweight graphql query tracing tool

Since its formal launch by Facebook in 2015, GraphQL has worked its way to being a fierce competitor against traditional REST protocol for querying data by bringing two highly sought after commodities to an API: Time and Space. GraphQL is fast. It reaches and returns your queries faster than if you were using an REST API, and it does this by returning only what the user asked for — while its counterpart would require fetching data from multiple endpoints.

For instance: let’s say a client wants name and email information for a specific user, along with the names of their followers. With a REST API, you would make two fetch requests to separate endpoints: /user/:id and user/:id/followers.

With GraphQL, you would only need a single query outlining the data desired by the client.

1*VmwCmEkbCIeVt9JERWWMJg.png?q=20
trace-for-graphql-query-tracing-at-the-resolver-level-59dcdab757e7

Less space occupied in local memory, less data to parse in your middleware, and arguably the most important of all: less time from query to response.

While we’re on the subject of saving time and space, allow me to introduce you to Trace.

In the fine tuning, the at-scale checkups, and the “could this be better?” stages of development, Trace is there to help you be faster. All while asking for less from your memory. With nanosecond-latency tracking algorithms, Trace, in its most simple sense, delivers duration metrics to the client for each of their resolvers. In its applicable sense, it presents to developers exactly where they need to look to buy back precious seconds. As an easy-to-configure and self-contained application, Trace not only equips users with resolver-level query tracing but also illustrative insights on specific resolvers.

Trace is designed for the developers who are in the ‘optimization stages’ of their GQL application.

In the fine tuning, the at-scale checkups, and the “could this be better?” stages of development, Trace is there to help you be faster. All while asking for less from your memory. With nanosecond-latency tracking algorithms, Trace, in its most simple sense, delivers duration metrics to the client for each of their resolvers. In its applicable sense, it presents to developers exactly where they need to look to buy back precious seconds. As an easy-to-configure and self-contained application, Trace not only equips users with resolver-level query tracing but also illustrative insights on specific resolvers.

At its inception, Trace was created for the developer looking for a straightforward option for query performance monitoring on their Express-GraphQL server.

While there are few proven alternate programs who accomplish this same job, Trace comes from the void in the modularity of those alternatives. If you’re working with GQL you’ve certainly heard of Apollo and Hasura — and you’re probably even using them. But what if you don’t need to be? What if you’re looking to provide your own server for your GQL application and all you want from them is their resolver metrics toolkit? You have to download the entire 5 megabyte library just for that one feature? Not anymore.

Trace provides a simple, intuitive interface for users looking to test queries for their Express-GraphQL servers. In comparison to the roughly 5 megabyte size of alternatives, Trace is only 1.2 megabytes!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK