relay-compiler 13 custom transforms
- Dominant language
- Rust
- Stars
- 19k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
It would be nice to be able to add custom transforms like it was possible in v12
in our project we used it to add some code in generated files
```ts
// our code is something like
import { relayCompiler } from 'relay-compiler';
const tsPluginDefault = require('relay-compiler-language-typescript').default();
const { inputExtensions, outputExtension, findGraphQLTags, typeGenerator } = tsPluginDefault;
const langPlugin = {
inputExtensions,
outputExtension,
findGraphQLTags,
// in the formatModule we transform the ouput files to add some code specific to the request
formatModule: ourSpecificFormatModule,
typeGenerator,
}
await relayCompiler({
...moreConfig,
language: langPlugin,
});
```
Contributor guide
Assessment
This issue has not been assessed yet.