Comparing version 0.2.3 to 0.2.4
@@ -63,2 +63,6 @@ /** | ||
* | ||
* - response: an optional JSON string to use as the initial displayed | ||
* response. If not provided, no response will be initialy shown. You might | ||
* provide this if illustrating the result of the initial query. | ||
* | ||
* - storage: an instance of [Storage][] GraphiQL will use to persist state. | ||
@@ -157,2 +161,3 @@ * Only `getItem` and `setItem` are called. Default: window.localStorage | ||
query: _react.PropTypes.string, | ||
response: _react.PropTypes.string, | ||
storage: _react.PropTypes.shape({ | ||
@@ -409,3 +414,3 @@ getItem: _react.PropTypes.func, | ||
variables: variables, | ||
response: null, | ||
response: props.response, | ||
editorFlex: this._storageGet('editorFlex') || 1, | ||
@@ -427,2 +432,3 @@ variableEditorOpen: Boolean(variables), | ||
var nextVariables = this.state.variables; | ||
var nextResult = this.state.result; | ||
if (nextProps.query && nextProps.query !== nextQuery) { | ||
@@ -434,5 +440,9 @@ nextQuery = nextProps.query; | ||
} | ||
if (nextProps.result && nextProps.result !== nextResult) { | ||
nextResult = nextProps.result; | ||
} | ||
this.setState({ | ||
query: nextQuery, | ||
variables: nextVariables | ||
variables: nextVariables, | ||
result: nextResult | ||
}); | ||
@@ -439,0 +449,0 @@ }; |
{ | ||
"name": "graphiql", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "An interactive in-browser GraphQL IDE.", | ||
@@ -5,0 +5,0 @@ "contributors": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1431398
27191