When I try to pass some arguments to my inline fragment I got (that I imagined would happen)
ERROR:
Variables are not yet supported inside @inline fragments.
My question is whether inline fragments will support variables or any information about it.
@inline is a relatively newer feature so it's not fully flushed out yet. This is on our backlog but hasn't come up much - especially now that hooks make it easy to use the regular APIs (ie useFragment) as part of composable units of logic. Adding support for variables is on our backlog but not currently high-priority given that there are workarounds. Normally we'd be open to PRs to fix this, but we're actively rewriting the compiler so it will likely be easier to add support for this once the new compiler lands (rough timeframe of later this year).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi @josephsavona
I'm already using useFragment hooks from the experimental tag. Occasionally I need to use fragments outside any React components though and neither @inline or @relay(mask: false) work with @arguments directive. Unfortunately I haven't found a workaround yet. Do you know when it will be implemented?
This hasn't come up a lot so it continues to be lower on our radar. Once we ship the Rust-based compiler to OSS (high on priority list) we will definitely revisit this.