I'm new to graphQL and was recently told to learn it. I'm trying to do a post request by registering an account but I get an error saying I need a subfield.
const getLoggedInUser = async req => {
const token = req.headers["x-token"];
if (token) {
try {
return await jwt.verify(token, process.env.JWT_SECRET);
} catch (e) {
throw new AuthenticationError(AUTHORISATION_MESSAGES.SESSION_EXPIRED);
}
}
};