Skip to content

8.0.0

Compare
Choose a tag to compare
@oliemansm oliemansm released this 27 Jun 17:55
· 658 commits to master since this release

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