Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ CCPA
chillicream
Codespaces
colocated
csclient
combinators
contentfiles
Contoso
conv
CQRS
creds
csclient
CUST
dataloaders
debuggable
Expand Down Expand Up @@ -224,6 +224,7 @@ vsix
VXNlcjox
websockets
Wilhuff
worklist
Wunder
xact
xunit
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using HotChocolate.Fusion.Collections;
using HotChocolate.Fusion.Satisfiability;

namespace HotChocolate.Fusion.Extensions;

internal static class PathNodeExtensions
{
extension(PathNode? path)
{
public bool ContainsItem(SatisfiabilityPathItem item)
{
for (var node = path; node is not null; node = node.Parent)
{
if (node.Item == item)
{
return true;
}
}

return false;
}

public string ToPathString()
{
if (path is null)
{
return string.Empty;
}

var items = new List<SatisfiabilityPathItem>();

for (var node = path; node is not null; node = node.Parent)
{
items.Add(node.Item);
}

items.Reverse();

return string.Join(" -> ", items);
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,6 @@
<data name="SatisfiabilityValidator_CycleDetected" xml:space="preserve">
<value>Cycle detected: {0} -&gt; {1}.</value>
</data>
<data name="SatisfiabilityValidator_MaxRecursionDepthReached" xml:space="preserve">
<value>Satisfiability validation reached the maximum recursion depth ({0}) while visiting type '{1}'. Validation of deeply nested fields may be incomplete.</value>
</data>
<data name="SatisfiabilityValidator_NodeTypeHasNoNodeLookup" xml:space="preserve">
<value>Type '{0}' implements the 'Node' interface, but no source schema provides a non-internal 'Query.node&lt;Node&gt;' lookup field for this type.</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using HotChocolate.Fusion.Collections;

namespace HotChocolate.Fusion.Satisfiability;

internal sealed class PathNode(SatisfiabilityPathItem item, PathNode? parent)
{
public SatisfiabilityPathItem Item { get; } = item;

public PathNode? Parent { get; } = parent;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using HotChocolate.Types.Mutable;

namespace HotChocolate.Fusion.Satisfiability;

internal readonly record struct WorkItem(
MutableObjectTypeDefinition ObjectType,
PathNode? Path);
Loading
Loading