Skip to content

Commit

Permalink
docs: Add dataloader import for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
mschipperheyn committed Dec 22, 2024
1 parent 233de82 commit 7d596b2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/docs/guides/developer-guide/dataloaders/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export const shopApiExtensions = gql`
**Dataloader skeleton**

```ts title="src/plugins/my-plugin/api/datalaoder.ts"
import DataLoader from 'dataloader'

const LoggerCtx = 'SubscriptionDataloaderService'

@Injectable({ scope: Scope.REQUEST }) // Important! Dataloaders live at the request level
Expand Down

0 comments on commit 7d596b2

Please sign in to comment.