Support GET /graphql queries out of the box

Hi I’m deploying a GraphQL API in fly.io. Since fly.io runs on the edge, they have a proxy which resolves the nearest region automatically, but sometimes POST requests are treated as mutations, even if the request only reads data, so fly.io redirects from the nearest region to the primary one (because it believes that will have a data mutation on the database, and only the primary region is allowed to do writes).

A better way of handling that is to support GET requests in GraphQL, right now on Yaak the only way of doing that is manually adding the query parameters to the URL, it would be nice to support this by converting the GraphQL body and variables to query parameters when the method is GET (spec https://graphql.org/learn/serving-over-http/#get-request-and-parameters)

What you think?

Please authenticate to join the conversation.

Upvoters
Status

Released

Board

Feedback

Tags

Improvement

Date

About 1 year ago

Author

Carlos Eduardo

Subscribe to post

Get notified by email when there are changes.