Skip to content

Conversation

JoviDeCroock
Copy link
Collaborator

Summary

I've been thinking about this for quite a while but it's time that this default is switched up, most GraphQL clients force you in this paradigm of always leveraging POST which misses out on a lot of benefits. The settings to actually do it the "right way" HTTP semantically is hidden behind an option.

The downside is that some servers might not support GET, however they are still free to turn this off. I prefer the explicit having to turn it off from having a degraded default experience.

The default should still be persisted operations but at least we take a step forward HTTP semantically wise.

@JoviDeCroock JoviDeCroock changed the title major(core): use GET for queries by default major(core|persisted): use GET for queries by default Jun 29, 2025
Copy link
Member

@kitten kitten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fair to push for this and change the default here.
This also enables us to look at what we can do to make this behaviour more expected in core.

Typically, query-level approaches omit the AST. We'll have to look at how we can deal with the lack of the AST, or rather, enforce that it's still there if a cache (or other logic) expects it.

Basically, we can be more explicit about:

  • persistedExchange behaviour (potentially in core)
  • how exchanges deal with a missing document (explicit incompatibilities)
  • how exchanges deal with a document + hash (explicitly disallow modifications via freezes in development)

@JoviDeCroock JoviDeCroock merged commit d3b019d into main Aug 9, 2025
19 checks passed
@JoviDeCroock JoviDeCroock deleted the rfc-default-get branch August 9, 2025 12:08
@github-actions github-actions bot mentioned this pull request Aug 9, 2025
arkandias pushed a commit to arkandias/urql that referenced this pull request Aug 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants