Fixes 40251 - Change GraphQL fetchPolicy for Inventory View (#40814) (#40873)

* Fixes #40251 - Change fetchPolicy for Inventory View

* Refactoring resposne
This commit is contained in:
Chris Cowan 2019-07-11 14:50:28 -07:00 committed by GitHub
parent 69cc616823
commit c8efddb38e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,7 +44,7 @@ export const WithWaffleNodes = ({
}: WithWaffleNodesProps) => (
<Query<WaffleNodesQuery.Query, WaffleNodesQuery.Variables>
query={waffleNodesQuery}
fetchPolicy="no-cache"
fetchPolicy="network-only"
notifyOnNetworkStatusChange
variables={{
sourceId,
@ -55,11 +55,11 @@ export const WithWaffleNodes = ({
filterQuery,
}}
>
{({ data, loading, refetch }) =>
{({ data, loading, refetch, error }) =>
children({
loading,
nodes:
data && data.source && data.source.snapshot && data.source.snapshot.nodes
!error && data && data.source && data.source.snapshot && data.source.snapshot.nodes
? data.source.snapshot.nodes
: [],
refetch,