shopify_draft_proxy/graphql/token_kind

Mirrors graphql-js language/tokenKind.ts.

One variant per token kind the lexer emits. The string form (used in graphql-js for kind) is intentionally not encoded as a runtime value; callers pattern-match on the variant directly.

Types

pub type TokenKind {
  Sof
  Eof
  Bang
  Dollar
  Amp
  ParenL
  ParenR
  Dot
  Spread
  Colon
  Equals
  At
  BracketL
  BracketR
  BraceL
  Pipe
  BraceR
  Name
  Int
  Float
  String
  BlockString
  Comment
}

Constructors

  • Sof
  • Eof
  • Bang
  • Dollar
  • Amp
  • ParenL
  • ParenR
  • Dot
  • Spread
  • Colon
  • Equals
  • At
  • BracketL
  • BracketR
  • BraceL
  • Pipe
  • BraceR
  • Name
  • Int
  • Float
  • String
  • BlockString
  • Comment

Values

pub fn display(kind: TokenKind) -> String

Display string used by graphql-js error messages and printers.

pub fn is_punctuator(kind: TokenKind) -> Bool

True for punctuator kinds (graphql-js isPunctuatorTokenKind).

Search Document