const LoginQuery = gql`
mutation {
login(data: {
email: "cherineewong@gmail.com",
password: "Imagine100!"
})
}
`;
This is my graphql login api mutation code I don't get any response.
geting error like this Invariant Violation: Running a Query requires a graphql Query, but a Mutation was used instead.
I'm also use query keyword like this,
const LoginQuery = gql`
query mutation {
login(data: {
email: "cherineewong@gmail.com",
password: "Imagine100!"
})
}
`;
const { loading, error, data } = useQuery(LoginQuery);
console.log(data)
then getting error this as enter image description here