Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds descriptions to @requireAuth @skipAuth directives and its generator templates #3435

Merged
merged 2 commits into from
Sep 28, 2021

Conversation

dthyresson
Copy link
Contributor

@dthyresson dthyresson commented Sep 27, 2021

Descriptions help document the GraphQL schema.

This PR adds comments to the built-in @requireAtuh and @skipAuth directives and also adds some boilerplate that can be edited for custom validator and transformer templates.

These use string literals ie (""").

You can see the descriptions when introspecting the schema docs, seen here:

image

Note: Similar descriptions could be added to

  • Redwood types

image

  • SDL generators for Types and Query/Mutations

FYI: Descriptions like these appear in the schema. A comment (#) is a comment, but not shared when introspecting the schema.

@dthyresson dthyresson self-assigned this Sep 27, 2021
@dthyresson dthyresson requested a review from dac09 September 27, 2021 14:09
@dthyresson dthyresson changed the title Adds comments to @requireAuth @skipAuth directives and its generator templates Adds descriptions to @requireAuth @skipAuth directives and its generator templates Sep 27, 2021
Copy link
Contributor

@thedavidprice thedavidprice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GTG

@dthyresson please loop in @dac09 if still required. Otherwise please merge and I'll add to RC branch.

@thedavidprice thedavidprice merged commit 4c10083 into redwoodjs:main Sep 28, 2021
@redwoodjs-bot redwoodjs-bot bot added this to the next-release milestone Sep 28, 2021
@thedavidprice thedavidprice modified the milestones: next-release, v0.37.0 Sep 29, 2021
thedavidprice added a commit that referenced this pull request Sep 29, 2021
Co-authored-by: David Price <thedavid@thedavidprice.com>
dac09 added a commit that referenced this pull request Sep 29, 2021
…rl-config

* 'main' of github.com:redwoodjs/redwood:
  Add core-js to codemods dep for polyfills (#3448)
  add missing prepublish script (#3445)
  add missing deps (#3444)
  Remove codemods dependency on @redwoodjs/internal (#3443)
  Revert "add missing dep (#3441)" (#3442)
  add missing dep (#3441)
  Add @redwoodjs/codemods (#3411)
  Fix gitpod port forwarding (#3434)
  Re-vamp Redwood splash-page (#3183)
  Adds comments to directives and its templates (#3435)
  Readme updates to introduction technologies for GraphQL (#3433)
@dthyresson dthyresson deleted the dt-directive-comments branch December 23, 2021 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants