py_gql.lang.token#

All the valid source tokens found in GraphQL documents (as described in this document) are encoded as instances of Token.

class py_gql.lang.token.Token(start, end, value)[source]#

Bases: object

Base token class.

All token instances can be compared by simple equality.

start#

Starting position for this token (0-indexed)

Type

int

end#

End position for this token (0-indexed)

Type

int

value#

Characters making up this token

Type

str

Parameters
  • start (int) – Starting position for this token (0-indexed)

  • end (int) – End position for this token (0-indexed)

  • value (str) – Characters making up this token

class py_gql.lang.token.SOF(start, end)[source]#

Bases: py_gql.lang.token.ConstToken

class py_gql.lang.token.EOF(start, end)[source]#

Bases: py_gql.lang.token.ConstToken

class py_gql.lang.token.ExclamationMark(start, end)[source]#

Bases: py_gql.lang.token.ConstToken

class py_gql.lang.token.Dollar(start, end)[source]#

Bases: py_gql.lang.token.ConstToken

class py_gql.lang.token.ParenOpen(start, end)[source]#

Bases: py_gql.lang.token.ConstToken

class py_gql.lang.token.ParenClose(start, end)[source]#

Bases: py_gql.lang.token.ConstToken

class py_gql.lang.token.BracketOpen(start, end)[source]#

Bases: py_gql.lang.token.ConstToken

class py_gql.lang.token.BracketClose(start, end)[source]#

Bases: py_gql.lang.token.ConstToken

class py_gql.lang.token.CurlyOpen(start, end)[source]#

Bases: py_gql.lang.token.ConstToken

class py_gql.lang.token.CurlyClose(start, end)[source]#

Bases: py_gql.lang.token.ConstToken

class py_gql.lang.token.Colon(start, end)[source]#

Bases: py_gql.lang.token.ConstToken

class py_gql.lang.token.Equals(start, end)[source]#

Bases: py_gql.lang.token.ConstToken

class py_gql.lang.token.At(start, end)[source]#

Bases: py_gql.lang.token.ConstToken

class py_gql.lang.token.Pipe(start, end)[source]#

Bases: py_gql.lang.token.ConstToken

class py_gql.lang.token.Ampersand(start, end)[source]#

Bases: py_gql.lang.token.ConstToken

class py_gql.lang.token.Ellip(start, end)[source]#

Bases: py_gql.lang.token.ConstToken

class py_gql.lang.token.Integer(start, end, value)[source]#

Bases: py_gql.lang.token.Token

class py_gql.lang.token.Float(start, end, value)[source]#

Bases: py_gql.lang.token.Token

class py_gql.lang.token.Name(start, end, value)[source]#

Bases: py_gql.lang.token.Token

class py_gql.lang.token.String(start, end, value)[source]#

Bases: py_gql.lang.token.Token

class py_gql.lang.token.BlockString(start, end, value)[source]#

Bases: py_gql.lang.token.Token