StepZen is now part of IBM. For the most recent product information and updates visit our
IBM product page.
Use Cases

Work & Co | Faster Scalable Application Development with GraphQL-ized Mavenlink API

Nemanja Niciforovic, Managing Director and Engineering Lead
Nemanja NiciforovicManaging Director and Engineering Lead

With a GraphQL API on Mavenlink, Work & Co delivered an internal app in weeks, not months, allowing teams to visualize and track project resource allocations quickly, accurately, and easily.

About Work & Co.

Work & Co is an award-winning agency that designs and ships digital products that transform companies. The company helps its clients define digital strategies and bring to market and operationalize digital products at scale. Work & Co websites, apps, and digital experiences are used by millions of people every day.

Like many modern companies, the Work & Co workforce is distributed across the globe and across constantly evolving projects. The ability to manage its human and project resources effectively is critical to the company’s productivity. Work & Co partnered with StepZen to design, develop, and launch a GraphQL data layer on its Mavenlink backend and then retrofit an internal "employee directory" app, which is used by employees and their managers every day to communicate, collaborate, and understand project assignments and coverage.

Challenge

The Work & Co employee directory app is powered by data from multiple HR systems and used every day by many employees to communicate and collaborate across globally distributed and constantly evolving projects. When the company made the decision to consolidate the data from several of its third party HR and workforce management services onto a new provider, MavenLink, the team was faced with a decision regarding the internal app.

They could retire it, rebuild it, or retrofit it onto the new data source. Retirement was out of the question: employees needed it every day to do their jobs. Rebuilding was certainly possible; the company has the skills. However, those skills are primarily deployed on billable projects with clients, and spending that valuable resource on internal activities was hard to justify. A retrofit was the best choice. But it raised an important question:

How do we rebuild our essential application so we can continue to add functionality and data sources or even switch our systems again in the future while minimizing the amount of work we need to do?

It was important to update and scale this app as new sources of data became available that could improve the users' experience and provide more capabilities. The company needed a solution that would allow it to build a comprehensive but flexible application now - and one that would equip it for scale and new use cases in the future.

Solution

Converting the app’s existing REST API calls to GraphQL API calls was the first step. By switching to GraphQL, the client application only needs to know how to make a GraphQL call and requests only the data it needs; it doesn’t have to know where the data comes from. Standardizing on GraphQL for this application would allow the company to add new data sources and switch data sources without impacting the application; the GraphQL queries would remain the same.

However, typically this would mean writing a GraphQL server and a lot of resolver code to map the APIs to the data. The less code to write and maintain, the better. As a declarative, configuration-driven hosted GraphQL server, StepZen made it easy to configure resolvers, eliminating the need for much of the code. According to Nemanja Niciforovic, MD and engineering lead at Work & Co.

With the GraphQL API on Mavenlink we are able to build out an internal app in weeks that lets us visualize and plan our resource management quickly, accurately, and easily. Performance of this app is critical since it pulls together many bits of information. StepZen’s auto parallelism helped a lot. It also helps us future proof and scale as we add backend services, and build new apps on the single GraphQL API.

MavenLink has a comprehensive REST API to manage access to a wide variety of HR and resource management data. Using StepZen’s GraphQL directive - @rest - Work & Co was able to fine-tune the data available for the employee directory app. As a simple example, the team easily renamed fields in the MavenLink API to match the names used in their application, eliminating cognitive load for the front-end developer and reducing the number of code changes required in the application.

Defining types that include data from multiple API calls: Furthermore, they were able to simplify the MavenLink API through the use of StepZen’s @materializer directive. This enabled them to define types that include data from multiple API calls. For example, they added a “projects” type to the “user” type, which allowed the application developer to retrieve a user’s active projects at the same time as retrieving user details like profile photo and email address.

Pagination: The MavenLink API limits the number of records returned by any single call, enforcing pagination. The Work & Co app was not built to support handling data this way, and reworking it to make use of pagination was not an effort they wanted to undertake. Using StepZen’s @sequence directive, the team was able to parallelize many REST API calls to the MavenLink API and retrieve all pages of a result set with a single GraphQL query request.

Performance Tuning: An unexpected benefit of this approach is performance tuning. Retrieving smaller page sizes with the REST API results in faster response times. So 10 parallel requests for 200 records each takes longer than 20 parallel requests for 100 records each. By defining the StepZen queries appropriately, the Work & Co application developer was able to fine-tune the performance of their GraphQL queries.

Security and caching: On top of all these specific implementation details, Work & Co benefited from StepZen’s overall approach to security and caching. Flexible security configurations allowed them to define queries that use an application-wide security context as well as ones that use user-specific security context. Such fine-grained control is very difficult to manage when using a REST API directly; it’s typically one or the other. StepZen’s automatic caching means that users of their application see improved performance with zero development effort.

After converting their internal app to use GraphQL running on StepZen instead of specific REST API calls, the Work & Co team is in a prime position to take advantage of new capabilities within Mavenlink as they adopt more of the platform. It will also be able to bring new services into their GraphQL API easily, with minimal impact to the applications that are powered by the data delivered through StepZen.


About the Mavenlink API

Hundreds of companies depend on cloud provider Mavenlink and its rich REST API to power their workforce management, resourcing, and collaboration applications.

StepZen provides a GraphQL version of the Mavenlink API. Try it out for yourself in the StepZen GraphQL Studio along with GraphQL versions of other popular SaaS APIs.