Skip to content
Merged
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
15 changes: 9 additions & 6 deletions content/guides/04.connect/6.sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ The Directus SDK is a "Composable Client" that allows you to customize and build
| `realtime()` | Adds `.connect()`, `.subscribe()`, `.sendMessage()`, and `.onWebSocket()` methods. Also adds reconnect logic. |
| `staticToken()` | Adds `.setToken()` and `.getToken()` methods for manually managing tokens. |

::tabs
::div{class="pr-6"}
::::tabs
:::div{class="pr-6"}
---
label: JavaScript
---
```js
import { createDirectus, rest } from '@directus/sdk';
const directus = createDirectus('http://directus.example.com').with(rest());
```
::
:::

::div{class="pr-6"}
:::div{class="pr-6"}
---
label: TypeScript
---
Expand All @@ -56,8 +56,10 @@ The Directus SDK is a "Composable Client" that allows you to customize and build
```

::callout{icon="i-lucide-graduation-cap" color="secondary" to="/tutorials/tips-and-tricks/advanced-types-with-the-directus-sdk"}
Learn how to create a Schema for SDK client creation.
::
Learn how to leverage TypeScript with the SDK for auto-completion and generated output types.
::
:::
::::


## Making Requests
Expand Down Expand Up @@ -135,6 +137,7 @@ To call custom endpoints using the SDK, you can manually provide a path and meth
method: 'GET',
}));
```
::
::

### GraphQL Usage
Expand Down
Loading