Removed the following packages to use Apollo Client v3 and Apollo Server v4 packages, @apollo/client and @apollo/server in their place:
apollo-cache-inmemory
apollo-client
apollo-link
apollo-link-error
apollo-link-http
apollo-server-express
apollo-utilities
Updated graphql packages
Replaced graphql-tools with @graphql-tools/schema
Removed graphql-tag to use @apollo/client:
import gql from "graphql-tag"; => import { gql } from "@apollo/client";
Replaced deprecated react-apollo:
import { ApolloProvider } from "react-apollo"; => import { ApolloProvider } from "@apollo/client";import { compose } from "react-apollo"; => import { flowRight as compose } from "lodash";
Refactored server/index.js and __test__/ files to work with updated apollo server + graphql packages
Created a babel.config.js file for Jest and update jest.config.js for pure ESM packages (this change solves the: “Jest encountered an unexpected token. Jest failed to parse a file.” error when running the test suite)
The existing .babelrc takes priority for app compilation. Jest tests, however, look at the settings in the babel.config.js file.
Fixes # (issue)
Description
Removed the following packages to use Apollo Client v3 and Apollo Server v4 packages,
@apollo/client
and@apollo/server
in their place: apollo-cache-inmemory apollo-client apollo-link apollo-link-error apollo-link-http apollo-server-express apollo-utilitiesUpdated graphql packages
Replaced graphql-tools with @graphql-tools/schema
Removed graphql-tag to use @apollo/client:
import gql from "graphql-tag";
=>import { gql } from "@apollo/client";
Replaced deprecated react-apollo:
import { ApolloProvider } from "react-apollo";
=>import { ApolloProvider } from "@apollo/client";
import { compose } from "react-apollo";
=>import { flowRight as compose } from "lodash";
Refactored
server/index.js
and__test__/
files to work with updated apollo server + graphql packagesCreated a babel.config.js file for Jest and update jest.config.js for pure ESM packages (this change solves the: “Jest encountered an unexpected token. Jest failed to parse a file.” error when running the test suite) The existing .babelrc takes priority for app compilation. Jest tests, however, look at the settings in the babel.config.js file.
Replaced deprecated @bandwidth/messaging with bandwidth-sdk (https://github.com/Bandwidth/node-sdk/releases/tag/v1.0.0, https://dev.bandwidth.com/migration-guides/node/v1#client-initialization)
Ran test suite (w/ postgres) before and after these changes, one test is failing:
Ran test suite (w/ sqlite) before and after these changes, two tests are failing:
Checklist: