Repository navigation
docs: add generated graphql api reference - #3745
Conversation
|
Iterating on the design with @Camille-Elairin |
|
@crjm myself and @kpenfound will push to this PR with snippets |
|
Here is the link with the current state of the reference. |
|
Docs integration is being implemented in #3780 |
|
feedback from 11/18 call -
|
|
Update: pushed a few changes. Still have to decouple API Playground link from example file. |
There was a problem hiding this comment.
From this, it seems that the graphql docs are regenerated every time you run npm start or npm build. It's possible that, when testing unrelated changes with npm start, the git diff would include changes arising from this graphql doc regeneration, which a developer would need to manually unstage before committing. Is there any way to avoid this?
I had a similar issue for the Node.JS docs which are also auto-generated and in that case, I added the auto-generated docs to the .gitignore file. It is not a perfect solution though.
There was a problem hiding this comment.
Yep, you are right, it's not necessary to commit build artifacts, so we should put the static/graphql folder in .gitignore.
Polluting both the start and build commands was a concern I had when I implemented it because of the reason you mention.
The other alternative would be to modify the Netlify build command in netlify.toml so the docs are only generated at build time in Netlify, and if we need to test them locally, just run graphql-docs and docusaurus run/build separately.
vikram-dagger
left a comment
There was a problem hiding this comment.
Similar to the inline comment, I'm not sure if the auto-generated static assets (images/JS/CSS) in static/graphql should be committed to the repo, as they are already included in docs-graphql/public.
Nice catch, you reminded me to delete the |
|
I'm working on these changes @vikram-dagger |
Yes, let's remove it. |
Signed-off-by: Julián Cruciani <[email protected]>
Signed-off-by: Julián Cruciani <[email protected]>
Signed-off-by: Julián Cruciani <[email protected]>
Signed-off-by: Julián Cruciani <[email protected]>
Signed-off-by: Julián Cruciani <[email protected]>
Signed-off-by: Julián Cruciani <[email protected]>
Signed-off-by: Julián Cruciani <[email protected]>
Signed-off-by: Julián Cruciani <[email protected]>
Signed-off-by: Julián Cruciani <[email protected]>
Signed-off-by: Julián Cruciani <[email protected]>
Signed-off-by: Julián Cruciani <[email protected]>
Signed-off-by: Julián Cruciani <[email protected]>
Signed-off-by: Julián Cruciani <[email protected]>
Signed-off-by: Julián Cruciani <[email protected]>
Signed-off-by: Julián Cruciani <[email protected]>
Signed-off-by: Julián Cruciani <[email protected]>
Signed-off-by: Julián Cruciani <[email protected]>
bc631d9 to
9a75c6d
Compare
Signed-off-by: Jeremy Adams <[email protected]>
|
@crjm can the code box be more flexible in size? With certain queries or certain zoom levels, content can get cut off |
Signed-off-by: Julián Cruciani <[email protected]>
Signed-off-by: Julián Cruciani <[email protected]>
Done! |
Signed-off-by: Jeremy Adams <[email protected]>
Signed-off-by: Julián Cruciani <[email protected]>
|
fixes #3824 |
Yep, we talked with @vikram-dagger about this. Each time an example is missing, it will print that error to the console, warning about the example, but it will continue building anyway. |
that's nice. Should we make it fail instead? It'd be nice that if a new query type is added, CI automatically fails if no API reference examples have been added or if an intended action is taken to avoid having examples for that specific query. |
We can, yes. Right now we are just printing the error instead of stopping the execution. EDIT: I read "can" instead of "should", sorry. |
|
I'm onboard with a failing check for this. Writing an example shouldn't take that long. 🙂 |




This will add a GraphQL API documentation generated with
spectaqlbased on an introspection query or local schema files.TODO
graphqlfiles.and types.Closes #3048
Signed-off-by: Julián Cruciani [email protected]