Since 4.2, admin makes calls to graphql/types on each page
I upgraded one of my project to 4.2 today, and I realized now on each admin page there is an ajax call being made to graphql/types (sometimes two, but that doesn't always happen). This happens on each page load, ajax or not. This causes two issues in my opinion:
- the user sees a brief "loading" status bar being displayed after page load (which is disturbing and looks like a glitch)
- it seems to slow down the overall experience if you try to navigate quickly in the cms (since this endpoint is not very reactive, didn't test on a nice prod server, but in development the call takes about 1s)
Is there a way to disable this call if its not necessary? or just have it on first load, since it seems to return more or less always the same thing?
This seems related to the file getGraphqlFragments.js that calls the /types endpoint provided by the IntrospectionProvider (in the graphql module).
I wonder if it wouldn't be better to load it right on first load (even maybe embedded in the html response to have one single request) and then find some response header that would trigger a reload if types are changed (not sure if that happens in regular usage)