Skip to content

Commit

Permalink
Add preview for HCv12 (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccallum authored Aug 13, 2021
1 parent 5bd36af commit 91f6e04
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<PackageIconUrl>https://github.com/benmccallum/fairybread/raw/master/logo-400x400.png</PackageIconUrl>
<PackageLicenseUrl>https://github.com/benmccallum/fairybread/blob/master/LICENSE</PackageLicenseUrl>

<Version>7.0.0</Version>
<Version>8.0.0-preview.1</Version>

<HotChocolateVersion>11.0.9</HotChocolateVersion>
<HotChocolateVersion>12.0.0-preview.29</HotChocolateVersion>

<LibraryTargetFrameworks>net5.0; netcoreapp3.1; netstandard2.0</LibraryTargetFrameworks>
<TestTargetFrameworks>net5.0; netcoreapp3.1; netcoreapp2.1</TestTargetFrameworks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,111 @@
$type: Exception,
Type: Exception,
Message: No validators were found by FairyBread. Ensure you're registering your FluentValidation validators for DI.
},
SyntaxNode: {
Kind: Field,
Arguments: [
{
Kind: Argument,
Location: {
Start: 13,
End: 59,
Line: 1,
Column: 14
},
Name: {
Location: {
Start: 13,
End: 17,
Line: 1,
Column: 14
},
Value: foo
},
Value: {
Kind: ObjectValue,
Location: {
Start: 18,
End: 59,
Line: 1,
Column: 19
},
Fields: [
{
Kind: ObjectField,
Location: {
Start: 20,
End: 47,
Line: 1,
Column: 21
},
Name: {
Location: {
Start: 20,
End: 32,
Line: 1,
Column: 21
},
Value: someInteger
},
Value: {
Kind: IntValue,
Location: {
Start: 33,
End: 47,
Line: 1,
Column: 34
},
Value: -1
}
},
{
Kind: ObjectField,
Location: {
Start: 37,
End: 58,
Line: 1,
Column: 38
},
Name: {
Location: {
Start: 37,
End: 48,
Line: 1,
Column: 38
},
Value: someString
},
Value: {
Kind: StringValue,
Location: {
Start: 49,
End: 58,
Line: 1,
Column: 50
},
Value: hello
}
}
]
}
}
],
Location: {
Start: 8,
End: 61,
Line: 1,
Column: 9
},
Name: {
Location: {
Start: 8,
End: 13,
Line: 1,
Column: 9
},
Value: read
}
}
}
]
Expand Down
4 changes: 3 additions & 1 deletion src/FairyBread/ValidationMiddlewareInjector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ public override void OnBeforeCompleteType(
.Create<ValidationMiddleware>();
}

fieldDef.MiddlewareComponents.Insert(0, _validationFieldMiddleware);
fieldDef.MiddlewareDefinitions.Insert(
0,
new FieldMiddlewareDefinition(_validationFieldMiddleware));
}
}
}
Expand Down

0 comments on commit 91f6e04

Please sign in to comment.