Open alunyov opened 2 years ago
Documentation has a few TODOs - not sure if that's related or I should make a separate issue
Would OSS support for EntryPoint
(which AFAICT just means generating $Parameters.js
files, and writing docs) be a good thing to mention under "Possible Improvements:"?
Just migrated a large code base to 13.1.1
Main pain-points I had:
relay-compiler
doesn't support --config
flag anymorerelay-config
which is no longer supported. Also the config file needs to be JSON instead of JS.relay-compiler
. They are cleaner but it took quite a bit of refactoring.relay-compiler
defaulted to typescript without a config - this doesn't match the docs?Thanks for all the improvements! Excited to be on 13.
Thanks @mikeldking !
I think 1,2 items are probably connected. We do support --config
flag, but it is probably cannot read JS files.
Typescript should not be a default language, maybe you have other config that have typescript
in it?
Hey thanks for the response @alunyov
I forked the examples to show what I'm seeing: https://github.com/relayjs/relay-examples/pull/208
--config
not supported)If you run yarn build:with-config-option
(e.g. relay-compiler --config ./relay.config.json
) you will get
➜ todo git:(relay-compiler-bug-demo) ✗ (⎈ |mynamespace:mikeldking) yarn build:with-config-option
yarn run v1.22.17
warning ../../../package.json: No license field
$ relay-compiler --config ./relay.config.json
error: Found argument '--config' which wasn't expected, or isn't valid in this context
If you tried to supply `--config` as a value rather than a flag, use `-- --config`
USAGE:
relay [OPTIONS] [CONFIG]
For more information try --help
error Command failed with exit code 2.
This diverged (seems to be fixed?) from the docs so it caused some confusion.
Previously you could mix CLI option flags with a config file but now you cannot. E.g. the only valid syntax in this case is relay-compiler ./relay.config.json
. We were using a relay.config.js
as a base config for two relay compilation steps (two different entry points into our app). We now have a relay.xxx.config.json
and a relay.yyy.config.json
to accomplish the two compilations.
You are right, in the case where there is no language
specified in the config file, it defaults to flow
. However in the case you run the compiler with flags (yarn build:with-options
or relay-compiler --schema ./data/schema.graphql --src ./js --artifactDirectory ./__generated__/relay
), you will get typescript emitted.
See video:
https://user-images.githubusercontent.com/5640648/154538403-d3ba1ff5-610c-4e55-a3b8-6cd4fd8f87b1.mov
Hope that helps clarify things!
Thanks @mikeldking for detailed report!
the old compiler used to output the changed files, is this something that was removed?
the old compiler used to output the changed files, is this something that was removed?
Hmm, can you create an issue for this? With the possible example/repro to better understand what output should have changed files?
Here we will keep track of the progress of the release/adoption of the new compiler in OSS.
If there is something that is blocking you from adopting the new compiler (and it is not mentioned in this list) please create a new issue, we will review and add it to the list/or trying help with the fix.
The goal: help prioritizing critical bug-fixes/features for upcoming v13.0.2 release (and beyond).
Current Reported Issues:
Bugs:
relay-compiler@main
Missing Features:
Possible Improvements:
.gql
file extensions for schema files. See https://github.com/facebook/relay/issues/3772