Skip to content

Commit

Permalink
chore(docs): fix website build
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkuhrt committed Sep 16, 2024
1 parent 3fdbea6 commit f4dcbee
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions website/content/guides/10_overview/40_anyware.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,20 @@ Discriminated unions are used to model this in the input/output types flowing th
import { Graffle } from 'graffle'
// ---cut---
Graffle
.create({ schema: '...' })
.create({ schema: 'https://...' })
.anyware(async ({ encode }) => {
if (encode.input.interface === 'typed') {
// Do something here.
}

if (encode.input.transport === 'memory') {
// Do something here.
}

// etc.

return encode()
})
```

If Graffle is created with a URL for schema then it will automatically type `transport` as `http`. Conversely if you pass a GraphQL schema instance it will automatically type `transport` as `memory`.

## Hooks

### Encode
Expand Down

0 comments on commit f4dcbee

Please sign in to comment.