Added graphql
This commit is contained in:
12
src/pages/_app.tsx
Normal file
12
src/pages/_app.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import '../styles/globals.css'
|
||||
import type { AppProps } from 'next/app'
|
||||
import { useApollo } from '../lib/graphql/apollo'
|
||||
import { ApolloProvider } from '@apollo/client'
|
||||
|
||||
function MyApp({ Component, pageProps }: AppProps) {
|
||||
const apolloClient = useApollo(pageProps.initialApolloState)
|
||||
|
||||
return <ApolloProvider client={apolloClient}><Component {...pageProps} /></ApolloProvider>
|
||||
}
|
||||
|
||||
export default MyApp
|
||||
Reference in New Issue
Block a user