Closed beaugunderson closed 5 years ago
Seems like some issue with the instrumentation code. Can you please show the original content of /Users/beau/p/canvas/home-app/static/scripts/views/pages/PopulationHealth/NewCampaign.tsx
, around the function declaration of the compose
function?
@urish here you go:
export default compose(
graphql<InputProps, NewCampaignPatients, NewCampaignPatientsVariables>(NEW_CAMPAIGN_PATIENTS, {
options: ({
match: {
params: { search = '' }
}
}) => ({
variables: { search }
})
}),
graphql<InputProps, NewCampaignCreateCampaign, NewCampaignCreateCampaignVariables>(
CREATE_CAMPAIGN,
{
options: {
update: (cache, { data: { createCampaign } }) => {
const variables = { filter: '' };
const { campaigns } = cache.readQuery({ query: GET_CAMPAIGNS, variables });
cache.writeQuery({
query: GET_CAMPAIGNS,
variables,
data: {
campaigns: {
...campaigns,
edges: campaigns.edges.concat({
node: createCampaign
})
}
}
});
}
}
}
)
)(NewCampaign);
just to be clear though, is typewiz
expected to work with babel-loader
? we use tsc
for type-checking but never compile down to JS with it and instead use babel-loader
for that transformation (which I believe is a fairly common way to do things now but is also relatively new, so I figured I should check that first)
I see this during webpack compilation:
I use this as the loader for
tsx
files: