Skip to content

error - Unknown operation named 'IntrospectionQuery'. #1579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
smarcet opened this issue Oct 16, 2024 · 5 comments
Closed

error - Unknown operation named 'IntrospectionQuery'. #1579

smarcet opened this issue Oct 16, 2024 · 5 comments

Comments

@smarcet
Copy link

smarcet commented Oct 16, 2024

i updated the libs from former version ( from 2.x to 3.x )
and when i tried to access to graphl explorer i got following initial error
Unknown operation named 'IntrospectionQuery'.

image

@erikwrede
Copy link
Member

Hey @smarcet, can you provide a minimum reproducible example? Blindly guessing from this, it could be related to your webview (for example graphql-server or starlette-graphene3), or something completely different. Some extra info would make it easier to search for the cause 😊

@smarcet
Copy link
Author

smarcet commented Apr 4, 2025

@erikwrede i have more info
the query web view , when its initially requested it does 2 request
one to get the data and another to get fetch the schema
my current implementation it does uses oauth2
but problem is that the second request to get the schema ( JSON request ) it does not pass the original access token
so the request it fails and UI get the Error fetching schema error
is the is any workaround to pass the initial query string params ( where my ?access_token lives ) to this second json request in order to get a successful introspection request ?

@smarcet
Copy link
Author

smarcet commented Apr 4, 2025

Image

@erikwrede
Copy link
Member

Ah, I see. This seems to be a GraphiQL issue, and your authorization is set up for the GraphQL endpoint. I'm not sure GraphiQL is customizable to that extent in the pre-provided version. For these cases, I prefer to host GraphiQL separately and build my own GraphiQL using the Graphiql toolkit / react components: https://github.com/graphql/graphiql.
You can set an initial schema on init and fetch it however you want.

This sandbox I found online provides a good starting point: https://codesandbox.io/p/sandbox/graphiql-example-dlddnq?file=/src/index.tsx:17,42

Customize the fetcher to fit your token needs or pre-provide the schema to the GraphiQL component.
Unfortunately, I cannot provide any additional support, as GraphiQL is not part of Graphene, and any customizations to it are out of this project's scope. I understand this may be frustrating, as GraphiQL previously worked, but I hope this leads you in the right direction.

@erikwrede erikwrede closed this as not planned Won't fix, can't repro, duplicate, stale Apr 5, 2025
@smarcet
Copy link
Author

smarcet commented Apr 7, 2025

many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants