Skip to content

GraphQL Endpoints shadowed by RequestMappings #404

@dawi

Description

@dawi

I want to integrate GraphQL into an application that already provides a rest api.

The application contains a RequestMapping that is used as fallback, if no Controller method exists for handling the request:

@Controller
@RequestMapping
public class FallbackController {

    @RequestMapping("/**")
    public void unmappedRequest(HttpServletRequest request) {
        final String uri = request.getRequestURI();
        throw new ResourceNotFoundException("There is no resource for path " + uri);
    }
}

A corresponding ExceptionHandler exists, that converts the ResourceNotFoundException into a 404 JSON ResponseEntity.

Now having this RequestMapping in place, I get a 404 if I call any of the GraphQL Endpoints.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions