GraphQL - A server-side experiment as a data retrieval abstraction layer


GraphQL - A server-side experiment as a data retrieval abstraction layer


Date & Time - July 27 2019 2:00 pm – 4:00 pm CDT

Location - Virtual Session

This is a session in a series of technological exploration with the aptitude LLC platform to fully understand the upsides and drawbacks of different tools, frameworks, techniques, and paradigm along with their nuances.



As an online contracting platform where healthcare’s leading providers and suppliers come to explore opportunities, aptitude LLC streamlines and improves aspects of supply chain operations.

Session Goal

  • Share lessons learned from utilizing GraphQL as a data retrieval abstraction layer in our backend services to stitch data together from across different domains and services.

  • Learn from other’s unique experiences.

  • Create a shared culture of learning and an environment for constructive debate.

Join us in this session as we delve into how we utilize the GraphQL Java to adopt a less procedural approach to stitching data together across different domains, incorporate the spirit of Command Query Responsibility Segregation (CQRS) and develop a path to adopting Microservices.

Session Detail

The homepage of the official GraphQL website describes it as “A query language for APIs and a runtime for fulfilling those queries with your existing data.” and the following points to its advantages as an alternative to the REST-based architecture.

  • GraphQL provides a complete and understandable description of the data in your API.

  • Gives clients the power to ask for exactly what they need and nothing more.

  • Makes it easier to evolve APIs over time and enables powerful developer tools.

Our gravitation to GraphQL had less to do with it as a REST-based architecture alternate but the server-side runtime data fetching framework that supports its advantages. It is these capabilities that started the conversation about utilizing GraphQL Java capability to support our server-side data retrieval framework.

GraphQL Java Capability

  • Each GraphQL field type has a data fetcher/resolver associated with it and because GraphQL doesn’t dictate where the data comes from it can come from an in-memory list, from a database or an external service.

  • Availability of field selection information to optimize the query path.

  • Access to context information about the requested fields, the supplied arguments, and other information such as the field’s parent. object, the query root object or the query context object.

  • Opportunity to pass a context object during query execution to invoke business logic.

  • Support for caching, batch loading and asynchronous execution.

  • Instrumentation allows you to inject code that can observe the execution of a query and also change the runtime behavior.