Skip to content

Commit

Permalink
cli: Remove graphiql setup command (#9964)
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Walker-GM committed Feb 6, 2024
1 parent b0d60f3 commit f3a865d
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 511 deletions.
2 changes: 1 addition & 1 deletion __fixtures__/test-project/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@types/react": "18.2.37",
"@types/react-dom": "18.2.15",
"autoprefixer": "^10.4.17",
"postcss": "^8.4.33",
"postcss": "^8.4.34",
"postcss-loader": "^8.1.0",
"prettier-plugin-tailwindcss": "0.4.1",
"tailwindcss": "^3.4.1"
Expand Down
22 changes: 0 additions & 22 deletions docs/docs/cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ yarn redwood destroy <type>
| `sdl <model>` | Destroy a GraphQL schema and service component based on a given DB schema Model |
| `service <name>` | Destroy a service component |
| `directive <name>` | Destroy a directive |
| `graphiql` | Destroy a generated graphiql file |
## exec
Expand Down Expand Up @@ -1794,27 +1793,6 @@ yarn redwood setup auth <provider>
See [Authentication](authentication.md).
### setup graphiQL headers
Redwood automatically sets up your authentication headers in your GraphiQL playground. Currently supported auth providers include Supabase, dbAuth, and Netlify.
A `generateGraphiQLHeader` file will be created in your `api/lib` folder and included in your gitignore. You can edit this file to customize your header. The function in the file is passed into your `createGraphQLHandler` and only called in dev.
```
yarn redwood setup graphiql <provider>
```
If you're using `dbAuth`, make sure the `-i` id you provided is not logged in from the web app.
| Arguments & Options | Description |
| :------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `provider` | Auth provider to configure. Choices are `dbAuth`, `netlify`, and `supabase` |
| `--id, -i` | Unique id to identify current user (required only for DBAuth) |
| `--token, -t` | Generated JWT token. If not provided, a mock JWT payload is returned in `api/lib/generateGraphiQLHeader` that can be modified and turned into a token |
| `--expiry, -e` | Token expiry in minutes. Default is 60 |
| `--view, -v` | Print out generated headers to console |
### setup cache
This command creates a setup file in `api/src/lib/cache.{ts|js}` for connecting to a Memcached or Redis server and allows caching in services. See the [**Caching** section of the Services docs](/docs/services#caching) for usage.
Expand Down
61 changes: 0 additions & 61 deletions packages/cli/src/commands/destroy/graphiql/graphiql.js

This file was deleted.

This file was deleted.

55 changes: 0 additions & 55 deletions packages/cli/src/commands/setup/graphiql/graphiql.js

This file was deleted.

142 changes: 0 additions & 142 deletions packages/cli/src/commands/setup/graphiql/graphiqlHandler.js

This file was deleted.

Loading

0 comments on commit f3a865d

Please sign in to comment.