@airbnb/lunar-apollo
Version:
Apollo and GraphQL utilities.
16 lines (15 loc) • 448 B
JavaScript
import _pt from "prop-types";
import React from 'react';
import { ApolloProvider } from '@apollo/client';
import Apollo from '../..';
/**
* Context based component that provides Apollo's client to all Query and Mutation components.
* Must be rendered at the root of an application.
*/
export default function Provider({
children
}) {
return /*#__PURE__*/React.createElement(ApolloProvider, {
client: Apollo.getClient()
}, children);
}