File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -15,15 +15,19 @@ The GraphQL AST structure is very similar to ESTree structure, but there are a f
15
15
Here's a list of changes that the parser performs, in order to make the GraphQL AST compatible with ESTree:
16
16
17
17
** Problem** : GraphQL uses ` kind ` field to define the kind of the AST node, while ESTree uses ` type ` .
18
+
18
19
** Solution** : The parser adds ` type ` field on each node, and just copies the value from ` kind ` field.
19
20
20
21
** Problem** : Some GraphQL AST nodes are using ` type ` field (which conflicts with the ESTree kind).
22
+
21
23
** Solution** : AST nodes that has ` type ` field are being transformed, and the ` type ` field changes to ` gqlType ` .
22
24
23
25
** Problem** : GraphQL AST structure allows circular JSON links (while ESTree might fail on ` Maximum call stack exceeded ` ).
26
+
24
27
** Solution** : The parser removes circular JSONs (specifically around GraphQL ` Location ` and the ` Lexer ` )
25
28
26
29
** Problem** : GraphQL uses ` location ` field to store the AST locations, while ESTree also uses it in a different structure.
30
+
27
31
** Solution** : The parser creates a new ` location ` field that is compatible with ESTree, and renames the GraphQL ` location ` to ` gqlLocation ` .
28
32
29
33
### Loading GraphQL Schema
You can’t perform that action at this time.
0 commit comments