- First, you will need to have the latest git, yarn 1.16 & node 12 or greater installed. OSX, Windows and Linux should all be supported as build environments.
None of these commands will work with npm
. Please use yarn
to develop with graphql.
-
Fork this repo by using the "Fork" button in the upper-right
-
Check out your fork
git clone [email protected]:yournamehere/graphiql.git
-
Install or Update all dependencies
yarn
-
Build all interdependencies so the project you are working on can resolve other packages
yarn run build
-
Get coding! If you've added code, add tests. If you've changed APIs, update any relevant documentation or tests. Ensure your work is committed within a feature branch.
-
Ensure all tests pass, and build everything
yarn test
If you want to develop just for graphiql, you don't even need to execute commands from the package subdirectory at packages/graphiql
.
First, you'll need to yarn build
all the packages from the root.
Then, you can run these commands:
yarn workspace graphiql dev
will launch webpack dev server for graphiql from the rootyarn workspace graphiql storybook
will launch graphiql storybook from the root
to run tests for GraphiQL:
yarn jest graphiql
will run all tests for graphiqlyarn jest --watch
will watch all changes in the monorepo
yarn
- install and link all packagesyarn build
- cleans first, then builds everything but webpack bundles -tsc --build
,babel
etcyarn build-bundles
- builds webpack bundles that are used for releasesyarn build-demo
- builds demo projects for netlify; we run this on CI to make sure webpack can consume our project in a standalone project.yarn test
- runs all of the above alongside linting and checks, jest mocha Cypress, and runs all buildsyarn format
- autoformats with eslint --fix and prettieryarn lint
- checks for linting issuesyarn e2e
- runs cypress headlessly against the minified bundle and a local schema server, like in CI.yarn jest
- runs global jest commands across the entire monorepo; tryyarn jest --watch
oryarn jest DocExplorer
for example :D