@Produces(value="application/json") public class GraphqlResourceBase extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
APPLICATION_GRAPHQL |
| Constructor and Description |
|---|
GraphqlResourceBase() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
executeAsync(graphql.ExecutionInput input,
graphql.GraphQL graphql,
javax.ws.rs.container.AsyncResponse asyncResponse) |
protected static void |
get(String query,
String operationName,
String variables,
graphql.GraphQL graphql,
javax.servlet.http.HttpServletRequest httpRequest,
javax.ws.rs.container.AsyncResponse asyncResponse)
Handles a GraphQL GET request.
|
protected static void |
postGraphql(String query,
graphql.GraphQL graphql,
javax.servlet.http.HttpServletRequest httpRequest,
javax.ws.rs.container.AsyncResponse asyncResponse)
Handles a GraphQL POST request that uses the "application/graphql" content type.
|
protected static void |
postJson(GraphqlJsonBody jsonBody,
String queryFromUrl,
graphql.GraphQL graphql,
javax.servlet.http.HttpServletRequest httpRequest,
javax.ws.rs.container.AsyncResponse asyncResponse)
Handles a GraphQL POST request that uses the "application/json" content type.
|
protected static void |
replyWithGraphqlError(javax.ws.rs.core.Response.Status status,
String message,
javax.ws.rs.container.AsyncResponse asyncResponse) |
protected static final String APPLICATION_GRAPHQL
protected static void get(String query, String operationName, String variables, graphql.GraphQL graphql, javax.servlet.http.HttpServletRequest httpRequest, javax.ws.rs.container.AsyncResponse asyncResponse)
The payload is provided via URL parameters.
protected static void postJson(GraphqlJsonBody jsonBody, @QueryParam(value="query") String queryFromUrl, graphql.GraphQL graphql, @Context javax.servlet.http.HttpServletRequest httpRequest, @Suspended javax.ws.rs.container.AsyncResponse asyncResponse)
Such a request normally comprises a JSON-encoded body, but the spec also allows the query to be passed as a URL parameter.
protected static void postGraphql(String query, graphql.GraphQL graphql, @Context javax.servlet.http.HttpServletRequest httpRequest, @Suspended javax.ws.rs.container.AsyncResponse asyncResponse)
The request body is the GraphQL query directly.
protected static void executeAsync(graphql.ExecutionInput input,
graphql.GraphQL graphql,
@Suspended
javax.ws.rs.container.AsyncResponse asyncResponse)
protected static void replyWithGraphqlError(javax.ws.rs.core.Response.Status status,
String message,
@Suspended
javax.ws.rs.container.AsyncResponse asyncResponse)
Copyright © 2021. All rights reserved.