Reactconst EXCHANGE_RATES = gql`
mutation {
signUp(lastName: "Amasia")
}
`;
const HandlerRequest = () => {
const [loading, { data }] = useMutation(EXCHANGE_RATES);
console.log('apollo', data);
return <p>apollo</p>;
};
Schemagql`
extend type Mutation {
signUp(
lastName: String!
): String!
}
`;
ResolversMutation: {
signUp: async (
_,
{ lastName}
) => {
try {
console.log(lastName)
return lastName;
} catch (error) {
return 'error';
}
},
},
useMutation всегда возвращает data undefined. но в playground Graphql работают.Что я делаю нетак?