-
-
Notifications
You must be signed in to change notification settings - Fork 794
Open
Open
Copy link
Labels
Area: Type SystemIssue is related to the Type SystemIssue is related to the Type System🌶️ hot chocolate
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
When added server with builder.AddQueryType<QueryType>(d => d.Name("Query")
That name does not have effect on types that extending ObjectTypeExtension<QueryType>
and it makes the queries on this type not available on schema.
Steps to reproduce
- Create a placeholder class
QueryType
public class QueryType { }
- In
Startup.ConfigureServices()
: addAddQueryType<QueryType>(d => d.Name("Query"))
services
.AddGraphQLServer()
.AddQueryType<QueryType>(d => d.Name("Query"));
- Create a class that extends
ObjectTypeExtension<QueryType>
public class HelloQuery : ObjectTypeExtension<QueryType>
{
protected override void Configure(IObjectTypeDescriptor<QueryType> descriptor)
{
// descriptor here has definition name "QueryType" not "Query"
// and query "hello" will not show on the schema
descriptor.Field("hello").Resolve("Hello World");
}
}
Relevant log output
No response
Additional Context?
No response
Product
Hot Chocolate
Version
12.11.11
Metadata
Metadata
Assignees
Labels
Area: Type SystemIssue is related to the Type SystemIssue is related to the Type System🌶️ hot chocolate