-
Notifications
You must be signed in to change notification settings - Fork 27
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
Did not get HTTP 200 back from the endpoint #14
Comments
I ran the following and received the same error. @aminconnectngo @rodriguise Give this tool a try: https://www.npmjs.com/package/@graphidocs/docs
I was able to produce the docs from that fake graphql api using it. |
After parsing the errors, file '/lib/introspectionQuery.txt' is having field named 'onOperation', 'onFragment' and 'onField', which might not contained in your query/schema field. |
@onx2 |
For anyone interested, I ended up with a custom build rather than using a tool. Using node-fetch and ts-node I fetch the introspection query response, then use graphQL utils to build the schema. ts-node and node-fetch are run on the command line using yarn or npm (in my case). So something like this in your scripts section of package.json. This file is run on the CLI and will fetch the introspection query, then save the json response to a schema.json file in your directory.
Some TypeScript (or JS I guess if you can import json files) file that handles building the schema
package.json
I'm using TypeScript, so to import From here you can utilize all of the built in graphql functions as well as lodash to manage the types, mutations, queries, subscriptions, etc... and build your own UI. I chose to work with React and used Lodash for nice array / object handling. Hope this helps! |
I have this issue too but struggle to understand where @1hsun found the errors. Was the fix to this library or to the graphQL schema? Welcome any help as to how I should proceed as the formatting of this library looks superior :-) |
The problem was that around early 2018 there was a breaking change in the introspection query. I've submitted a pull request that fixes the issue but I'm not sure if the library is still maintained otherwise. Does work as intended now though. |
I already installed graphql-docs (globally) and now when I run below command
graphql-docs-gen MY-GRAPHQL-ENDPOINT doc.html
It returns with Did not get
Any idea how to fix it?
The text was updated successfully, but these errors were encountered: