-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v1 at setting up errors and middleware
- Loading branch information
1 parent
a6f49b3
commit 8674430
Showing
37 changed files
with
1,271 additions
and
20 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
32 changes: 32 additions & 0 deletions
32
...ryBread.Tests/MutationConventionsTests.Doesnt_Call_Field_Resolver_If_Invalid.verified.txt
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,32 @@ | ||
{ | ||
Errors: [ | ||
{ | ||
Message: 'Some Integer' must be equal to '1'., | ||
Code: FairyBread_ValidationError, | ||
Path: { | ||
Name: someResolver, | ||
Parent: { | ||
IsRoot: true | ||
}, | ||
Length: 1, | ||
IsRoot: false | ||
}, | ||
Extensions: { | ||
argumentName: foo, | ||
attemptedValue: -1, | ||
code: FairyBread_ValidationError, | ||
errorCode: EqualValidator, | ||
errorMessage: 'Some Integer' must be equal to '1'., | ||
formattedMessagePlaceholderValues: { | ||
ComparisonProperty: , | ||
ComparisonValue: 1, | ||
PropertyName: Some Integer, | ||
PropertyValue: -1 | ||
}, | ||
propertyName: SomeInteger, | ||
severity: Error, | ||
validatorName: FooInputDtoValidator | ||
} | ||
} | ||
] | ||
} |
5 changes: 5 additions & 0 deletions
5
src/FairyBread.Tests/MutationConventionsTests.Ignores_Null_Argument_Value.verified.txt
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,5 @@ | ||
{ | ||
Data: { | ||
read: SomeInteger: 1, SomeString: hello; | ||
} | ||
} |
98 changes: 98 additions & 0 deletions
98
...read.Tests/MutationConventionsTests.Multi_TopLevelFields_And_MultiRuns_Works.verified.txt
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,98 @@ | ||
{ | ||
result1: { | ||
Errors: [ | ||
{ | ||
Message: 'Some Integer' must be equal to '1'., | ||
Code: FairyBread_ValidationError, | ||
Path: { | ||
Name: read, | ||
Parent: { | ||
IsRoot: true | ||
}, | ||
Length: 1, | ||
IsRoot: false | ||
}, | ||
Extensions: { | ||
argumentName: foo, | ||
attemptedValue: -1, | ||
code: FairyBread_ValidationError, | ||
errorCode: EqualValidator, | ||
errorMessage: 'Some Integer' must be equal to '1'., | ||
formattedMessagePlaceholderValues: { | ||
ComparisonProperty: , | ||
ComparisonValue: 1, | ||
PropertyName: Some Integer, | ||
PropertyValue: -1 | ||
}, | ||
propertyName: SomeInteger, | ||
severity: Error, | ||
validatorName: FooInputDtoValidator | ||
} | ||
} | ||
] | ||
}, | ||
result2: { | ||
Errors: [ | ||
{ | ||
Message: 'Some Integer' must be equal to '1'., | ||
Code: FairyBread_ValidationError, | ||
Path: { | ||
Name: read, | ||
Parent: { | ||
IsRoot: true | ||
}, | ||
Length: 1, | ||
IsRoot: false | ||
}, | ||
Extensions: { | ||
argumentName: foo, | ||
attemptedValue: -1, | ||
code: FairyBread_ValidationError, | ||
errorCode: EqualValidator, | ||
errorMessage: 'Some Integer' must be equal to '1'., | ||
formattedMessagePlaceholderValues: { | ||
ComparisonProperty: , | ||
ComparisonValue: 1, | ||
PropertyName: Some Integer, | ||
PropertyValue: -1 | ||
}, | ||
propertyName: SomeInteger, | ||
severity: Error, | ||
validatorName: FooInputDtoValidator | ||
} | ||
} | ||
] | ||
}, | ||
result3: { | ||
Errors: [ | ||
{ | ||
Message: 'Some Integer' must be equal to '1'., | ||
Code: FairyBread_ValidationError, | ||
Path: { | ||
Name: read, | ||
Parent: { | ||
IsRoot: true | ||
}, | ||
Length: 1, | ||
IsRoot: false | ||
}, | ||
Extensions: { | ||
argumentName: foo, | ||
attemptedValue: -1, | ||
code: FairyBread_ValidationError, | ||
errorCode: EqualValidator, | ||
errorMessage: 'Some Integer' must be equal to '1'., | ||
formattedMessagePlaceholderValues: { | ||
ComparisonProperty: , | ||
ComparisonValue: 1, | ||
PropertyName: Some Integer, | ||
PropertyValue: -1 | ||
}, | ||
propertyName: SomeInteger, | ||
severity: Error, | ||
validatorName: FooInputDtoValidator | ||
} | ||
} | ||
] | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/FairyBread.Tests/MutationConventionsTests.Mutation_Works_caseData=1.verified.txt
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,5 @@ | ||
{ | ||
Data: { | ||
write: SomeInteger: 1, SomeString: hello; EmailAddress: [email protected] | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
src/FairyBread.Tests/MutationConventionsTests.Mutation_Works_caseData=2.verified.txt
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,32 @@ | ||
{ | ||
Errors: [ | ||
{ | ||
Message: 'Some Integer' must be equal to '1'., | ||
Code: FairyBread_ValidationError, | ||
Path: { | ||
Name: write, | ||
Parent: { | ||
IsRoot: true | ||
}, | ||
Length: 1, | ||
IsRoot: false | ||
}, | ||
Extensions: { | ||
argumentName: foo, | ||
attemptedValue: -1, | ||
code: FairyBread_ValidationError, | ||
errorCode: EqualValidator, | ||
errorMessage: 'Some Integer' must be equal to '1'., | ||
formattedMessagePlaceholderValues: { | ||
ComparisonProperty: , | ||
ComparisonValue: 1, | ||
PropertyName: Some Integer, | ||
PropertyValue: -1 | ||
}, | ||
propertyName: SomeInteger, | ||
severity: Error, | ||
validatorName: FooInputDtoValidator | ||
} | ||
} | ||
] | ||
} |
30 changes: 30 additions & 0 deletions
30
src/FairyBread.Tests/MutationConventionsTests.Mutation_Works_caseData=3.verified.txt
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,30 @@ | ||
{ | ||
Errors: [ | ||
{ | ||
Message: The specified condition was not met for 'Email Address'., | ||
Code: FairyBread_ValidationError, | ||
Path: { | ||
Name: write, | ||
Parent: { | ||
IsRoot: true | ||
}, | ||
Length: 1, | ||
IsRoot: false | ||
}, | ||
Extensions: { | ||
argumentName: bar, | ||
attemptedValue: -1, | ||
code: FairyBread_ValidationError, | ||
errorCode: AsyncPredicateValidator, | ||
errorMessage: The specified condition was not met for 'Email Address'., | ||
formattedMessagePlaceholderValues: { | ||
PropertyName: Email Address, | ||
PropertyValue: -1 | ||
}, | ||
propertyName: EmailAddress, | ||
severity: Error, | ||
validatorName: BarInputDtoAsyncValidator | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.