Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@8base/apollo-links
Advanced tools
The set of Apollo links for more useful communication with 8base API.
The set of Apollo links for more useful communication with 8base API.
Extends ApolloLink
Token Refresh Link renew authentication token when it's expired.
options
TokenRefreshLinkOptions The token refresh link options.
options.getRefreshTokenParameters
Function The function which are using for get refresh token parameters.options.onAuthSuccess
Function The callback which called when attempt to refresh authentication is success.options.onAuthError
Function? The callback which called when attempt to refresh authentication is failed.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 = () => ({
workaspace: '',
email: '',
userId: '',
idToken: '',
refreshToken: '',
});
const getRefreshTokenParameters = () => ({
email: '',
refreshToken: '',
});
const authSuccessHandler = ({ idToken, refreshToken}) => {
conolse.log({ idToken, 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.
The npm package @8base/apollo-links receives a total of 392 weekly downloads. As such, @8base/apollo-links popularity was classified as not popular.
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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.