-
-
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.
Fixed: Ignore doesn't work with InputObjectTyp (#373)
- Loading branch information
1 parent
751c7d3
commit 3013699
Showing
7 changed files
with
143 additions
and
74 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
25 changes: 25 additions & 0 deletions
25
src/Types.Tests/Types/Descriptors/InputObjectTypeDescriptorDescriptors.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,25 @@ | ||
using Xunit; | ||
|
||
namespace HotChocolate.Types | ||
{ | ||
public class InputObjectTypeDescriptorDescriptors | ||
{ | ||
[Fact] | ||
public void Field_Ignore_PropertyIsExcluded() | ||
{ | ||
// arrange | ||
var descriptor = new InputObjectTypeDescriptor<SimpleInput>(); | ||
IInputObjectTypeDescriptor<SimpleInput> descriptorItf = descriptor; | ||
|
||
// act | ||
descriptorItf.Field(t => t.Id).Ignore(); | ||
|
||
// assert | ||
InputObjectTypeDescription description = | ||
descriptor.CreateDescription(); | ||
|
||
Assert.Collection(description.Fields, | ||
t => Assert.Equal("name", t.Name)); | ||
} | ||
} | ||
} |
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