An example repo using relay, react, and express-graphql
Server and Client side have separate package.json
and yarn.lock
files
From the root project folder, run yarn
This must be done every time a new terminal window is opened and used for the server side.
- Open up a tab in the terminal and run:
yarn run dev
- Open up a tab in the terminal. From the root project folder, run:
yarn run json-server
Requires the Node.js V8 inspector extension
To debug the server enter a debugging
line in the server codebase.
Example: ./users/schema/schema.js
resolve(parent, args) {
debugger;
return Book.findById(args.id);
},
Then run yarn run debug
to run the server in debug mode. Open Chrome and the
inspector (dev tools). Click the green Node.js V8 inspector extension icon. Use
breakpoints as necessary to move through the code and inspect.
The GraphQL schema docs are located in: users/schema
.nvmrc added to both Server and Client side for node version consistency