Class GraphQlRequestPredicates
java.lang.Object
org.springframework.graphql.server.webmvc.GraphQlRequestPredicates
RequestPredicate implementations tailored for GraphQL endpoints.- Since:
- 1.3.0
- Author:
- Brian Clozel, Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptionstatic RequestPredicategraphQlHttp(String path) Create apredicatethat matches GraphQL HTTP requests for the configured path.static RequestPredicategraphQlHttp(String path, Set<HttpMethod> methods) Variant ofgraphQlHttp(String)that matches GraphQL HTTP requests using one of the given HTTP methods.static RequestPredicategraphQlHttpOptions(String path) Create apredicatethat matches HTTP OPTIONS requests for the configured path, so that clients can discover which HTTP methods are supported by the GraphQL HTTP endpoint.static RequestPredicategraphQlSse(String path) Create apredicatethat matches GraphQL SSE over HTTP requests for the configured path.static RequestPredicategraphQlSse(String path, Set<HttpMethod> methods) Variant ofgraphQlSse(String)that matches GraphQL SSE over HTTP requests using one of the given HTTP methods.
-
Method Details
-
graphQlHttp
Create apredicatethat matches GraphQL HTTP requests for the configured path.Matches only HTTP POST requests. To also match other HTTP methods, use
graphQlHttp(String, Set).- Parameters:
path- the path on which the GraphQL HTTP endpoint is mapped- See Also:
-
graphQlHttp
Variant ofgraphQlHttp(String)that matches GraphQL HTTP requests using one of the given HTTP methods.- Parameters:
path- the path on which the GraphQL HTTP endpoint is mappedmethods- the HTTP methods to match- Since:
- 2.1.0
- See Also:
-
graphQlHttpOptions
Create apredicatethat matches HTTP OPTIONS requests for the configured path, so that clients can discover which HTTP methods are supported by the GraphQL HTTP endpoint.CORS pre-flight requests are not matched, as those are handled by
graphQlHttp(String, Set)and the CORS configuration.- Parameters:
path- the path on which the GraphQL HTTP endpoint is mapped- Since:
- 2.1.0
- See Also:
-
graphQlSse
Create apredicatethat matches GraphQL SSE over HTTP requests for the configured path.Matches only HTTP POST requests. To also match other HTTP methods, use
graphQlSse(String, Set).- Parameters:
path- the path on which the GraphQL SSE endpoint is mapped- See Also:
-
graphQlSse
Variant ofgraphQlSse(String)that matches GraphQL SSE over HTTP requests using one of the given HTTP methods.- Parameters:
path- the path on which the GraphQL SSE endpoint is mappedmethods- the HTTP methods to match- Since:
- 2.1.0
- See Also:
-