sysgears/create-apollo-app

external persist queries file

Closed this issue · 1 comments

I would like to see if we can add extracted queries through import if we running front-end and back-end in separate containers.

For example import <package>/extracted_queries.json

Right now it fails with below error when persist queries json file is not found.

[at-loader] Checking started in a separate process...
TypeError: Cannot read property 'length' of undefined
    at RawSource.size (/Users/veeramarni/Documents/eclipse/workspace/phoneapps/development/projects/fullstack-pro/node_modules/webpack-sources/lib/Source.js:17:23)
    at obj.assets.compilationAssets.map.asset (/Users/veeramarni/Documents/eclipse/workspace/phoneapps/development/projects/fullstack-pro/node_modules/webpack/lib/Stats.js:258:38)
    at Array.map (<anonymous>)
    at Stats.toJson (/Users/veeramarni/Documents/eclipse/workspace/phoneapps/development/projects/fullstack-pro/node_modules/webpack/lib/Stats.js:255:35)
    at ManifestPlugin.<anonymous> (/Users/veeramarni/Documents/eclipse/workspace/phoneapps/development/projects/fullstack-pro/node_modules/webpack-manifest-plugin/lib/plugin.js:45:40)
    at Compiler.applyPluginsAsyncSeries (/Users/veeramarni/Documents/eclipse/workspace/phoneapps/development/projects/fullstack-pro/node_modules/tapable/lib/Tapable.js:206:13)
    at Compiler.emitAssets (/Users/veeramarni/Documents/eclipse/workspace/phoneapps/development/projects/fullstack-pro/node_modules/webpack/lib/Compiler.js:358:8)
    at onCompiled (/Users/veeramarni/Documents/eclipse/workspace/phoneapps/development/projects/fullstack-pro/node_modules/webpack/lib/Compiler.js:57:19)
    at applyPluginsAsync.err (/Users/veeramarni/Documents/eclipse/workspace/phoneapps/development/projects/fullstack-pro/node_modules/webpack/lib/Compiler.js:514:14)
    at next (/Users/veeramarni/Documents/eclipse/workspace/phoneapps/development/projects/fullstack-pro/node_modules/tapable/lib/Tapable.js:202:11)
    at /Users/veeramarni/Documents/eclipse/workspace/phoneapps/development/projects/fullstack-pro/node_modules/awesome-typescript-loader/src/instance.ts:488:25
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

@veeramarni Does these containers share some part of filesystem?
If yes, I think it is doable, but support for such setup should be added to spinjs, Pull Request will be welcome:
https://github.com/sysgears/persistgraphql-webpack-plugin