Closed nightroman closed 1 year ago
P.S.
(1) The downstream GraphQL service is not HotChocolate.
(2) Not sure if it is useful, some more error details from the debugger:
- [0] {{
"message": "The argument `roles` value type is wrong.",
"code": "TS_ARG_VALUE_TYPE_WRONG",
"extensions": {
"Source": "internal_url"
}
}} HotChocolate.ISchemaError {HotChocolate.SchemaErrorBuilder.Error}
Code "TS_ARG_VALUE_TYPE_WRONG" string
+ Exception null System.Exception
+ Extensions Count = 1 System.Collections.Immutable.ImmutableDictionary<string, object>
Message "The argument `roles` value type is wrong." string
Path null System.Collections.Generic.IReadOnlyCollection<object>
+ SyntaxNodes Count = 1 System.Collections.Immutable.ImmutableList<HotChocolate.Language.ISyntaxNode>
+ TypeSystemObject {HotChocolate.Types.DirectiveType} HotChocolate.Types.ITypeSystemObject {HotChocolate.Types.DirectiveType}
+ Static members
+ Non-Public members
Do these "problematic" custom directives have any effect in the stitched result schema? It seems all works fine if I simply remove them from the used schema snapshot. Do you think it is a possible workaround?
A little sad this regression was rescheduled...
We have a certain amount of time to invest and things get moved. It might get moved two or three more times. You can always help and fix it, its open source.
@michaelstaib I wish I could...
On that note. I tried in the past and gave up due to the failing build.
So I've got the latest today, and ran build.ps1
as suggested. As a result, the build fails:
╬════════════
║ Compile
╬═══
NullReferenceException: Object reference not set to an instance of an object.
at Build.<get_Compile>b__8_2(DotNetBuildSettings c) in C:\-\ChilliCream\hotchocolate\.build\Build.cs:line 66
at Nuke.Common.Tools.DotNet.DotNetTasks.DotNetBuild(Configure`1 configurator)
at Build.<get_Compile>b__8_1() in C:\-\ChilliCream\hotchocolate\.build\Build.cs:line 66
at Nuke.Common.Execution.BuildExecutor.<>c.<Execute>b__4_2(Action x)
at Nuke.Common.Utilities.Collections.EnumerableExtensions.ForEach[T](IEnumerable`1 enumerable, Action`1 action)
at Nuke.Common.Execution.BuildExecutor.Execute(NukeBuild build, ExecutableTarget target, IReadOnlyCollection`1 previouslyExecutedTargets, Boolean failureMode)
═══════════════════════════════════════
Target Status Duration
───────────────────────────────────────
Restore Succeeded 0:50
Compile Failed < 1sec // NullReferenceException: Object reference not set to an instance of an object.
───────────────────────────────────────
Total 0:50
═══════════════════════════════════════
Build failed on 2021-11-22 12:37:12. (╯°□°))╯︵︵ ┻━┻
I cannot reproduce this neither on windows nor macOS, @tobias-tengler can you?
try build.cmd restore
instead of the full build. There seems to be an issue when doing this on a fresh windows...
The core team do all work on macOS or linux.
I will update the contribution file since the full build is not even needed on windows since the build agents run on linux as well.
the restore command will create you the All.sln
which can be opened in visual studio. You will need .net6 and vscode, vs2022, rider 2021.3 EAP. For VSCode we have all the smaller solutions. I mostly use vscode but it's up to you.
The contribution Guidelines are now updated: https://github.com/ChilliCream/hotchocolate/blob/main/CONTRIBUTING.md
@michaelstaib michaelstaib assigned nightroman 44 minutes ago
Hmm. Please reassign back. My "I wish I could..." did not mean "I am taking it if I know how to build".
I will try to look at it regardless. But my commitment does not qualify for assigning for this regression.
@michaelstaib I still cannot build the whole All.sln but fortunately I can build and run some tests in HotChocolate.Stitching.sln I will describe (today or tomorrow) what to do in one of your tests, in order to repro the bug, and all the details. The nature of why it goes the error path is beyond my familiarity with HC. This is all I can do at this moment, but it's some fair help from me.
AboutDirectiveIssue4400.graphql.zip
Steps to reproduce in stitching tests
Copy the attached schema AboutDirectiveIssue4400.graphql
to src\HotChocolate\Stitching\test\Stitching.Tests\__resources__
Open src\HotChocolate\Stitching\HotChocolate.Stitching.sln
in Visual Studio
Open src/HotChocolate/Stitching/test/Stitching.Tests/Integration/RewriteTypesTests.cs
Go to the test method AutoMerge_Schema
.
Replace the first added schema file name with with AboutDirectiveIssue4400.graphql
.AddRemoteSchemaFromString(
"AdvisorClient",
FileResource.Open("AboutDirectiveIssue4400.graphql"))
Set the breakpoint in src\HotChocolate\Core\src\Types\Types\DirectiveCollection.cs
, line 140 (see >>>>
below):
private void ValidateArguments(ITypeCompletionContext context, Directive directive)
{
...
if (!arg.Type.IsInstanceOfType(argument.Value))
{
>>>> context.ReportError(
DirectiveCollection_ArgumentValueTypeIsWrong(
directive.Type,
context.Type,
directive.ToNode(),
_source,
arg.Name));
}
}
...
Start the test AutoMerge_Schema
with debugging. The break point is triggered before throwing the error.
The condition causing the error (false) is due to the following values:
arg.Type
type is HotChocolate.Types.IInputType {HotChocolate.Types.NonNullType}
argument.Value
type is HotChocolate.Language.IValueNode {HotChocolate.Language.ListValueNode}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Dear stale bot, could you please fix this? v12.8.2 shows the same issue.
🤣
Rob Barton @.***
On Wed, 4 May 2022, 12:31 Roman Kuzmin, @.***> wrote:
Dear stale bot, could you please fix this? v12.8.2 shows the same issue.
— Reply to this email directly, view it on GitHub https://github.com/ChilliCream/hotchocolate/issues/4400#issuecomment-1117203765, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASA7PMGENGXFZYSSLTD6UDTVIJN2NANCNFSM5HXAAXGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
HotChocolate.Stitching is now in legacy mode and is replaced by HotChocolate.Fusion. I am closing this issue as we essentially froze the fusion code.
You can join the preview of Hot Chocolate Fusion now on Slack
Is there an existing issue for this?
Describe the bug
HC12 gateway problem with directives, works in HC11
HC12GatewayDirective.zip
Please find attached the following projects:
GatewayHC11
- trivial gateway with one added schema, works fine with HC 11.2.2GatewayHC12
- the same with HC 12.1, fails on loading the schemaOn starting
GatewayHC12
it fails with:GatewayHC11
works fine, i.e. https://localhost:8001/graphql/ shows the schema and this dummy queryis called successfully with the expected error due to the fake token in this sample.
The problematic directives:
Apparently in HC12 each use of these directives causes an error.
Steps to reproduce
Please see the description and the attached projects for v11 and v12.
Relevant log output
No response
Additional Context?
No response
Product
Hot Chocolate
Version
12.1