candyleer opened a new pull request #154: fix Field 'name' in type 
'AppServerInfo' is undefined error in javascript
URL: https://github.com/apache/incubator-skywalking-ui/pull/154
 
 
   in web ui menu "Server",it throw an exception that is
   ```
   Validation error of type FieldUndefined: Field 'name' in type 
'AppServerInfo' is undefined
   ```
   so i trace it in client js and server,i found that in this url
   `http://localhost:8080/api/server/search` it's response is
   ```
   {
       "errors": [
           {
               "message": "Validation error of type FieldUndefined: Field 
'name' in type 'AppServerInfo' is undefined"
           }
       ]
   }
   ```
   continue, this is producted in Graphql in server-side,the 
`server-layer.graphql` definition of `AppServerInfo` is
   ```
   type AppServerInfo {
       id: ID!
       osName: String!
       applicationId: Int!
       applicationCode: String
       callsPerSec: Int!
       host: String
       pid: Int
       ipv4: [String!]!
   }
   ```
   but in javascript.the field is `name` ,see `Server.js`,that is
   ```
    query={`
                     query SearchServer($keyword: String!, $duration: 
Duration!) {
                       searchServer(keyword: $keyword, duration: $duration) {
                         key: id
                         name
                         host
                         pid
                         ipv4
                         applicationCode
                       }
                     }
                   `}
   ```
   
   the field is `name`,not 'osName' is server's graphql definition,so this 
error occur.
   In summary, the data structure of the server and client are inconsistent

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to