-
-
Notifications
You must be signed in to change notification settings - Fork 745
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for middleware on introspection fields (#962)
- Loading branch information
1 parent
89b0a5d
commit eb3ddf1
Showing
9 changed files
with
90 additions
and
4 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
9 changes: 9 additions & 0 deletions
9
.../__snapshots__/IntrospectionTests.FieldMiddlewareHasAnEffectOnIntrospectIfSwitchedOn.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"Data": { | ||
"__typename": "QUERY", | ||
"a": "A" | ||
}, | ||
"Extensions": {}, | ||
"Errors": [], | ||
"ContextData": {} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/Core/Types/Configuration/Contracts/FieldMiddlewareApplication.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,21 @@ | ||
namespace HotChocolate.Configuration | ||
{ | ||
/// <summary> | ||
/// This enum specified on which fields custom field | ||
/// middleware is applied to. | ||
/// </summary> | ||
public enum FieldMiddlewareApplication : byte | ||
{ | ||
/// <summary> | ||
/// Custom field middleware is only applied to | ||
/// user-defined fields and not to introspection fields. | ||
/// </summary> | ||
UserDefinedFields = 0, | ||
|
||
/// <summary> | ||
/// Custom field middleware is applied to all fields | ||
/// (user-defined fields and introspection fields). | ||
/// </summary> | ||
AllFields = 1 | ||
} | ||
} |
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
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