Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace sh and bash syntax highlighting for ddn commands only #13

Merged
merged 6 commits into from
Apr 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/_prereqs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ development experience faster and your feedback loops shorter. **You'll need Doc

You can verify that the DDN CLI is installed correctly by running:

```sh
```ddn
ddn doctor
```
2 changes: 1 addition & 1 deletion docs/auth/jwt/jwt-mode.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ For these examples we'll set the payload of the JWT to specify a `user` role and
Once you've updated your `AuthConfig` object in `auth-config.hml` and updated your claims, you can rebuild your
supergraph and test it locally.

```bash title="For example, from the root of your project, run:"
```ddn title="For example, from the root of your project, run:"
ddn supergraph build local
```

Expand Down
2 changes: 1 addition & 1 deletion docs/auth/jwt/tutorials/integrations/1-auth0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ definition:

Then, create a new build of your supergraph:

```sh
```ddn
ddn supergraph build local
```

Expand Down
2 changes: 1 addition & 1 deletion docs/auth/jwt/tutorials/integrations/2-aws-cognito.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ definition:

Then, create a new build of your supergraph:

```sh
```ddn
ddn supergraph build local
```

Expand Down
2 changes: 1 addition & 1 deletion docs/auth/jwt/tutorials/integrations/3-firebase.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ AuthConfig object to ensure proper validation.

Then, create a new build of your supergraph:

```sh
```ddn
ddn supergraph build local
```

Expand Down
2 changes: 1 addition & 1 deletion docs/auth/jwt/tutorials/integrations/4-clerk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ definition:

Then, create a new build of your supergraph:

```sh
```ddn
ddn supergraph build local
```

Expand Down
2 changes: 1 addition & 1 deletion docs/auth/jwt/tutorials/setup-test-jwt.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ definition:

Create a supergraph build using this `AuthConfig`.

```bash title="From the root of your project, run:"
```ddn title="From the root of your project, run:"
ddn supergraph build create \
--description "use jwt-based authconfig" \
--supergraph supergraph.yaml
Expand Down
2 changes: 1 addition & 1 deletion docs/auth/noauth-mode.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ all fields being allowed in the `TypePermissions`.

### Step 3. Build your supergraph

```bash
```ddn
ddn supergraph build local
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ If you want to restrict which fields the new role can access, simply omit them f

Create a new build of your supergraph:

```sh
```ddn
ddn supergraph build local
```

Expand Down
2 changes: 1 addition & 1 deletion docs/auth/permissions/tutorials/2-public-access-role.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ definition:

Create a new build of your supergraph:

```sh
```ddn
ddn supergraph build local
```

Expand Down
2 changes: 1 addition & 1 deletion docs/auth/permissions/tutorials/4-service-account.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Content-Type: application/json

Create a new build of your supergraph:

```sh
```ddn
ddn supergraph build local
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ definition:
This will set your `x-hasura-role` session variable as `author` and the `x-hasura-user-id` as `1`, enabling you to
impersonate Alice.

```bash title="Create a new build and start your services:"
```ddn title="Create a new build and start your services:"
ddn supergraph build local && ddn run docker-start
```

Expand Down
4 changes: 2 additions & 2 deletions docs/auth/private-vs-public.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ If set to `public` with `noAuth` mode, queries do not require any authentication

Set to `private` mode:

```bash
```ddn
ddn project set-api-access-mode private
```

Set to `public` mode:

```bash
```ddn
ddn project set-api-access-mode public
```

Expand Down
2 changes: 1 addition & 1 deletion docs/auth/webhook/tutorials/special-roles.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ definition:

Once you've updated your metadata files, you can rebuild your supergraph and test it locally.

```bash title="For example, from the root of your project, run:"
```ddn title="For example, from the root of your project, run:"
ddn supergraph build local
```

Expand Down
2 changes: 1 addition & 1 deletion docs/auth/webhook/webhook-mode.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ definition:

## Step 4. Rebuild your supergraph

```bash title="For example, from the root of your project, run:"
```ddn title="For example, from the root of your project, run:"
ddn supergraph build local
```

Expand Down
2 changes: 1 addition & 1 deletion docs/business-logic/add-a-lambda-connector.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ You can add a lambda connector just like any other [data source](/data-sources/o

## Add a connector

```sh title="Initialize a new connector in a project directory:"
```ddn title="Initialize a new connector in a project directory:"
ddn connector init <your_name_for_the_connector> -i
```

Expand Down
2 changes: 1 addition & 1 deletion docs/business-logic/add-env-vars-to-a-lambda.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ available across your project:

## Add an environment variable

```sh title="From a project directory, run:"
```ddn title="From a project directory, run:"
ddn connector env add <connector_name> --env FOO=bar
```

Expand Down
20 changes: 10 additions & 10 deletions docs/business-logic/tutorials/1-add-custom-logic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This tutorial should take about five minutes.

## Step 1. Initialize a new local DDN project

```sh title="Create a new project using the DDN CLI:"
```ddn title="Create a new project using the DDN CLI:"
ddn supergraph init lambda-tutorial
```

Expand All @@ -40,7 +40,7 @@ ddn supergraph init lambda-tutorial

<TabItem value="TypeScript" label="TypeScript">

```bash title="Run the following command:"
```ddn title="Run the following command:"
ddn connector init my_ts -i
```

Expand All @@ -54,7 +54,7 @@ the entrypoint for your connector.

<TabItem value="Python" label="Python">

```bash title="Run the following command:"
```ddn title="Run the following command:"
ddn connector init my_python -i
```

