2015-11-03 3 views
6

babel-relay-pluginで解析できないschema.jsonファイルを作成する際にエラーが発生しました。リレーのサンプルフォルダに含まれているschema.jsonファイルを見て、私はGraphiQLでそのクエリをコピーしようとしましたが、正しいとは言えません。私はLaravelをバックエンドとして使用しています。これは私がGraphiQLを通して達成することができるか、またはGraphQLエンドポイントに要求を送り、応答を保存することですか? GraphiQL使用GraphiQLまたはGraphQLエンドポイントでschema.jsonを生成

Cannot read property 'reduce' of undefined while parsing file: /Users/username/Sites/Homestead/Code/ineedmg-graphql/resources/assets/js/app.js 

最後の試み:schema.jsonファイルを解析しようとしたときに発生する

エラー

{ 
    __schema { 
    queryType { 
     name 
    }, 
    types { 
     kind, 
     name, 
     description, 
     fields { 
      name, 
      description, 
      type { 
       name, 
       kind, 
       ofType { 
       name 
       description 
       } 
      } 
      isDeprecated, 
      deprecationReason, 
     }, 
     inputFields { 
     name 
     description 
     } 
     interfaces { 
     kind 
     name 
     description 
     }, 
     enumValues { 
     name 
     description 
     isDeprecated 
     deprecationReason 
     } 
    }, 
    mutationType { 
     name 
    }, 
    directives { 
     name, 
     description, 
     onOperation, 
     onFragment, 
     onField, 
     args { 
     name 
     description 
     defaultValue 
     } 
    } 
    } 
} 

答えて

関連する問題