-
-
Notifications
You must be signed in to change notification settings - Fork 748
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to enumerate variables (#2833)
- Loading branch information
1 parent
62af860
commit 6b21001
Showing
19 changed files
with
136 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/HotChocolate/Core/src/Abstractions/Execution/VariableValue.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System; | ||
using HotChocolate.Language; | ||
using HotChocolate.Types; | ||
|
||
namespace HotChocolate.Execution | ||
{ | ||
/// <summary> | ||
/// Represents a variable value. | ||
/// </summary> | ||
public readonly struct VariableValue | ||
{ | ||
public VariableValue(NameString name, IInputType type, IValueNode value) | ||
{ | ||
Name = name.EnsureNotEmpty(nameof(name)); | ||
Type = type ?? throw new ArgumentNullException(nameof(type)); | ||
Value = value ?? throw new ArgumentNullException(nameof(value)); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the variable name. | ||
/// </summary> | ||
public NameString Name { get; } | ||
|
||
/// <summary> | ||
/// Gets the variable type. | ||
/// </summary> | ||
public IInputType Type { get; } | ||
|
||
/// <summary> | ||
/// Gets the variable value. | ||
/// </summary> | ||
public IValueNode Value { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.