Skip to content

Commit d3bed17

Browse files
committed
add getter for the types.Schema field
This additive function shouldn't break backward compatibility will allow those who want access to the types to get at an AST version of the `types.Schema`
1 parent bf0a0cc commit d3bed17

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

graphql.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ type Schema struct {
8383
subscribeResolverTimeout time.Duration
8484
}
8585

86+
func (s *Schema) ASTSchema() *types.Schema {
87+
return s.schema
88+
}
89+
8690
// SchemaOpt is an option to pass to ParseSchema or MustParseSchema.
8791
type SchemaOpt func(*Schema)
8892

0 commit comments

Comments
 (0)