You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Insomnia cannot refresh the schema - it gets a 400 response: Got status 400 fetching schema from https://local-domain/graphql
But if I go to a browser, and type https://local-domain/graphql/schema.graphql in the incognito tab I get the schema with no issues.
So I wonder if I can get more details from Insomnia on what is going on? E.g. what exact URL is it trying to hit, does it add some special headers?
The GraphQL schema is loaded using a schema introspection query. You can see our usage here. If the server does not have introspection enabled, Insomnia will fail to load it. The result of the schema loading attempt can be seen at the bottom of the request editor pane.
As an alternative, schemas can be imported from JSON files where the contents are the raw JSON result of an introspection query (i.e. there's a top-level data key).
There are external tools available that will transform GraphQL SDL (schema.graphql) into JSON: https://transform.tools/graphql-to-introspection-json but you'd have to nest that result into a top-level data key for Insomnia to recognize it.
Expected Behavior
Insomnia cannot refresh the schema - it gets a 400 response:
Got status 400 fetching schema from https://local-domain/graphql
But if I go to a browser, and type
https://local-domain/graphql/schema.graphql
in the incognito tab I get the schema with no issues.So I wonder if I can get more details from Insomnia on what is going on? E.g. what exact URL is it trying to hit, does it add some special headers?
Actual Behavior
should load the schema
Reproduction Steps
Go to GraphQL and press "Refresh schema"
Is there an existing issue for this?
Which sync method do you use?
Additional Information
Version: Insomnia 10.3.0
Build date: 12/20/2024
OS: Darwin arm64 24.2.0
Electron: 31.4.0
Node: 20.16.0
Node ABI: 125
V8: 12.6.228.30-electron.0
Architecture: arm64
Insomnia Version
10.3.0
What operating system are you using?
macOS
Operating System Version
OS: macos 24.2.0
Installation method
probably brew
Last Known Working Insomnia version
No response
The text was updated successfully, but these errors were encountered: