Using 'RemoveUnreachableTypes' option in HC 12 breaks BCP (and other graphql IDEs) #4712
Closed
1 task done
Labels
Area: Type System
Issue is related to the Type System
🐛 bug
Something isn't working
🌶️ hot chocolate
Milestone
Is there an existing issue for this?
Describe the bug
Using
.ModifyOptions(options => options.RemoveUnreachableTypes = true);
breaks Banana Pop Cake (and Insomnia).I have been able to reproduce the issue using HC v.12.5 and v.12.6
Steps to reproduce
[UsePaging]
attribute from the Query.GetPersons method.This is to ensure that the generated schema does not include any auto-generated
Int
field.ModifyOptions(options => options.RemoveUnreachableTypes = true);
to Program.csRelevant log output
No response
Additional Context?
Digging a bit deeper to the root cause.
First look at the sdl and find that there is only one
![image](https://user-images.githubusercontent.com/44775468/151945266-76e64413-ea7b-48fe-b856-4add0fab13da.png)
Int
field (in the stream directive):Second find the 'introspection_phase_2' query in the Network tab of the Browser tools:
![image](https://user-images.githubusercontent.com/44775468/151943005-fea9749c-c701-46ff-a2df-4717c2f11b56.png)
![image](https://user-images.githubusercontent.com/44775468/151944241-06f4898c-1e19-471c-9b4a-fe4cee9a02ba.png)
Inspect the response in a tool like e.g. VS Code and you will see that effectively no
Int
SCALAR type has been defined. However, it's being used in thescalar
directive...Third repeat the same steps but this time without the
![image](https://user-images.githubusercontent.com/44775468/151946466-8aeb8a21-bc03-4b1f-8791-e683988c42c4.png)
options.RemoveUnreachableTypes
option....Product
Hot Chocolate
Version
12.6
The text was updated successfully, but these errors were encountered: