Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Fragment-arguments/experimental features #3209

Open
JoviDeCroock opened this issue Mar 25, 2024 · 5 comments
Open

RFC: Fragment-arguments/experimental features #3209

JoviDeCroock opened this issue Mar 25, 2024 · 5 comments

Comments

@JoviDeCroock
Copy link

Is your feature request related to a problem? Please describe.

I have been picking up the Fragment Arguments spec for GraphQL, however it is hard to find a good testbed for this outside of the reference implementation.

My goal with this would be for much like we do with JS-features to already implement it in a few clients/servers.

The above imply that we'd implement the custom executor/validator/... as part of the execute used in GraphQL-Yoga and that in urql we'd still leverage graphql.web to parse fragment arguments.

That being said we're still faced with the issue of how to parse GraphQL requests in Yoga to accomodate for Fragment Arguments.

Describe the solution you'd like

We add support for experimentalFragmentArguments in GraphQL Yoga and we can allow folks to adopt it through urql (or anyone else choosing to adopt it) as a GraphQL Client. This gives us a window of feedback to advance the spec.

@ardatan
Copy link
Collaborator

ardatan commented Mar 25, 2024

Sounds interesting!

About parse function, onParse hook can be used to replace the parse function;

{
  onParse({ setParseFn }) {
     setParseFn(customParse);
  }
}

@Urigo
Copy link
Collaborator

Urigo commented Mar 25, 2024

Super exciting!

@n1ru4l can you think about a use case that could benefit from this feature on Hive?

@ardatan does it have also an affect on Mesh gateway support?

@Urigo
Copy link
Collaborator

Urigo commented Mar 25, 2024

also, are there changes needed in Codegen?

@Urigo
Copy link
Collaborator

Urigo commented Mar 25, 2024

by the way, my thinking here is not to use an experimental version of graphql-js, but to use our own implementation of parse
if that will work, then it would be a good feedback to bring back to graphql-js

@ardatan
Copy link
Collaborator

ardatan commented Mar 25, 2024

For sure, we can use that parse fn in everywhere so codegen, mesh and hive can benefit from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants