Kaynağa Gözat

Merge branch 'master' of http://gogs.ioobot.com:6680/xy/online

wly 7 yıl önce
ebeveyn
işleme
9a0fb716d3

+ 2 - 1
src/components/common/generateJs/GenerateJs.jsx

@@ -15,6 +15,7 @@ class GenerateJs extends Component {
         this.state = {
             schemaID:props.schemaID,
             schemaName:props.schemaName,
+            graphqlJs:'',
             queryList:[],
             mutationList:[],
             show: false
@@ -33,7 +34,6 @@ class GenerateJs extends Component {
                 let mutationList = [];
                 let graphqlJs = beautify(res.data, { indent_size: 2, space_in_empty_paren: true });
                 // console.log('beautify graphqlJs',graphqlJs);
-                // console.log('graphqlJs', graphqlJs);
                 graphqlJs.split("}\n}\n").map((item) => {
                     if (item.indexOf('query')>-1) queryList.push(item+"}\n}\n");
                     else mutationList.push(item+"}\n}\n");
@@ -45,6 +45,7 @@ class GenerateJs extends Component {
                 // console.log('mutationList',mutationList);
                 if (res.data !== '') {
                     _this.setState({
+                        graphqlJs,
                         queryList,
                         mutationList,
                         show: true