Closed kyzia551 closed 7 years ago
@kyzia551 If you need to run your own server at a remote location then you need to some refactoring. What you need to do is to have the server running on a different node, which is not something plugged into this starter kit at this moment. This is a full blown full-stack kit.
If you are not up for doing some webpack
refactoring then I can suggest you another starter kit which only supports react
+ apollo
front end part (https://github.com/reactql/kit)
In the aforementioned kit, you can just plug in your remote GraphQL end point at this line https://github.com/reactql/kit/blob/master/config/project.js#L4 and you are good to go.
There is a CLI available for the kit if you prefer to use it instead cloning to ejected package https://github.com/reactql/cli
@kyzia551 Support for external GraphQL backend has been just added. Please fetch the latest source code for the starter kit from this repository and set serverConfig.url
in tools/webpack.app_config.js
to your GraphQL server endpoint
Webpack doesn't understand url
if you uncomment it. Do you want me to create a separate issue?
configuration has an unknown property 'url'. These properties are valid:
object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry, externals?, loader?, modu
le?, name?, node?, output?, performance?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath
?, resolve?, resolveLoader?, stats?, target?, watch?, watchOptions? }
@veeramarni Yes, please create separate issue and please provide reproduction steps, since it is not clear what npm script are you launching.
What is the easiest way to change settings for using remote graphql server in you starter kit?
I've tried different ways, last try was in api_server change:
But any time I receive "400, bad request" error, and have no idea, because server works fine.