-
Notifications
You must be signed in to change notification settings - Fork 43
/
GraphQLDocument.cs
43 lines (36 loc) · 1.12 KB
/
GraphQLDocument.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
namespace GraphQLParser.AST;
/// <summary>
/// AST node for <see cref="ASTNodeKind.Document"/>.
/// </summary>
public class GraphQLDocument : ASTNode
{
internal GraphQLDocument()
{
Definitions = null!;
}
/// <summary>
/// Creates a new instance of <see cref="GraphQLDocument"/>.
/// </summary>
public GraphQLDocument(List<ASTNode> definitions)
{
Definitions = definitions;
}
/// <inheritdoc/>
public override ASTNodeKind Kind => ASTNodeKind.Document;
/// <summary>
/// All definitions in this document represented as a list of nested AST nodes.
/// </summary>
public List<ASTNode> Definitions { get; set; }
/// <summary>
/// Comments that have not been correlated to any AST node of GraphQL document.
/// </summary>
public List<List<GraphQLComment>>? UnattachedComments { get; set; }
/// <summary>
/// Input data from which this document was built.
/// </summary>
public ROM Source { get; set; }
}
internal sealed class GraphQLDocumentWithLocation : GraphQLDocument
{
public override GraphQLLocation Location { get; set; }
}