Vale CMS Need more than a rule playground? Explore
Asset Explorer

GraphQL

The block and single-line descriptions in a GraphQL schema, read as Markdown.

view textfsmapi Vale ≥ 3.21.0 Source

Getting started

Save the file as config/views/GraphQL.yml under your StylesPath, then:

[*.{graphql,graphqls}]
BasedOnStyles = Vale

View = GraphQL

GraphQL.yml

Pull named scopes out of a file Vale can’t otherwise parse.
# A GraphQL schema: the descriptions before its types, fields, and
# arguments, block (`"""`) or single-line (`"`), read as Markdown.
#
#   [*.{graphql,graphqls}]
#   BasedOnStyles = Vale
#   View = GraphQL
engine: textfsm
template: |
  Value List Description (.*)

  Start
    ^\s*"""${Description}"""\s*$
    ^\s*"""\s*$ -> Block
    ^\s*"""${Description}$ -> Block
    ^\s*"${Description}"\s*$

  Block
    ^\s*"""\s*$ -> Start
    ^\s*${Description}"""\s*$ -> Start
    ^\s*${Description}
scopes:
  - name: description
    expr: Description
    type: md