relay-compiler --src . --include 'components/**' 'pages/**' --schema 'api/schema.graphql' --language typescript --artifactDirectory 'generated'
Error: Cannot find module 'graphql-compiler'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/Users/steida/dev/este/node_modules/relay-compiler-language-typescript/lib/TypeScriptGenerator.js:21:23)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
this is listed in peerDependencies as *, like a bunch of other.
@steida If you add them, it works.
graphql-compiler was merge with relay-compiler, there is no more graphql-compiler
@sibelius then this block should updated, and assert that the change it is not breaking something else.
mainly require("relay-compiler/lib/GraphQLCompilerPublic"); this code does not exist anymore.
replaced by require("relay-compiler/lib/RelayCompilerPublic");
@sibelius @alloy @steida PR #87 to support Relay v2.0.0, removing dependency on graphql-compiler and accordingly to #78 (optionalInputFields).
One more thing, once merged this PR, could be addressed #86 (release a new package, due the changes, major).
it should be fixed here https://github.com/relay-tools/relay-compiler-language-typescript/pull/87
Fixed by #87
Most helpful comment
@sibelius @alloy @steida PR #87 to support Relay v2.0.0, removing dependency on
graphql-compilerand accordingly to #78 (optionalInputFields).One more thing, once merged this PR, could be addressed #86 (release a new package, due the changes, major).