- 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 git@github.com: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
you can also use
yarn run watch
if you are focused on GraphiQL development, you can run
yarn run start-graphiql
-
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-ts
- builds typescript using--build
and--force
flag.yarn watch
- runstsc --build --watch
, for when you make cross-repository changesyarn 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
- runsjest
. soyarn t --watch
yarn 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 test --watch
oryarn jtest DocExplorer
for example :D