check records what the schema check found for a request and its response.
(entry *loggedRequest, resp *response)
| 66 | |
| 67 | // check records what the schema check found for a request and its response. |
| 68 | func (m *mockServer) check(entry *loggedRequest, resp *response) { |
| 69 | if m.checker == nil { |
| 70 | return |
| 71 | } |
| 72 | res := m.checker.checkRequest(*entry, resp) |
| 73 | entry.QueryProblems = res.queryProblems |
| 74 | entry.SchemaProblems = res.responseProblems |
| 75 | entry.SchemaNote = res.note |
| 76 | entry.OffSchema = resp != nil && resp.OffSchema |
| 77 | } |
| 78 | |
| 79 | // graphQLSchema returns GitHub's GraphQL schema, or nil if checks are off or |
| 80 | // it couldn't be loaded. |