Skip to content

Commit

Permalink
docs: add context to scope-auth plugin ordering relative to relay
Browse files Browse the repository at this point in the history
Fixes hayes#708
  • Loading branch information
TLadd committed Feb 8, 2023
1 parent 42814c3 commit 5464754
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
3 changes: 0 additions & 3 deletions packages/deno/packages/migration/mod.ts

This file was deleted.

3 changes: 0 additions & 3 deletions packages/deno/packages/plugin-add-graphql/mod.ts

This file was deleted.

7 changes: 5 additions & 2 deletions packages/deno/packages/plugin-scope-auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ yarn add @pothos/plugin-scope-auth

#### IMPORTANT

When using `scope-auth` with other plugins, make sure that the `scope-auth` plugin is listed first
to ensure that other plugins that wrap resolvers do not execute first.
When using `scope-auth` with other plugins, the `scope-auth` plugin should generally be listed first
to ensure that other plugins that wrap resolvers do not execute before the `scope-auth` logic.
However, exceptions do exist where it is desirable for a plugin to run before `scope-auth`. For
instance, putting the [relay plugin](https://pothos-graphql.dev/docs/plugins/relay) before the
`scope-auth` plugin results in the `authScopes` function correctly receiving parsed `globalID`s.

### Setup

Expand Down
7 changes: 5 additions & 2 deletions packages/plugin-scope-auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ yarn add @pothos/plugin-scope-auth

#### IMPORTANT

When using `scope-auth` with other plugins, make sure that the `scope-auth` plugin is listed first
to ensure that other plugins that wrap resolvers do not execute first.
When using `scope-auth` with other plugins, the `scope-auth` plugin should generally be listed first
to ensure that other plugins that wrap resolvers do not execute before the `scope-auth` logic.
However, exceptions do exist where it is desirable for a plugin to run before `scope-auth`. For
instance, putting the [relay plugin](https://pothos-graphql.dev/docs/plugins/relay) before the
`scope-auth` plugin results in the `authScopes` function correctly receiving parsed `globalID`s.

### Setup

Expand Down
7 changes: 5 additions & 2 deletions website/pages/docs/plugins/scope-auth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ yarn add @pothos/plugin-scope-auth

#### IMPORTANT

When using `scope-auth` with other plugins, make sure that the `scope-auth` plugin is listed first
to ensure that other plugins that wrap resolvers do not execute first.
When using `scope-auth` with other plugins, the `scope-auth` plugin should generally be listed first
to ensure that other plugins that wrap resolvers do not execute before the `scope-auth` logic.
However, exceptions do exist where it is desirable for a plugin to run before `scope-auth`. For
instance, putting the [relay plugin](https://pothos-graphql.dev/docs/plugins/relay) before the
`scope-auth` plugin results in the `authScopes` function correctly receiving parsed `globalID`s.

### Setup

Expand Down

0 comments on commit 5464754

Please sign in to comment.