Comments (7)
Hey @hailwood thanks for the feedback!!! The docs could certainly benefit from a "examples" section, I was thinking at the bottom of every page using several directives per query/mutation so the page doesn't get too overloaded. But yes, they could absolutely benefit from more clarity!! I was also planning on working in a "How Do I" or "FAQs" section that would be similar to the questions you presented on the main repo.
Let me know if you have any other feedback/questions and I'll update this post when I get some more content worked into the docs!
Thanks @hailwood!
from lighthouse-docs.
Hey @hailwood
Nice idea. However, i am struggling a bit how to do example queries specific to directives. Since the directives are server side...
Also, most of the directives are pretty substantial in what they do, meaning they do enable a specific purpose. So there is not really a before and after.
The "How To's" seems like a great approach. A set of common problems and a suggestion for how it can be solved with Lighthouse.
from lighthouse-docs.
Starting from v2.2, all directives live on one page. Comprehensive guides are there to explain certain use-cases and logically group directives according to their purpose.
I think some directives may benefit from example queries, for others it seems a bit over the top.
from lighthouse-docs.
@spawnia I unfortunately don't have time myself currently ⏳,
But I was thinking we could transfer those "How would I..." questions to the docs as you've suggested (and was actually their original intent), And then on the directive page under relevant directives have
Example Usage:
Then it links it all together quite nicely, and it seems natural that the directives that need their usage explained probably need a scenario around their usage.
Thoughts?
from lighthouse-docs.
Definitely working on transferring the "How would I" issue over to the docs. I am still not quite sure about how much info should go on the directives listing, apart from the basic information and api. Cross-referencing with use-cases might be a great way to make the information easily discoverable while keeping things DRY.
from lighthouse-docs.
The new guides/directive structure is well into the making. I tried to add examples where they make sense.
I guess we can close this Issue, as we can all agree this is a good idea and we will have to continually work on this case-by-case.
from lighthouse-docs.
The guides
in the new docs have lots of example queries. @hailwood feel free to add more where you feel they are missing. Closing this for now.
from lighthouse-docs.
Related Issues (18)
- Add guide for going from REST -> Lighthouse HOT 4
- Document the namespace functionality of @group HOT 3
- Add links to general resources about GraphQL HOT 1
- Add @rules directive
- add a search functionality HOT 5
- merge directives into one page HOT 5
- Web GraphQL IDE: provide links/options on how to install them HOT 7
- Run docs HOT 3
- [Feat] Add packages HOT 6
- Missing docs for @belongsTo
- This project needs a domain HOT 5
- Duplicated description for where HOT 1
- Document how resolvers default to the configured namespaces HOT 1
- Update to docs v2.2 HOT 10
- Please use better contrast HOT 1
- [Feature] Provide a CHANGELOG between versions HOT 3
- Documentation page 404 HOT 1
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 lighthouse-docs.