Class GraphQLServer
-
- All Implemented Interfaces:
public class GraphQLServer<Request extends Object>
A basic server implementation that parses the incoming request and returns a GraphQLResponse. Subscriptions require more server-specific details and should be implemented separately.
-
-
Constructor Summary
Constructors Constructor Description GraphQLServer(GraphQLRequestParser<Request> requestParser, GraphQLContextFactory<Request> contextFactory, GraphQLRequestHandler requestHandler)
-
Method Summary
Modifier and Type Method Description GraphQLServerResponse
execute(Request request)
Default execution logic for handling a Request and returning a GraphQLServerResponse. -
-
Constructor Detail
-
GraphQLServer
GraphQLServer(GraphQLRequestParser<Request> requestParser, GraphQLContextFactory<Request> contextFactory, GraphQLRequestHandler requestHandler)
-
-
Method Detail
-
execute
GraphQLServerResponse execute(Request request)
Default execution logic for handling a Request and returning a GraphQLServerResponse.
If null is returned, that indicates a problem parsing the request or context. If the request is valid, a GraphQLServerResponse should always be returned. In the case of errors or exceptions, return a response with GraphQLErrors populated. If you need custom logic inside this method you can override this class or choose not to use it.
-
-
-
-