
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
apollo-link-local
Advanced tools
An Apollo Link to execute queries against a local schema. Useful for SSR query execution or client side schemas.
npm install apollo-link-local --save
import { LocalLink } from "apollo-link-local";
import { makeExecutableSchema } from "graphql-tools";
/* Generate an executable schema */
const schema = makeExecutableSchema({ typeDefs, resolvers });
const link = new LocalLink({ schema });
The context generated by ApolloLink is handed to the GraphQL context at execution. If you need context available in a resolver pass it via a Link.
If you're building SSR and have access to the executable schema on the same
server, you may find LocalLink
makes good sense. It enables you to hydrate SSR
state from without needing to make network calls.
GraphQL typically requires mutual agreement to adopt the technology on both the server and client. However, there may be reasons why it's not practical to host a GraphQL service, whether organisational, technical, or otherwise.
Consider the case of a GraphQL service backed by an existing RESTful API. With
LocalLink
, the schema could exist and resolve to RESTful endpoints entirely
client side allowing you to benefit from other Apollo tooling such as caching,
query fragments, and more.
FAQs
Apollo link that executes against a local schema
The npm package apollo-link-local receives a total of 2 weekly downloads. As such, apollo-link-local popularity was classified as not popular.
We found that apollo-link-local 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.