Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@8base/apollo-links
Advanced tools
A collection of Apollo links for more efficient communication with the 8base API.
A collection of Apollo links for more efficient communication with the 8base API.
Extends ApolloLink
Token Refresh Link renew authentication token when it's expired.
options
TokenRefreshLinkOptions The token refresh link options.
SuccessLink calls handler on every successful operation.
successHandler
Function success handler.Success handler takes the following parameters:
operation
Operation apollo graphql operation.import {
AuthLink,
FileUploadLink,
SuccessLink,
} from '@8base/apollo-links';
const successHandler = ({ operation }) => {
console.log(operation.getContext().someUsefulData);
};
const getAuthState = () => ({
workspace: '',
email: '',
userId: '',
token: '',
refreshToken: '',
});
const getRefreshTokenParameters = () => ({
email: '',
refreshToken: '',
});
const authSuccessHandler = ({ token, refreshToken}) => {
console.log({ token, refreshToken });
}
const authErrorHandler = () => {
console.log('Auth error');
}
const links = ApolloLink.from([
new FileUploadLink(),
new SuccessLink(successHandler),
new AuthLink({
getAuthState: getAuthState,
getRefreshTokenParameters: getRefreshTokenParameters,
onAuthSuccess: authSuccessHandler,
onAuthError: authErrorHandler,
}),
])
FAQs
A collection of Apollo links for more efficient communication with the 8base API.
We found that @8base/apollo-links demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.