relay-nextjs
Advanced tools
Comparing version 0.6.0 to 0.7.0
{ | ||
"name": "relay-nextjs", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "Use Relay in your Next.js apps!", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
import type { NextPageContext, Redirect } from 'next'; | ||
import { NextRouter } from 'next/router'; | ||
import { ComponentType, ReactNode } from 'react'; | ||
import { PreloadedQuery } from 'react-relay/hooks'; | ||
import { PreloadedQuery, PreloadFetchPolicy } from 'react-relay/hooks'; | ||
import { Environment, GraphQLTaggedNode, OperationType } from 'relay-runtime'; | ||
@@ -27,2 +27,3 @@ import { WiredErrorBoundaryProps } from './error_boundry'; | ||
ErrorComponent?: WiredErrorBoundaryProps['ErrorComponent']; | ||
fetchPolicy?: PreloadFetchPolicy; | ||
} | ||
@@ -29,0 +30,0 @@ export declare function Wire<Props extends WiredProps, ServerSideProps>(Component: ComponentType<Props>, query: GraphQLTaggedNode, opts: WiredOptions<Props, ServerSideProps>): { |
@@ -145,3 +145,3 @@ "use strict"; | ||
const preloadedQuery = hooks_1.loadQuery(env, query, variables, { | ||
fetchPolicy: 'store-and-network', | ||
fetchPolicy: opts.fetchPolicy || 'store-and-network', | ||
}); | ||
@@ -148,0 +148,0 @@ const context = context_1.createWiredClientContext({ |
30719
453