Hello!
I am using the data from a GraphQL query as an argument for a mutation and I am seeing errors because __typename
is not recognized. This is a known issue and is meant to be addressed by the function RemoveTypenameFromVariables
I followed the instructions in the apollo article, and called
import { removeTypenameFromVariables } from '@apollo/client/link/remove-typename';
// Inside my JSX component, I called
const removeTypenameLink = removeTypenameFromVariables();
After calling this function, I am still seeing the same error related to __typename
not being recognized. Curious to know if there is an additional step missing in the apollo docs.
I am using “@apollo/client”: “^3.8.3”
Error
Message: Variable “$input” got invalid value { __typename: “MeasurementObservationValue”, measurement: 85804, units: “cm” } at “input.patientObservations.fundalHeight”; Field “__typename” is not defined by type “MeasurementObservationValueInput”.