Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
@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.
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.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.