Class GraphQLController<R>

java.lang.Object
io.leangen.graphql.spqr.spring.web.GraphQLController<R>
Direct Known Subclasses:
DefaultGraphQLController, DefaultGraphQLController

@RestController public abstract class GraphQLController<R> extends Object
  • Field Details

    • graphQL

      protected final graphql.GraphQL graphQL
    • executor

      protected final GraphQLExecutor<R> executor
  • Constructor Details

    • GraphQLController

      public GraphQLController(graphql.GraphQL graphQL, GraphQLExecutor<R> executor)
  • Method Details

    • executeJsonPost

      @PostMapping(value="${graphql.spqr.http.endpoint:/graphql}", consumes="application/json", produces="application/json") public Object executeJsonPost(@RequestBody GraphQLRequest requestBody, GraphQLRequest requestParams, R request)
    • executeJsonPostEventStream

      @PostMapping(value="${graphql.spqr.http.endpoint:/graphql}", produces="text/event-stream") public Object executeJsonPostEventStream(@RequestBody GraphQLRequest requestBody, GraphQLRequest requestParams, R request)
    • jsonPost

      public Object jsonPost(GraphQLRequest requestBody, GraphQLRequest requestParams, R request, TransportType transportType)
    • executeGraphQLPost

      @PostMapping(value="${graphql.spqr.http.endpoint:/graphql}", consumes={"application/graphql","application/graphql;charset=UTF-8"}, produces="application/json") public Object executeGraphQLPost(@RequestBody String queryBody, GraphQLRequest originalReq, R request)
    • executeFormPost

      @RequestMapping(method=POST, value="${graphql.spqr.http.endpoint:/graphql}", consumes={"application/x-www-form-urlencoded","application/x-www-form-urlencoded;charset=UTF-8"}, produces="application/json") public Object executeFormPost(@RequestParam Map<String,String> queryParams, GraphQLRequest graphQLRequest, R request)
    • executeGet

      @GetMapping(value="${graphql.spqr.http.endpoint:/graphql}", produces="application/json", headers={"Connection!=Upgrade","Connection!=keep-alive, Upgrade"}) public Object executeGet(GraphQLRequest graphQLRequest, R request)
    • executeGetEventStream

      @GetMapping(value="${graphql.spqr.http.endpoint:/graphql}", produces="text/event-stream", headers={"Connection!=Upgrade","Connection!=keep-alive, Upgrade"}) public Object executeGetEventStream(GraphQLRequest graphQLRequest, R request)