# grandstack

> Command line tool for GRANDstack and Neo4j GraphQL

Latest version **0.1.7** (published 2021-02-03) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install grandstack
pnpm add grandstack
yarn add grandstack
bun add grandstack
```

Provides the command `grandstack`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.7 |
| Published | 2021-02-03 |
| First published | 2020-04-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 19 |
| Unpacked size | 112.1 KB |
| Known vulnerabilities | 0 (+24 in 2 direct dependencies) |
| Install scripts | no |
| Author | William Lyon |
| Maintainers | johnymontana |
| Keywords | GraphQL, Neo4j, GRANDstack |

## Links

- npm: https://www.npmjs.com/package/grandstack
- npm.io page: https://npm.io/package/grandstack

## Dependencies (19)

- [axios](https://npm.io/package/axios.md) ^0.21.1
- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [yargs](https://npm.io/package/yargs.md) ^16.1.0
- [@babel/cli](https://npm.io/package/@babel/cli.md) ^7.8.4
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.9.0
- [@babel/node](https://npm.io/package/@babel/node.md) ^7.8.7
- [codesandbox](https://npm.io/package/codesandbox.md) ^2.2.1
- [neo4j-driver](https://npm.io/package/neo4j-driver.md) ^4.2.2
- [@octokit/rest](https://npm.io/package/@octokit/rest.md) ^18.0.6
- [apollo-server](https://npm.io/package/apollo-server.md) ^2.19.0
- [neo4j-graphql-js](https://npm.io/package/neo4j-graphql-js.md) ^2.19.1
- [@babel/preset-env](https://npm.io/package/@babel/preset-env.md) ^7.9.0
- [@babel/preset-react](https://npm.io/package/@babel/preset-react.md) ^7.9.4
- [@babel/runtime-corejs3](https://npm.io/package/@babel/runtime-corejs3.md) ^7.9.2
- [@babel/preset-typescript](https://npm.io/package/@babel/preset-typescript.md) ^7.9.0
- [babel-plugin-auto-import](https://npm.io/package/babel-plugin-auto-import.md) ^1.0.5
- [babel-plugin-module-resolver](https://npm.io/package/babel-plugin-module-resolver.md) ^4.0.0
- [@babel/plugin-transform-runtime](https://npm.io/package/@babel/plugin-transform-runtime.md) ^7.9.0
- [@babel/plugin-proposal-class-properties](https://npm.io/package/@babel/plugin-proposal-class-properties.md) ^7.8.3

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 0.1.7 (latest) — 2021-02-03
- 0.1.6 — 2020-10-31
- 0.1.5 — 2020-10-16
- 0.1.4 — 2020-10-15
- 0.1.3 — 2020-10-15
- 0.1.2 — 2020-09-16
- 0.1.0 — 2020-08-24
- 0.0.12 — 2020-07-29
- 0.0.11 — 2020-07-27
- 0.0.10 — 2020-07-13
- 0.0.9 — 2020-07-08
- 0.0.8 — 2020-06-08
- 0.0.7 — 2020-06-04
- 0.0.6 — 2020-05-01
- 0.0.5 — 2020-04-28
- … 4 more at https://npm.io/package/grandstack/versions

## README

[![npm version](https://badge.fury.io/js/grandstack.svg)](https://badge.fury.io/js/grandstack)

> ⚠️ NOTE: This project is currently a work-in-progress. APIs are still changing and some things are not yet implemented. If you have any feedback please open an issue.

# GRANDstack CLI

A command line interface for working with GRANDstack (GraphQL, React, Apollo, Neo4j Database) projects.


## Install

```
npm install -g grandstack
```

## Usage

> ⚠️ NOTE: Consider this a planning document for how commands *could* work. Many of these are not yet implemented and the API is likely to change. See the table below for current status of commands.

|Command     | Emoji | Subcommand     | Status                       |
|--------    |------ |------------    |-------                       |
| [`graphql`](#graphql)  | |          |                              |
|            | 🚧    | `dev`          | WIP - initial functionality  |
|            | 🚧    | `inferschema`  | WIP - initial functionality  |
| `neo4j`    |       |                |                              |
|            | ☠️     | `constraints`  | Not yet implemented          |
|            | ☠️     | `migrate`      | Not yet implemented          |
| `deploy`   |       |                |                              |
|            | 🚧    | `codesandbox`  | WIP - initial functionality  |
|            | 🚧    | `file`         | WIP - initial functionality  |
|            | 🚧    | `github`       | WIP - in dev                 |
|            | 🚧    | `api`          | WIP - initial functionality  |
| `configure`| 🚧    |                | WIP - initial functionality  |


### Commands

#### <a name="graphql"></a> `graphql`

**`grandstack graphql dev`**

Start local GraphQL server.

Options (should also be taken from environment variables):
  * `--types`
  * `--types-file` *Not yet implemented*
  * `--neo4j-uri`
  * `--neo4j-user`
  * `--neo4j-password`
  * `--graphql-port`
  * `--encrypted` (boolean)
  * `--database`
  * `--debug` - log generated Cypher queries *Not yet implemented*


**`grandstack graphql inferschema`**

Inspect existing Neo4j database and generate GraphQL type definitions.

Options:
  * `--schema-file` - the file to write the generated type definitions to, if not specified log to standard out
  * `--neo4j-uri`
  * `--neo4j-user`
  * `--neo4j-password`
  * `--start-server` - start GraphQL server using generated type definitions instead of writing to file
  * `--debug` - log generated Cypher queries when using `--run-server` *Not yet implemented*
  * `--run-server` (boolean)
  * `--encrypted` (boolean)
  * `--database`
  * `--graphql-port`

#### `neo4j`

**`grandstack neo4j constraints`**

Generate CREATE CONSTRAINT Cypher statements for a given GraphQL schema

**`grandstack neo4j migrate`**

Generate refactor Cypher statements given a GraphQL schema diff.

#### `deploy`

**`grandstack deploy [api web neo4j]`**

*Need some way to specify service (Zeit, Netlify, GCP,etc)*

*Deploy API to CodeSandbox*

```
grandstack deploy api codesandbox
```

**`grandstack deploy file --types "type Person {name: String}" --path ./foobar`**

Write projects to filesystem, passing type definitions as an argument

**`grandstack deploy github`**

Create new github repo from files, types and database

Options:
  * `--repo-name` - a name for your repo, dashes and lowercase
  * `--oauth-token` - your manually generated [auth token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) with repo scope
  * `--database` - name of the database if you have one, only applies to graph versions > 3.5
  * `--encrypted` (boolean) - whether or not your database is encrypted
  * `--new-repo` (boolean) - whether this is a new repo or you are connecting to a current repo (current repo option not yet available)

#### `configure`

*Create profiles with Neo4j credentials, etc*

**`grandstack configure`**

Options:
  * `--where-is` - points you towards current grandstack dir
  * `--profile name` - creates a new json profile with creds stored
  * `--init` - establishes a grandstack folder if none exists
  * `--neo4j-uri`
  * `--neo4j-user`
  * `--neo4j-password`

---
_Source: https://npm.io/package/grandstack · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
