Sha256: c4fe2a0ae766e0d835dfc2cc4571a6285a983d2be3fad49d5786555c88bbafa7
Contents?: true
Size: 758 Bytes
Versions: 2
Compression:
Stored size: 758 Bytes
Contents
## GraphQL::Stitching::Document A `Document` wraps a parsed GraphQL request, and handles the logistics of extracting its appropriate operation, variable definitions, and fragments. A `Document` should be built once for a request and passed through to other stitching components that utilize document information. ```ruby query = "query FetchMovie($id: ID!) { movie(id:$id) { id genre } }" document = GraphQL::Stitching::Document.new(query, operation_name: "FetchMovie") document.ast # parsed AST via GraphQL.parse document.string # normalized printed string document.digest # SHA digest of the normalized string document.variables # mapping of variable names to type definitions document.fragments # mapping of fragment names to fragment definitions ```
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
graphql-stitching-0.1.0 | docs/document.md |
graphql-stitching-0.0.1 | docs/document.md |