
Security News
Meet Socket at Black Hat Europe and BSides London 2025
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.
apollo-link-prime
Advanced tools
Apollo Link provider for Prime
yarn add -S apollo-link-prime
or
npm install -S apollo-link-prime
import { PrimeLink } from 'apollo-link-prime';
const apolloClient = new ApolloClient({
link: PrimeLink({
url: 'https://prime.example.com',
accessToken?: '',
ssrMode?: false,
linkResolver?: (document, schema) => '/',
cookies?: { [key: string]: string },
}),
cache: new InMemoryCache()
});
| parameter | type | default | description |
|---|---|---|---|
| url | string | required | Absolute URL with no path at the end to a Prime endpoint |
| accessToken | string | undefined | Permanent server token or JWT access token (private api enabled) |
| ssrMode | boolean | false | If enabled, client will store a preview cookie and reload the page. |
| linkResolver | Function | undefined | This function can return a redirect path for the previewed document in question |
| cookies | object | undefined | Pass cookies from express etc. in object format. The link will read stored preview cookie from ssrMode |
You read preview state and clear it with the following utility functions.
import { clearPreview, isPreviewing } from 'apollo-link-prime';
// client code
if (isPreviewing()) {
button.onclick = () => clearPreview();
}
FAQs
Apollo link for Prime
We found that apollo-link-prime demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.