Currently I am building forms dynamically with introspection, but I have a limitation where I need to get the validation rules, I achieved this by extending the regular type schema with validation rules but it feels dirty and could be coming from the __type query instead if I had the ability to extend this schema.
Is there anyway to extend the introspection schema with new fields?
This is a good candidate for using the extensions section of the ExecutionResult.
After execution, you can add whatever extra metadata you want to the extensions section. This is how the Apollo Tracing works.
https://graphql-dotnet.github.io/docs/getting-started/metrics
Is there anyway to extend the introspection schema with new fields?
The formal answer is yes if you fork this repo. In fact, this brings a number of problems. See #1451 .
@Jonatthu Now we _can_ extend introspection response even if it goes "against" (well, not actually) official spec. See https://github.com/graphql-dotnet/graphql-dotnet/blob/develop/docs2/site/docs/migrations/migration4.md#experimental-features--applied-directives and https://github.com/graphql-dotnet/graphql-dotnet/blob/develop/src/GraphQL/ExperimentalFeatures.cs . Closing this. Feel free to ask further questions opening new issue.