Skip to content

Commit

Permalink
Minor updates to docs on enabling relay resolvers (#4824)
Browse files Browse the repository at this point in the history
Summary:
The docs seem a little out of date. On my machine and relay v18.0, `LiveResolverStore` has a new path and `relayFieldLogger` doesn't seem to exist (I assume `requiredFieldLogger` does the same thing, but I'm not sure)

Filled out the CLA shortly before submitting this PR, please let me know if there's anything else I should do

Pull Request resolved: #4824

Reviewed By: gordyf

Differential Revision: D64442791

Pulled By: captbaritone

fbshipit-source-id: 3eb49ea679e1eaddce1bdff294d17b8c82505ae7
  • Loading branch information
bluegoo192 authored and facebook-github-bot committed Oct 18, 2024
1 parent 5c20422 commit ebc4936
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Relay Resolvers must be enabled in your runtime code by using our experimental `
```ts
import { Environment, RecordSource, RelayFeatureFlags } from "relay-runtime";
// highlight-next-line
import LiveResolverStore from "relay-runtime/lib/store/experimental-live-resolvers/LiveResolverStore";
import LiveResolverStore from "relay-runtime/lib/store/live-resolvers/LiveResolverStore";

RelayFeatureFlags.ENABLE_RELAY_RESOLVERS = true;

Expand All @@ -30,7 +30,7 @@ function fieldLogger(event) {
const environment = new Environment({
network: Network.create(/* your fetch function here */),
store: new LiveResolverStore(new RecordSource()),
relayFieldLogger: fieldLogger
requiredFieldLogger: fieldLogger
});

// ... create your Relay context with your environment
Expand Down

0 comments on commit ebc4936

Please sign in to comment.