Documentation
¶
Overview ¶
Package graphql implements a GraphQL schema parser.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GraphQLLexer = lexer.MustSimple([]lexer.SimpleRule{
{"Whitespace", `[ \t\r\n]+`},
{"Comment", `#[^\n]*`},
{"String", `"[^"]*" `},
{"Ident", `[A-Za-z_][A-Za-z0-9_]*`},
{"Number", `-?[0-9]+(\.[0-9]+)?`},
{"Symbol", `[()\[\]{}:,|]`},
{"Operator", `[=!@&]`},
})
GraphQLLexer defines the GraphQL lexer configuration.
Functions ¶
This section is empty.
Types ¶
type FieldDefinition ¶
FieldDefinition represents a GraphQL field definition.
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser implements a GraphQL schema parser.
func (*Parser) ParseSchema ¶
ParseSchema parses a GraphQL schema and returns a catalog.
type Schema ¶
type Schema struct {
Types []*TypeDefinition `@@*`
}
Schema represents a parsed GraphQL schema.
type TypeDefinition ¶
type TypeDefinition struct {
Name string `@("type" @Ident)`
Fields []*FieldDefinition `"{" @@+ "}"`
}
TypeDefinition represents a GraphQL type definition.
Click to show internal directories.
Click to hide internal directories.