Skip to content

Commit

Permalink
Move PromseOrDirect into interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie committed Nov 19, 2024
1 parent bdbe6ee commit f7ca1d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/website/graphile-config/middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ library):

```ts
import { Middleware, orderedApply, resolvePresets } from "graphile-config";
type PromiseOrDirect<T> = Promise<T> | T;

// Get the user's Graphile Config from somewhere, e.g.
import config from "./graphile.config.js";
Expand All @@ -194,6 +193,7 @@ import config from "./graphile.config.js";
const resolvedPreset = resolvePresets([config]);

/***** interfaces.ts *****/
export type PromiseOrDirect<T> = Promise<T> | T;

// Define the middlewares that you support, their event type and their return type
interface MyMiddleware {
Expand Down

0 comments on commit f7ca1d5

Please sign in to comment.