GraphQL Server – Addscoped (without explicitly specifying)

GraphQL Server – Addscoped (without explicitly specifying)


0

I am writing a graphql api using .net core+hot chocolate.
I have to define all service names while creating graphql server.
I have more than 20 service classes. Is there a generic way of specifying these services, I dont want to write 20 + lines of code to specify each service name.

addscoped

Share
Improve this question

1

  • You can use reflection to find types that have a specific name, implement a specific interface or have a specific attribute and register them using the non-generic versions of AddScoped

    – Panagiotis Kanavos

    1 hour ago



Load 4 more related questions


Show fewer related questions

0

Reset to default



Leave a Reply

Your email address will not be published. Required fields are marked *