-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
simplify doc explorer components #2477
simplify doc explorer components #2477
Conversation
|
Codecov Report
@@ Coverage Diff @@
## main #2477 +/- ##
==========================================
+ Coverage 65.70% 68.37% +2.66%
==========================================
Files 85 71 -14
Lines 5106 4167 -939
Branches 1631 1384 -247
==========================================
- Hits 3355 2849 -506
+ Misses 1747 1313 -434
- Partials 4 5 +1
Continue to review full report at Codecov.
|
Very nice comments @timsuchanek! 👏 Didn't look too closely at the implementation of the component yet. But while we're at it we can as well do this 👍 |
After looking into it I could only do the last one for typescript reasons |
689bbbc
to
bca9683
Compare
bca9683
to
06e4f0a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, LGTM now!
@thomasheyenbrock since there are so many projects who use only the DocExplorer export directly (which is documented usage), can we add something to the graphiql/react readme to show how to use the schema context and the DocExplorer component standalone? Or make the schema prop optional? CC @benjie |
Slightly off topic for this PR, but on the topic of the doc explorer; in the new design will there be a prop we can add where it turns off the checkboxes/etc so that we can still use the component as a doc explorer without it building queries/etc? |
@acao good shout! I added back the |
@benjie I can imagine that we would offer multiple versions of the doc explorer as plugins where one will be built-in (either the current one or the more advanced new one, tbd 😅 ) |
Instead of passing down the
schema
and callbacks for clicking types and fields via props, we canTypeLink
andFieldLink
componentsℹ️ much more easy to review with hidden whitespace ℹ️
No changeset needed as non of the components where the props changed are public.