Support for HTTP-Get extensions like persisted queries missing?

47 views Asked by At

This is somewhere in between a feature a request and a possibly already answered question (which I haven't found, sorry in that case). I'm currently migrating from graphl-java-spring to spring-graphql and we've also implemented (by ourselves) support for persisted queries and apollo automated persisted queries. Since graphql-java supports this now natively by the PersistedQuerySupport (a PreparsedDocumentProvider), I wanted to use this.

I have discovered now, that the out of the box RouterFunction is limited to POST only. Adding an additional route for GET also does not help, as also the ootb GraphQlHttpHandler is not able to handle GET request. Simple question(s): Am I right with this analysis? If yes, is there a plan/roadmap to add support to spring-graphql? If no, what am I possibly missing? (I know I could of course implement it by my own)

Cheers Wolfgang

1

There are 1 answers

0
Brian Clozel On

Supporting GET requests has been considered and declined. There is no current plan for such a feature, see this Spring for GraphQL issue. The GraphQL over HTTP draft spec does mention GET requests but the Spring for GraphQL team has chosen so far to not implement this.

If persisted queries can be supported with POST requests, maybe create an enhancement request in the Spring for GraphQL project?