
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
relay-local-schema-nodonisko
Advanced tools
Use Relay without a GraphQL server.
import { Environment } from 'react-relay';
import { Network } from 'relay-local-schema';
import schema from './data/schema';
const environment = new Environment({
network: Network.create({ schema }),
/* ... */
});
This will execute queries against the specified schema locally, rather than against a separate GraphQL server.
You can also specify a GraphQL.js rootValue
or contextValue
:
const environment = new Environment({
network: Network.create({
schema,
rootValue: 'foo',
contextValue: 'bar',
}),
/* ... */
});
For more control over the network layer, you can use createFetch
to create just the fetch function.
import { Environment, Network } from 'react-relay';
import { createFetch } from 'relay-local-schema';
import schema from './data/schema';
const environment = new Environment({
network: Network.create(createFetch({ schema })),
/* ... */
});
import RelayLocalSchema from 'relay-local-schema/lib/classic';
import schema from './data/schema';
Relay.injectNetworkLayer(
new RelayLocalSchema.NetworkLayer({ schema })
);
This will execute queries against the specified schema locally, rather than against a separate GraphQL server.
You can also supply a GraphQL.js rootValue
or contextValue
, or an onError
callback:
Relay.injectNetworkLayer(
new RelayLocalSchema.NetworkLayer({
schema,
rootValue: 'foo',
contextValue: 'bar',
onError: (errors, request) => console.error(errors, request),
})
);
This is intended for exploratory work, integration tests, demos, and working with local data. This is not generally intended as a substitute for a remote GraphQL back end in production.
FAQs
Use Relay without a GraphQL server
The npm package relay-local-schema-nodonisko receives a total of 1 weekly downloads. As such, relay-local-schema-nodonisko popularity was classified as not popular.
We found that relay-local-schema-nodonisko 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
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.