After adding is-auth.js, data is not fetching for the soap api end point. #3055
Unanswered
shamsheer390
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
module.exports = {
isAuth: next => (root, args, context, info) => {
// Check if Authorization header is present
context.headers.newThing = 'newThing'
if(!context.headers.authorization) {
context.res.status(401);
throw new Error('unauthorized');
}
return next(root, args, context, info);
}
};
meshrc.yml:
sources:
handler:
soap:
wsdl: https://www.crcind.com/csp/samples/SOAP.Demo.cls?WSDL
transforms:
mode: bare
compositions:
- resolver: "Query."
composer: ./src/is-auth#isAuth
- resolver: "Mutation."
composer: ./src/is-auth#isAuth
Beta Was this translation helpful? Give feedback.
All reactions