Skip to content

Commit

Permalink
Merge pull request #4237 from marmelab/fix_graphql_demo
Browse files Browse the repository at this point in the history
Fix graphql demo
  • Loading branch information
fzaninotto authored Jan 3, 2020
2 parents efb332c + 27eb1c6 commit 77beedc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions examples/demo/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ const App = () => {
restoreFetch = await fakeServerFactory(
process.env.REACT_APP_DATA_PROVIDER
);

const dataProviderInstance = await dataProviderFactory(
process.env.REACT_APP_DATA_PROVIDER
);
setDataProvider(
await dataProviderFactory(process.env.REACT_APP_DATA_PROVIDER)
// GOTCHA: dataProviderInstance can be a function
() => dataProviderInstance
);
};

Expand Down

0 comments on commit 77beedc

Please sign in to comment.