facebook / facebook/relay

Provided variable feature is gated

Open
#3,929 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Hi,

I am trying to use the "Provided variables" feature as documented [here](https://github.com/facebook/relay/blob/main/website/docs/api-reference/graphql/graphql-directives.md).

E.g.:
```
fragment Profile_user on User
@argumentDefinitions(
foo: {
type: "Float"
provider: "Foo.relayprovider"
}
)
```

I then created a file `Foo.relayprovider.js` with these contents:
```
export default {
get() {
return 4
}
}
```

When running the Relay compiler I am getting the following error:

`[ERROR] ✖︎ Invalid usage of provided variable: this feature is gated and currently set to disabled`

How do I enable the feature?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.