Skip to content
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

Explorer successfully executes queries but won't load the schema #925

Open
kozak-codes opened this issue Oct 7, 2022 · 1 comment
Open

Comments

@kozak-codes
Copy link

Intended outcome:

When I visit the explorer I should have an up to date schema from the API. I see errors when loading a query from the "Queries" tab however the query executes at my endpoint successful.

Actual outcome:

I have the default schema (id, __typename) - there is no way that I can reload the schema.

How to reproduce the issue:

My endpoint is at localhost:4200/api/graphql. I have a custom httpLink and webSocket link, however I have also set the URI to localhost:4200/api/graphql and connectToDevTools: true - Authentication is not required to load the schema, and I'm able to successfully load it from apollo playground (at localhost:4200/api/graphql) when not authenticated.

Desktop (please complete the following information):

@kozak-codes
Copy link
Author

kozak-codes commented Oct 7, 2022

Alright, so I found the "typeDefs" property on the ApolloClientOptions and I also figured out how to generate the type defs via graphql codegen - I had to make a JS version that escaped backticks (eg code examples in comments) but it's still not the most robust. I'm now able to view my schema in the explorer.

This either isn't documented anywhere or I'm completely missing something? There has to be a way that, like Apollo Playground, the extension can run an introspection query and generate the typeDefs itself?

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

No branches or pull requests

1 participant