You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On https://github.com/sjwilczynski/graphitation/tree/user/stwilczy/fragmentRepro I added another fragment to two components in apollo-watch-fragments example. They mimic setup we have in 1JS, where we very often have more than one fragment (view data and domain data, and sometimes even another domain data one). In such case even if the fragment is very simple compiler fails with:
➜ apollo-watch-fragments (user/stwilczy/fragmentRepro) yarn duct-tape-compiler
yarn run v1.22.15
$ duct-tape-compiler --schema ./data/schema.graphql --src ./src --emitQueryDebugComments
Writing ts
DeprecationWarning: 'createTypeAliasDeclaration' has been deprecated since v4.8.0. Decorators are no longer supported for this function. Callers should switch to an
overload that does not accept a 'decorators' parameter.
DeprecationWarning: 'createImportDeclaration' has been deprecated since v4.8.0. Decorators are no longer supported for this function. Callers should switch to an ove
rload that does not accept a 'decorators' parameter.
ERROR:
Error writing modules:
Invariant Violation: Expected to find a @refetchable directive on TodoList_viewDataFragment
at invariant (C:\Users\stwilczy\Repos\graphitation\node_modules\invariant\invariant.js:40:15)
at printWatchNodeQueryReExport (C:\Users\stwilczy\Repos\graphitation\packages\apollo-react-relay-duct-tape-compiler\src\formatModule.ts:118:12)
at C:\Users\stwilczy\Repos\graphitation\packages\apollo-react-relay-duct-tape-compiler\src\formatModule.ts:98:33
at C:\Users\stwilczy\Repos\graphitation\node_modules\relay-compiler\lib\codegen\writeRelayGeneratedFile.js:153:22
at Generator.next (<anonymous>)
at asyncGeneratorStep (C:\Users\stwilczy\Repos\graphitation\node_modules\@babel\runtime\helpers\asyncToGenerator.js:3:24)
at _next (C:\Users\stwilczy\Repos\graphitation\node_modules\@babel\runtime\helpers\asyncToGenerator.js:25:9)
at C:\Users\stwilczy\Repos\graphitation\node_modules\@babel\runtime\helpers\asyncToGenerator.js:32:7
at new Promise (<anonymous>)
at C:\Users\stwilczy\Repos\graphitation\node_modules\@babel\runtime\helpers\asyncToGenerator.js:21:12
error Command failed with exit code 100.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The text was updated successfully, but these errors were encountered:
@alloy in latest commit to linked branch I added all the things that I was able to found. I wasn't able to write unit tests as I don't know compiler or duct tape code well enough but I pushed changes to schema in apollo-watch-fragments example with issue. To allow you to easier navigate, I added for each issue a comment in code like [issue 1]: .... which is either immediately seen at app runtime or triggered by uncommenting/adjusting fragment
On https://github.com/sjwilczynski/graphitation/tree/user/stwilczy/fragmentRepro I added another fragment to two components in apollo-watch-fragments example. They mimic setup we have in 1JS, where we very often have more than one fragment (view data and domain data, and sometimes even another domain data one). In such case even if the fragment is very simple compiler fails with:
The text was updated successfully, but these errors were encountered: