Skip to content

Commit

Permalink
Provide default to loadQuery TEnvironmentProviderOptions tparam
Browse files Browse the repository at this point in the history
Reviewed By: jbrown215

Differential Revision: D40406760

fbshipit-source-id: 5c1a716260d731034aa0c85c54b126eb8065feb8
  • Loading branch information
SamChou19815 authored and facebook-github-bot committed Oct 15, 2022
1 parent e1d8da1 commit aa261bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/react-relay/relay-hooks/loadQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
'use strict';

import type {
EnvironmentProviderOptions,
LoadQueryOptions,
PreloadableConcreteRequest,
PreloadedQueryInner,
Expand Down Expand Up @@ -55,7 +56,10 @@ function useTrackLoadQueryInRender() {
}
}

function loadQuery<TQuery: OperationType, TEnvironmentProviderOptions>(
function loadQuery<
TQuery: OperationType,
TEnvironmentProviderOptions = EnvironmentProviderOptions,
>(
environment: IEnvironment,
preloadableRequest: GraphQLTaggedNode | PreloadableConcreteRequest<TQuery>,
variables: TQuery['variables'],
Expand Down

0 comments on commit aa261bf

Please sign in to comment.