Skip to content

Commit a73a1e0

Browse files
committed
parser: Export Parser class as unstable API
Replicates graphql/graphql-js@a9a095e
1 parent 838da6d commit a73a1e0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/graphql/language/parser.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,16 @@ def parse_type(
157157

158158

159159
class Parser:
160+
"""GraphQL AST parser.
161+
162+
This class is exported only to assist people in implementing their own parsers
163+
without duplicating too much code and should be used only as last resort for cases
164+
such as experimental syntax or if certain features couldn't be contributed upstream.
165+
166+
It's still part of the internal API and is versioned, so any changes to it are never
167+
considered breaking changes. If you still need to support multiple versions of the
168+
library, please use the `__version_info__` variable for version detection.
169+
"""
160170

161171
_lexer: Lexer
162172
_no_Location: bool

0 commit comments

Comments
 (0)