Expand All @@ -68,7 +68,7 @@ be the entrypoint for your connector.

<TabItem value="Go" label="Go">

```bash title="Run the following command:"
```ddn title="Run the following command:"
ddn connector init my_go -i
```

Expand Down Expand Up @@ -199,7 +199,7 @@ schema.

<TabItem value="TypeScript" label="TypeScript">

```bash title="Introspect the connector:"
```ddn title="Introspect the connector:"
ddn connector introspect my_ts
```

Expand All @@ -213,7 +213,7 @@ ddn command add my_ts encode

<TabItem value="Python" label="Python">

```bash title="Introspect the connector:"
```ddn title="Introspect the connector:"
ddn connector introspect my_python
```

Expand All @@ -227,7 +227,7 @@ ddn command add my_python encode

<TabItem value="Go" label="Go">

```bash title="Introspect the connector:"
```ddn title="Introspect the connector:"
ddn connector introspect my_go
```

Expand All @@ -246,15 +246,15 @@ generated Hasura metadata for each. Look for `Hello.hml` and `Encode.hml` to see

## Step 5. Create a new build and test

```bash title="Create a new build:"
```ddn title="Create a new build:"
ddn supergraph build local
```

```bash title="Start your services:"
```ddn title="Start your services:"
ddn run docker-start
```

```bash title="Open your local console:"
```ddn title="Open your local console:"
ddn console --local
```

Expand Down
26 changes: 13 additions & 13 deletions docs/business-logic/tutorials/2-extend-a-model.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ This tutorial should take about ten minutes.

## Step 1. Initialize a new local DDN project

```sh title="Create a new project using the DDN CLI:"
```ddn title="Create a new project using the DDN CLI:"
ddn supergraph init lambda-tutorial
```

## Step 2. Prepare the PostgreSQL data

```sh title="In your project directory, run:"
```ddn title="In your project directory, run:"
ddn connector init my_pg -i
```

Expand Down Expand Up @@ -84,11 +84,11 @@ You can verify this worked by using Adminer to query all records from the `users
SELECT * FROM users;
```

```sh title="Next, use the CLI to introspect your PostgreSQL database:"
```ddn title="Next, use the CLI to introspect your PostgreSQL database:"
ddn connector introspect my_pg
```

```sh title="Now, track the table from your PostgreSQL database as a model in your DDN metadata:"
```ddn title="Now, track the table from your PostgreSQL database as a model in your DDN metadata:"
ddn models add my_pg users
```

Expand All @@ -102,7 +102,7 @@ Metadata Language file to represent the `users` table from PostgreSQL in your AP

<TabItem value="TypeScript" label="TypeScript">

```bash title="Run the following command:"
```ddn title="Run the following command:"
ddn connector init my_ts -i
```

Expand All @@ -116,7 +116,7 @@ the entrypoint for your connector.

<TabItem value="Python" label="Python">

```bash title="Run the following command:"
```ddn title="Run the following command:"
ddn connector init my_python -i
```

Expand All @@ -130,7 +130,7 @@ be the entrypoint for your connector.

<TabItem value="Go" label="Go">

```bash title="Run the following command:"
```ddn title="Run the following command:"
ddn connector init my_go -i
```

Expand Down Expand Up @@ -221,7 +221,7 @@ func FunctionShoutName(ctx context.Context, state *types.State, arguments *Upper

<TabItem value="TypeScript" label="TypeScript">

```bash title="Introspect the connector:"
```ddn title="Introspect the connector:"
ddn connector introspect my_ts
```

Expand All @@ -234,7 +234,7 @@ ddn command add my_ts shoutName

<TabItem value="Python" label="Python">

```bash title="Introspect the connector:"
```ddn title="Introspect the connector:"
ddn connector introspect my_python
```

Expand All @@ -247,7 +247,7 @@ ddn command add my_python shoutName

<TabItem value="Go" label="Go">

```bash title="Introspect the connector:"
```ddn title="Introspect the connector:"
ddn connector introspect my_go
```

Expand Down Expand Up @@ -284,15 +284,15 @@ definition:

## Step 7. Create a new build and test

```bash title="Create a new build:"
```ddn title="Create a new build:"
ddn supergraph build local
```

```bash title="Start your services:"
```ddn title="Start your services:"
ddn run docker-start
```

```bash title="Open your local console:"
```ddn title="Open your local console:"
ddn console --local
```

Expand Down
6 changes: 3 additions & 3 deletions docs/business-logic/tutorials/3-format-datetime-objects.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ below. You can adapt this recipe to fit your individual needs.**
To add your function, generate the related metadata that will link together any functions in your lambda connector's
source files and your API:

```bash
```ddn
ddn connector introspect <connector_name>
```

Then, you can generate an `hml` file for the function using the following command:

```bash
```ddn
ddn command add <connector_name> "*"
```

Expand Down Expand Up @@ -164,7 +164,7 @@ definition:

Create a new build of your supergraph:

```sh
```ddn
ddn supergraph build local
```

Expand Down
6 changes: 3 additions & 3 deletions docs/business-logic/tutorials/3-hash-passwords.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -135,21 +135,21 @@ across many systems.**
To add your function, generate the related metadata that will link together any functions in your lambda connector's
source files and your API:

```bash
```ddn
ddn connector introspect <connector_name>
```

Then, you can generate an `hml` file for the function using the following command:

```bash
```ddn
ddn command add <connector_name> "*"
```

### Step 3. Test your function

Create a new build of your supergraph:

```sh
```ddn
ddn supergraph build local
```

Expand Down
Loading