Skip to content

Commit

Permalink
Export ProfilerContext in react-relay (#4049)
Browse files Browse the repository at this point in the history
Summary:
This context allows re-association of log events with their location in the react tree. We're aiming to use this information for understanding performance the same way Meta does.

The matching type was already being exported.

Fixes #4048 (the flow side of the picture)

Pull Request resolved: #4049

Reviewed By: voideanvalue

Differential Revision: D38936883

Pulled By: josephsavona

fbshipit-source-id: ef93e2e58dcb0a4ec14d7f0bd45d9fb11d3367ea
  • Loading branch information
tomgasson authored and facebook-github-bot committed Sep 13, 2022
1 parent 74ac368 commit 96df067
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/react-relay/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const useRelayEnvironment = require('./relay-hooks/useRelayEnvironment');
const useSubscribeToInvalidationState = require('./relay-hooks/useSubscribeToInvalidationState');
const useSubscription = require('./relay-hooks/useSubscription');
const RelayRuntime = require('relay-runtime');
const ProfilerContext = require('./relay-hooks/ProfilerContext');

export type * from './relay-hooks/EntryPointTypes.flow';
export type {
Expand Down Expand Up @@ -78,6 +79,8 @@ module.exports = {
EntryPointContainer: EntryPointContainer,
RelayEnvironmentProvider: RelayEnvironmentProvider,

ProfilerContext: ProfilerContext,

fetchQuery: RelayRuntime.fetchQuery,

loadQuery: loadQuery,
Expand Down
3 changes: 3 additions & 0 deletions packages/react-relay/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const useRelayEnvironment = require('./relay-hooks/useRelayEnvironment');
const useSubscribeToInvalidationState = require('./relay-hooks/useSubscribeToInvalidationState');
const useSubscription = require('./relay-hooks/useSubscription');
const RelayRuntime = require('relay-runtime');
const ProfilerContext = require('./relay-hooks/ProfilerContext');

export type {
$FragmentRef,
Expand Down Expand Up @@ -108,6 +109,8 @@ module.exports = {
EntryPointContainer: EntryPointContainer,
RelayEnvironmentProvider: RelayEnvironmentProvider,

ProfilerContext: ProfilerContext,

fetchQuery: RelayRuntime.fetchQuery,

loadQuery: loadQuery,
Expand Down

0 comments on commit 96df067

Please sign in to comment.