Skip to content
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

Fix bug in addons/graphql in reIndentQuery #1207

Merged
merged 3 commits into from
Jun 7, 2017

Conversation

jamsea
Copy link
Contributor

@jamsea jamsea commented Jun 6, 2017

Issue:
Creating a multi line graphiql query causes storybook to error out in version 3. This is because it tries to run join on a string rather than an array.

What I did

Move the bracket so join is always appended to an array rather than a string.

How to test

Try creating a story with a multi-line graphiql query and loading it.

@codecov
Copy link

codecov bot commented Jun 6, 2017

Codecov Report

Merging #1207 into master will increase coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1207      +/-   ##
==========================================
+ Coverage   13.64%   13.71%   +0.07%     
==========================================
  Files         207      207              
  Lines        4640     4615      -25     
  Branches      517      516       -1     
==========================================
  Hits          633      633              
+ Misses       3555     3530      -25     
  Partials      452      452
Impacted Files Coverage Δ
addons/graphql/src/preview.js 0% <ø> (ø) ⬆️
lib/ui/src/modules/ui/components/layout/usplit.js 38.7% <0%> (ø) ⬆️
lib/ui/src/modules/ui/containers/left_panel.js 20% <0%> (ø) ⬆️
addons/knobs/src/components/types/Color.js 8% <0%> (ø) ⬆️
...src/server/config/WatchMissingNodeModulesPlugin.js 0% <0%> (ø) ⬆️
app/react/src/server/babel_config.js 44.82% <0%> (ø) ⬆️
addons/storyshots/src/require_context.js 0% <0%> (ø) ⬆️
app/react/src/server/config/webpack.config.js 0% <0%> (ø) ⬆️
lib/ui/src/modules/ui/configs/handle_keyevents.js 33.33% <0%> (ø) ⬆️
addons/info/src/components/Node.js 0% <0%> (ø) ⬆️
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b7a90fd...89b23b2. Read the comment docs.

@ndelangen
Copy link
Member

Thank you @jamsea ! I don't know a lot of users of this addon, if you're using it please let us know how, and what you'd like to see improved?

@ndelangen ndelangen self-assigned this Jun 7, 2017
@ndelangen ndelangen added this to the v3.0.2 milestone Jun 7, 2017
@ndelangen ndelangen merged commit 8851a4e into storybookjs:master Jun 7, 2017
@jamsea
Copy link
Contributor Author

jamsea commented Jun 7, 2017

@ndelangen thanks for merging. We're using GraphQL for our new projects at the NFL and we're using this add on for internal documentation. We're already using story book as internal documentation for all of our react components so being able to integrate GraphQL examples in the same system was a life saver.

The only thing I wasn't able to figure out was adding an example GraphQL variable. Is there a way to do that currently or is that a new feature that would need to be developed?

@ndelangen
Copy link
Member

ndelangen commented Jun 7, 2017

Well I know it's using https://github.com/graphql/graphiql and supports it, but maybe it needs an update?

If you could help us out, that'd be great!

@shilman
Copy link
Member

shilman commented Jun 8, 2017

@jamsea do you happen to have any public storybooks from NFL you can share? i'm documenting examples here (placeholder, will be redesigned): https://storybook.js.org/examples/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants