Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add TRawResponse type to ClientQuery
Summary: Add TRawResponse type to ClientQuery In D38199301 I have a query like this with `raw_response_type` because I want to use it with `commitPayload` and get the raw response type to populate the local client state initially: ``` const QUERY = graphql` query PMTCalibrationV3ContainerQuery fb_owner(oncall: "people_performance") raw_response_type { pmt_client_state { calibration_state { show_confidential_information } } } `; const INITIAL_DATA: PMTCalibrationV3ContainerQuery$rawResponse = { pmt_client_state: {calibration_state: {show_confidential_information: false}}, }; environment.commitPayload(OPERATION, INITIAL_DATA); ``` However this leads to the following generated code in `PMTCalibrationV3ContainerQuery.graphql.js` which is invalid: ``` module.exports = ((node/*: any*/)/*: ClientQuery< PMTCalibrationV3ContainerQuery$variables, PMTCalibrationV3ContainerQuery$data, PMTCalibrationV3ContainerQuery$rawResponse, >*/); ``` I'm just matching the definition of the regular `Query` and hoping this is safe to do, since it doesn't seem like it actually does anything type checking wise Reviewed By: alunyov Differential Revision: D38293946 fbshipit-source-id: 7b56384b8bbd0cad5d261fab0ef41acd7ea87718
- Loading branch information