insomnia
insomnia copied to clipboard
graphql documentation won't load
Expected Behavior
after successful fetch of schema clicking show documentation loads the documentation view.
Actual Behavior
after clicking refresh schema and the request responding success, clicking show documentation doesn't load anything. additionally the view shows "schema not yet fetched" near the bottom still.
Reproduction Steps
- setup a valid graphql url in a graphql request.
- click refresh schema in the schema drop down.
- wait for request to successfully finish.
- click show documentation from the schema drop down.
Is there an existing issue for this?
- [X] I have searched the issue tracker for this problem.
Additional Information
No response
Insomnia Version
2022.7.5
What operating system are you using?
Windows
Operating System Version
windows 10
Installation method
downloaded from insomnia.rest
Last Known Working Insomnia version
not sure
Hi @zdenkers thanks for reporting this.
If you go into View > Toggle Developer Tools, and then on the developer tools switch to the Console tab, do you notice any error logs when hitting refresh schema? If you do please share here.
Hi @zdenkers thanks for reporting this.
If you go into View > Toggle Developer Tools, and then on the developer tools switch to the Console tab, do you notice any error logs when hitting refresh schema? If you do please share here.
No errors in the console or network tab. The console shows:
[network] Sending req=req_8de1369e8d194d718f0e1eafa4fda730.graphql env=null [network] Response succeeded req=req_8de1369e8d194d718f0e1eafa4fda730.graphql status=200
So it seems as if the request to fetch the schema is successful, which i am also seeing from my application. The request for the schema comes in, is successfully processed and returned to the requester. I've also double checked that its not just my application other production graphql apis schema also never loads.
Just want to confirm that I too am experiencing this issue - I am unable to load the documentation view. There is no obvious error showing in the console or network tab... though strangely I see no network requests being made. The details of the application and system are:
Version: Insomnia 2022.7.5
Build date: 1/20/2023
OS: Darwin arm64
Electron: 22.0.0
Node: 16.17.1
V8: 10.8.168.20-electron.0
I have this problem as well. Steps to reproduce:
- Make new GraphQL request:
POST https://api.github.com/graphql
; - Fill in some query for testing, e.g.
query test{viewer{login}}
; - Under “schema 🔧” UI drop-down, turn OFF “Automatic Fetch”;
- Restart Insomnia (to unload any previously cached schema);
- Under “schema 🔧” UI drop-down, choose “Refresh Schema”;
- ✅ Observe that the UI displays “fetching schema…” for a while;
- ✅ Observe that the JS console prints
[network] Response succeeded req=req_<HASH>.graphql status=200
; - ❌ Observe that “fetching schema…” in the UI turned to “schema not yet fetched”;
- ❌ “Show Documentation” and Cmd-clicking identifiers in the GraphQL query does not work.
Expected:
- “Refresh Schema” results in the fetched GraphQL schema being loaded into Insomnia;
- “Show Documentation” shows the documentation based on the fetched GraphQL schema;
- Cmd-clicking identifiers opens the associated documentation in the sidebar.
Workaround:
- Turn ON “Automatic Fetch” under “schema 🔧”. This will cause the GraphQL schema to be re-fetched any time you switch views between different Insomnia requests, even if all the requests are GraphQL requests to an identical URL with identical HTTP headers, which I personally find slow and wasteful, but is a sufficient workaround for Insomnia not being able to display GraphQL docs at all.
Version: Insomnia 2022.7.5
Build date: 1/19/2023
OS: Darwin arm64 21.6.0
Electron: 22.0.0
Node: 16.17.1
V8: 10.8.168.20-electron.0
Architecture: arm64
I can confirm I have the same issue. Automatic Fetch was able to load the schema, but not Refresh Schema.
Version: Insomnia 2022.7.5
Build date: 1/19/2023
OS: Darwin x64 22.3.0
Electron: 22.0.0
Node: 16.17.1
V8: 10.8.168.20-electron.0
Architecture: x64
I can confirm I have the same issue as well. Unable to fetch schema by clicking "Refresh Schema". It does work when clicking "Automatic Fetch"
@filfreire Any update on this? This is a really annoying bug that makes insomnia borderline useless for graphql development.
A workaround for this is to restart Insomnia, after that the docs are updated. But that's quite bothersome, especially when making frequent schema changes.