Comments (3)
Well, apparently this is not possible at the moment, because directives are not conserved in the introspection: graphql/graphql-spec#300
This would require reading the schema in a different format than the introspection query (like AST JSON format). I don't know if it's possible, but in any case, this is not a low hanging fruit.
from magidoc.
After some digging, I discovered that this is possible if we pass the SDL
directly to the template rather than the introspection
JSON. It does have the downside that this feature will only be available if magidoc uses the SDL files directly, and will not work when using any of the other method to provide introspection.
See
graphql.js: printSchema
(converts a schema to SDL)schema.getQueryType().getFields()["search"].astNode.directives
(get directives on a field)schema.getQueryType().getFields()["search"].args[0].astNode.directives
(get directives on an argument)
from magidoc.
This has been implemented and merged!
from magidoc.
Related Issues (20)
- Support download links HOT 4
- Blacklisting HOT 2
- Alternative documentation layout HOT 4
- Large scale GraphQL APIs HOT 3
- preview command with --host option HOT 3
- Hosting on AWS S3 Bucket fails to find subfolders HOT 3
- magidoc generate started failing generating what looks like valid types HOT 11
- Fuse Markdown doesn't support enhanced markdown syntax HOT 3
- SyntaxError: Invalid or unexpected token HOT 1
- Fetch @magidoc/starter-carbon-multi-page From NPM Registry HOT 2
- bug: unordered lists render incorrectly HOT 7
- this portion of the fake generator should be unreachable... if you ever see this error, please open an issue HOT 2
- How do i deploy these docs in FastAPI HOT 2
- `@oneOf` directive support HOT 15
- Raw SDL is not working HOT 2
- 4.2.0 breaks siteRoot configuration variable HOT 2
- Command line parameter to specify .mjs file HOT 1
- Relative URLs not supported in markdown HOT 5
- For compatibility with markdown generated by other MD editors, allow optional space between container tag and type HOT 4
- [DOCS][UI] Tooltip for GitHub is undefined
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magidoc.