Skip to content

Commit 2558673

Browse files
fix input filtering
1 parent cf93c00 commit 2558673

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

schema-with-deprecated.json

-285 KB
Binary file not shown.

src/SharpGraph.Core/SchemaLoader.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,13 @@ public void LoadSchema(string schemaContent)
132132
var typeDef = typeDefinitions.FirstOrDefault(t => t.Name == parsedType.Name);
133133

134134
// Skip Query and Mutation - they define operations, not data to store
135-
// But still register them with executor for introspection
135+
// DON'T register them from the schema file because GetQueryFields() dynamically
136+
// generates the correct Query type with Connection wrappers (e.g., CharacterConnection)
137+
// If we register the schema.graphql version (which has [Character]!), it overrides
138+
// the dynamic Connection types and breaks introspection
136139
if (parsedType.Name == "Query" || parsedType.Name == "Mutation")
137140
{
138-
Console.WriteLine($" ⏭️ Registering {parsedType.Name} (operation type, no table needed)");
139-
if (typeDef != null)
140-
{
141-
_executor.RegisterOperationType(parsedType.Name, typeDef);
142-
}
141+
Console.WriteLine($" ⏭️ Skipping {parsedType.Name} registration (will be dynamically generated with Connection types)");
143142
continue;
144143
}
145144

0 commit comments

Comments
 (0)