CLI interface for Reindex (https://www.reindex.io)
npm install -g reindex-cli
reindex login
reindex schema-fetch
Login to Reindex using given Reindex URL and token. Prompts for url and token if
they are not provided. Credentials are stored in .netrc
file in user's HOME
folder.
Clear stored credentials.
Opens GraphiQL console for your Reindex app in your browser.
Fetch Reindex JSON schema to SCHEMA_FILE
file (ReindexSchema.json
if not
provided).
If --force
flag is not set, it will not run if schema file already exists.
Push JSON schema from SCHEMA_FILE
(defaults to ReindexSchema.json
)
to Reindex API to perform a migration. Validates the schema and runs the
migration, if it only includes safe operations.
If the migration includes destructive operations, --force
flag must be used
to run it.
If --dry-run
flag is given, the command only validates the schema
and displays the migration without running.
Get Relay compatible GraphQL schema from Reindex API at HOST
. OUTPUT
is a
file name. If output is specified, result is written into it. Otherwise result
is written to stdout.
Your Reindex application host (eg https://YOURAPP.myreindex.com
). Can be set
either with this flag or via REINDEX_URL
environment variable. If you use
reindex login
, this parameter overrides stored credentials.
Your Reindex application authorization token. Can be set
either with this flag or via REINDEX_TOKEN
environment variable. If you use
reindex login
, this parameter overrides stored credentials.