Graphql Java Servlet Versions Save

Servlet endpoint for GraphQL Java

v10.0.0

3 years ago

v9.3.0

3 years ago
  • Customizing the GraphQL Servlet Context #266

9.2.0

3 years ago
  • Allow timeout to be set when asyncServletModeEnabled=true #184

9.1.0

4 years ago
  • Upgraded bnd plugin #238
  • Ability to configure the servlet endpoint for the OSGi graphql servlet #237
  • Add exception to log instead of swallowing it #221
  • Moved guava dependency to testCompile #229
  • Renamed ObjectMapperConfigurer to GraphQLServletObjectMapperConfigurer to prevent clash with graphql-java-tools #234

v9.0.0

4 years ago

The library received a major refactoring to allow part to be usable in other projects, such as in combination with spring-webflux. It could be import statements have to be updated because of this. Although most of it is internal, which means most people should not be affected by this.

Changes

  • Add Content-Length HTTP header for non-stream JSON responses #213
  • Subscription not working when executing app within external webserver (e.g. OpenLiberty) #209
  • @defer support #133
  • Make AbstractGraphQLHttpServlet to be more customisable #194
  • Keep alive messages are stopped onComplete bug #196
  • Made ApolloSubscriptionProtocolHandler more pluggable #197
  • onError not called for POST requests #201
  • Question: AbstractGraphQLHttpServlet init() called on get and post requests bug #212

v8.0.0

4 years ago

Breaking changes

The project has been reorganized a bit. While doing so we decided to take a look at certain parts and refactor those.

GraphQLContext

The GraphQLContext had direct dependencies on several elements from javax.servlet.*. It's now an interface exposing only the Subject and DataLoaderRegistry. All other components it exposed have now been moved to more specific interfaces GraphQLServletContext and GraphQLWebSocketContext.

GraphQLServletContext

GraphQLServletContext is the interface representing the GraphQLContext for queries and mutations using the servlet. This class now exposes the HttpServletRequest and HttpServletResponse objects. Since this is created in a process where these are required to be available the getters are no longer returning Optionals but are always returning non null objects.

GraphQLWebSocketContext

GraphQLWebSocketContext is created for subscriptions.

Those can be overridden as before by your own custom context.

Migration instructions

  • Introduced a more defined package structure - import statements will need to be updated
  • BatchExecutionHandler removed - replaced with simpler BatchInputPreProcessor interface
    • BatchInputPreProcessor removes the dependency on http objects and no longer requires implementations to handle writing the result. *BatchInputPreProcessResult wraps either the batch to execute or the status code/message to return to the client
  • GraphQLContext has been split into three interfaces: GraphQLContext, GraphQLServletContext and GraphQLWebSocketContext
    • The default context implementations have been made immutable and can be created using builders obtained with static methods. See DefaultGraphQLContextBuilder for examples.
  • Four new context settings introduced to align more closely with Apollo-link-batch. "PER_QUERY_WITH_INSTRUMENTATION" is defaulted because it most closely resembles previous behavior. See readme.md for details

Other changes

  • FallbackSubscriptionProtocolHandler should preserve the session #137
  • DefaultErrorHandler returning "Internal Server Error(s)" for some GraphQLErrors caused by clients #162
  • GraphQLServletListener cant be registered in OSGI #164
  • Output errors which follows the specification #171
  • Batch query performance and context options #190

v7.5.0

5 years ago

Thanks to the contributors this release contains the following changes:

  • Update of the OSGi example project
  • Added an is not empty check for extensions
  • Override init() instead of init(ServletConfig) in AbstractGraphQLHttpServlet #175
  • Avoid explicitly injecting ObjectMapper #177
  • Provide ability to plug in pre-configured ObjectMapper #179
  • Simplified GraphQLSchemaProvider#copyReadOnly with support for CodeRegistry
  • Prevent second dispatch instrumentation when one already exists #188
  • Decreased log level of apollo subscription keep alive job from warn to debug
  • Explicitly handle the EOFException exception on websocket error by removing and closing the session

v7.4.1

5 years ago

Fixed issue with NPE when running query without variables

v7.4.0

5 years ago

Upgraded to graphql-java 12.0

v7.3.3

5 years ago
  • Allow batch handler to set http status (#156)