Hooks File System - rkaku/udemy-graphql-with-react-intro-search-repos GitHub Wiki

npm install apollo-boost @apollo/react-hooks graphql

index.js

import React from 'react'

import { render } from 'react-dom'

import App from './App'

App.js

import React, { useState } from 'react'

import { ApolloProvider, useQuery } from '@apollo/react-hooks'

import { GRAPHQL } from './graphql'

import client from './client'

graphql.js

import { gql } from "apollo-boost"

client.js

import ApolloClient from 'apollo-boost'

import { InMemoryCache } from 'apollo-cache-inmemory'

import { ApolloLink } from 'apollo-link'

import { HttpLink } from 'apollo-link-http'