Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. GraphQL
  3. graphql-java-servlet

graphql-java-servlet

NOASSERTIONJavav16.0.0extension

A servlet-based HTTP endpoint for GraphQL Java, supporting Relay.js, Apollo, and OSGi out of the box.

Visit WebsiteGitHubGitHub
227 stars108 forks0 contributors

What is graphql-java-servlet?

GraphQL Java Servlet is a servlet-based HTTP endpoint implementation for GraphQL Java, enabling Java web applications to serve GraphQL APIs over HTTP. It wraps the core GraphQL Java library to handle HTTP requests, execute GraphQL queries and mutations, and provide compatibility with popular GraphQL clients. The project solves the need for a standardized, production-ready HTTP interface for GraphQL in Java servlet environments.

Target Audience

Java developers building web applications with GraphQL APIs, especially those using servlet containers like Tomcat or Jetty and frameworks like Spring MVC. It is also suitable for teams requiring OSGi support or compatibility with specific Jakarta/Javax and Spring Framework versions.

Value Proposition

Developers choose GraphQL Java Servlet for its out-of-the-box support for major GraphQL clients (Relay.js, Apollo), seamless integration with GraphQL Java, and flexibility across different Java EE/Jakarta versions and Spring Framework releases. Its multi-flavor packaging ensures compatibility with both modern and legacy Java ecosystems.

Overview

Servlet endpoint for GraphQL Java

Use Cases

Best For

  • Adding GraphQL HTTP endpoints to Java servlet-based web applications
  • Integrating GraphQL Java with Spring MVC or other servlet frameworks
  • Supporting GraphQL clients like Relay.js or Apollo in Java backends
  • Deploying GraphQL APIs in OSGi environments
  • Maintaining compatibility across Jakarta, Javax, and Spring Framework versions
  • Building GraphQL services that require HTTP request handling and execution

Not Ideal For

  • Projects requiring real-time GraphQL subscriptions over WebSocket, as servlets are HTTP-based and this library doesn't natively support WebSocket
  • Applications built on reactive frameworks like Spring WebFlux, which prefer non-blocking HTTP handlers over traditional servlets
  • Microservices using lightweight HTTP servers like Netty or Quarkus that avoid servlet containers
  • Teams needing a GraphQL server with built-in admin UI or GraphiQL, as this focuses on backend servlet integration without GUI tools

Pros & Cons

Pros

Seamless Servlet Integration

Provides a standard servlet endpoint that easily integrates GraphQL Java into any Java web application using containers like Tomcat or Jetty, handling HTTP request parsing and response formatting.

Broad Client Compatibility

Out-of-the-box support for major GraphQL clients like Relay.js and Apollo, reducing the need for custom client-side adaptations and ensuring interoperability.

Multi-Version Support

Offers separate artifacts for Jakarta 6, Jakarta 5, and Javax, as detailed in the README, ensuring compatibility across different Java EE/Jakarta evolutions and Spring Framework versions.

OSGi Readiness

Designed to work in OSGi environments without additional configuration, making it suitable for modular Java applications, as highlighted in the key features.

Cons

Limited Real-Time Capabilities

Does not natively support GraphQL subscriptions over WebSocket, which are essential for real-time applications, requiring additional libraries or workarounds beyond the servlet scope.

Documentation Gaps

The project openly seeks contributors to improve documentation, indicating that current guides might be incomplete or outdated, potentially increasing setup complexity for new users.

Servlet-Container Dependency

Tied to servlet containers, which may not align with modern, cloud-native applications that use reactive or lightweight HTTP servers, limiting deployment flexibility.

Frequently Asked Questions

Quick Stats

Stars227
Forks108
Contributors0
Open Issues10
Last commit1 day ago
CreatedSince 2016

Tags

#spring-framework#graphql#servlet#java#graphql-java#apollo

Built With

G
GraphQL Java
S
Spring Framework
S
Servlet API
J
Java

Links & Resources

Website

Included in

GraphQL15.0k
Auto-fetched 1 day ago

Related Projects

graphql-javagraphql-java

GraphQL Java implementation

Stars6,236
Forks1,145
Last commit1 day ago
DGS FrameworkDGS Framework

GraphQL for Java with Spring Boot made easy.

Stars3,365
Forks333
Last commit5 days ago
manifold-graphqlmanifold-graphql

Manifold is a Java compiler plugin, its features include Metaprogramming, Properties, Extension Methods, Operator Overloading, Templates, a Preprocessor, and more.

Stars2,736
Forks134
Last commit2 days ago
graphql-spring-bootgraphql-spring-boot

GraphQL and GraphiQL Spring Framework Boot Starters - Forked from oembedler/graphql-spring-boot due to inactivity.

Stars1,512
Forks320
Last commit2 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub