Skip to content

Commit 64d2a22

Browse files
committed
feat(docs): Add note about gql import in ESM apps
1 parent 96c565d commit 64d2a22

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/docs/directives.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,11 @@ const requireAuth = createValidatorDirective(schema, validate)
159159
export default requireAuth
160160
```
161161

162-
All Redwood apps come with two built-in validator directives: `@requireAuth` and `@skipAuth`.
162+
(Note that the `gql` import should be `import { gql } from 'graphql-tag'` in
163+
apps that use ESM)
164+
165+
All Cedar apps come with two built-in validator directives: `@requireAuth` and
166+
`@skipAuth`.
163167
The `@requireAuth` directive takes optional roles.
164168
You may use these to protect against unwanted GraphQL access to your data.
165169
Or explicitly allow public access.

0 commit comments

Comments
 (0)