This repository was archived by the owner on Dec 19, 2023. It is now read-only.
This repository was archived by the owner on Dec 19, 2023. It is now read-only.
Path variables in graphql mapping #246
Closed
Description
I have a use case where I need to have a dynamic path with path variables like /projects/api/platform/{platformId}/graphql
where platformId
is gathered at runtime.
In previous versions, I could use a SimpleGraphqlHttpServlet
to expose the Rest endpoint like :
@RequestMapping("`/projects/api/platform/{platformId}/graphql")
@Throws(Exception::class)
fun graphql(@PathVariable platformId: String, request: HttpServletRequest, response: HttpServletResponse) {
graphQLServlet.service(request, response)
}
Now, with GraphQLHttpServlet
I have an HTTP 500 error without stackTrace.
I saw that graphiql-spring-boot-starter
accept path variables in his mapping in application.yml
like :
graphiql:
mapping: /projects/api/platform/{platformId}/graphiql
endpoint:
graphql: /projects/api/platform/{platformId}/graphql
subscriptions: /projects/api/platform/1/subscriptions
So, I wonder if it is possible to have the same behavior for graphql mapping
I also noticed that for graphiql configuration in application.yml, you can add path variables for query/mutation but not for subscriptions.