-
-
Notifications
You must be signed in to change notification settings - Fork 749
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into http-version-default
- Loading branch information
Showing
881 changed files
with
1,297 additions
and
1,086 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...Authorization.Tests/__snapshots__/AuthorizationHandlerTests.Authorize_PolicyNotFound.snap
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
2 changes: 1 addition & 1 deletion
2
...__snapshots__/HttpGetSchemaMiddlewareTests.Download_GraphQL_Types_SDL_Type_Not_Found.snap
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 |
---|---|---|
@@ -1 +1 @@ | ||
{"errors":[{"message":"The type \u0060Xyz\u0060 does not exist.","extensions":{"typeName":"Xyz","code":"HC0060"}}]} | ||
{"errors":[{"message":"The type `Xyz` does not exist.","extensions":{"typeName":"Xyz","code":"HC0060"}}]} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
using System; | ||
|
||
namespace HotChocolate.Validation; | ||
|
||
/// <summary> | ||
/// Represents a pair of field infos. | ||
/// </summary> | ||
public readonly struct FieldInfoPair : IEquatable<FieldInfoPair> | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of <see cref="FieldInfoPair"/>. | ||
/// </summary> | ||
/// <param name="fieldA"> | ||
/// The first field info. | ||
/// </param> | ||
/// <param name="fieldB"> | ||
/// The second field info. | ||
/// </param> | ||
public FieldInfoPair(FieldInfo fieldA, FieldInfo fieldB) | ||
{ | ||
FieldA = fieldA; | ||
FieldB = fieldB; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the first field info. | ||
/// </summary> | ||
public FieldInfo FieldA { get; } | ||
|
||
/// <summary> | ||
/// Gets the second field info. | ||
/// </summary> | ||
public FieldInfo FieldB { get; } | ||
|
||
/// <summary> | ||
/// Compares this field info pair to another field info pair. | ||
/// </summary> | ||
/// <param name="other"> | ||
/// The other field info pair. | ||
/// </param> | ||
/// <returns> | ||
/// <c>true</c> if the field info pairs are equal. | ||
/// </returns> | ||
public bool Equals(FieldInfoPair other) | ||
=> FieldA.Equals(other.FieldA) && FieldB.Equals(other.FieldB); | ||
|
||
/// <summary> | ||
/// Compares this field info pair to another object. | ||
/// </summary> | ||
/// <param name="obj"> | ||
/// The other object. | ||
/// </param> | ||
/// <returns> | ||
/// <c>true</c> if the field info pairs are equal. | ||
/// </returns> | ||
public override bool Equals(object? obj) | ||
=> obj is FieldInfoPair other && Equals(other); | ||
|
||
/// <summary> | ||
/// Returns the hash code for this field info pair. | ||
/// </summary> | ||
/// <returns> | ||
/// The hash code for this field info pair. | ||
/// </returns> | ||
public override int GetHashCode() | ||
=> HashCode.Combine(FieldA, FieldB); | ||
} |
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.