Skip to content

Instantly share code, notes, and snippets.

@stubailo
Created November 26, 2018 17:13
Show Gist options
  • Select an option

  • Save stubailo/0d1ff3491c123d1d4be436c270d93aeb to your computer and use it in GitHub Desktop.

Select an option

Save stubailo/0d1ff3491c123d1d4be436c270d93aeb to your computer and use it in GitHub Desktop.

Revisions

  1. stubailo renamed this gist Nov 26, 2018. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. stubailo created this gist Nov 26, 2018.
    16 changes: 16 additions & 0 deletions ApolloLoadingProvider.jsx
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    const LoadingProvider = (props) => {
    const link = new ApolloLink((operation) => {
    return new Observable(() => {});
    });

    const client = new ApolloClient({
    link,
    cache: new InMemoryCache(),
    });

    return (
    <ApolloProvider client={client}>
    {props.children}
    </ApolloProvider>
    );
    };