0

データを含む既存のpostgresqlデータベースがあり、postgraphileをgraphql APIとして実験しています。頭を悩ませているエラーが発生しています。サーバーは正常に動作しますが、次の結果が得られます。

postgraphile -c postgres://username:password@localhost:5432/my_db                                                                

PostGraphile server listening on port 5000                                                                                                                 

  ‣ Connected to Postgres instance postgres://localhost:5432/my_db                                                                                          
  ‣ Introspected Postgres schema(s) public                                                                                                                      
  ‣ GraphQL endpoint served at http://localhost:5000/graphql                                                                                                    
  ‣ GraphiQL endpoint served at http://localhost:5000/graphiql                                                                                                  

* * *                                                                                                                                                           

An error occurred, it might be okay but it doesn't look like the error we were expecting... run with envvar 'DEBUG="graphile-build:warn"' to view the error     
An error occurred, it might be okay but it doesn't look like the error we were expecting... run with envvar 'DEBUG="graphile-build:warn"' to view the error     

Error: Query root type must be provided.                                                                                                                        
    at assertValidSchema (C:\Users\user\AppData\Roaming\npm\node_modules\postgraphile\node_modules\graphql\type\validate.js:78:11)                      
    at Object.validate (C:\Users\user\AppData\Roaming\npm\node_modules\postgraphile\node_modules\graphql\validation\validate.js:61:35)                  
    at parseQuery (C:\Users\user\AppData\Roaming\npm\node_modules\postgraphile\build\postgraphile\http\createPostGraphileHttpRequestHandler.js:208:48)  
    at Promise.all.paramsList.map (C:\Users\user\AppData\Roaming\npm\node_modules\postgraphile\build\postgraphile\http\createPostGraphileHttpRequestHandler.js:469:63)                                                                                                                                                  
    at Array.map (<anonymous>)                                                                                                                                  
    at requestHandler (C:\Users\user\AppData\Roaming\npm\node_modules\postgraphile\build\postgraphile\http\createPostGraphileHttpRequestHandler.js:435:52)                                                                                                                                   
    at <anonymous>                                                                                                                                              
    at process._tickCallback (internal/process/next_tick.js:188:7) 

localhost:500/graphiql に移動すると、ドキュメント エクスプローラーに「利用可能なスキーマがありません」と表示されます。

クエリルートはpublicスキーマですか? または何が欠けていますか?

4

1 に答える 1