-
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
Loading spinner when running editor queries and fetching the schema #61
Conversation
@@ -199,6 +200,10 @@ export class GraphiQL extends React.Component { | |||
|
|||
componentDidMount() { | |||
if (!this.state.schema) { | |||
this.setState({ | |||
showSpinner: true |
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.
We should only show a spinner when there is an user-produced query to the server underway, not for the automated fetching of the schema. GraphiQL is still usable without a schema, just typeahead and linters are not yet enabled, that's fine.
This implementation also has a race condition where we could issue a query before the schema returns. The schema would return and turn off the spinner, but the query itself hasn't returned yet.
You should also squash your commits together. You can do that with |
41540ec
to
91cacea
Compare
height: 36px; | ||
width: 36px; | ||
left: 50%; | ||
transform: translate(-50%,-50%); |
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.
nit: space after the comma
e246db0
to
58f5ecc
Compare
Loading spinner when running editor queries and fetching the schema
…babel-4.0.0 Update eslint-plugin-babel to the latest version 🚀
Remove unused test files from main package
A CSS-driven loading spinner when running editor queries and fetching the schema, in case they take a while. Shown in a result window and documentation explorer (since it needs a schema to be rendered).