diff --git a/.storybook/preview.js b/.storybook/preview.js index c7d752fa..4afdfb99 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -20,7 +20,7 @@ export const parameters = { }; // If you need to mock apollo queries -//import { MockedProvider } from "@apollo/react-testing"; +//import { MockedProvider } from "@apollo/react/testing"; //import mocks from "add path to your graphql mocks here" //const withApolloMockProvider = (storyFn) => ( // diff --git a/package.json b/package.json index 8eea6b71..1de4ba6e 100644 --- a/package.json +++ b/package.json @@ -44,18 +44,11 @@ "build-storybook": "build-storybook" }, "dependencies": { - "@apollo/react-hooks": "3.1.3", - "@apollo/react-ssr": "3.1.3", - "@apollo/react-testing": "3.1.4", + "@apollo/client": "^3.2.0", "@material-ui/core": "^4.10.2", "@mdx-js/loader": "^1.6.6", "@mdx-js/react": "^1.6.13", "@next/mdx": "^9.4.4", - "apollo-cache-inmemory": "1.6.6", - "apollo-client": "2.6.9", - "apollo-link": "1.2.14", - "apollo-link-error": "^1.1.13", - "apollo-link-http": "1.5.17", "apollo-server-express": "2.14.2", "babel-jest": "26.0.1", "babel-plugin-istanbul": "6.0.0", diff --git a/packages/@vulcan/next-apollo/apolloClient.ts b/packages/@vulcan/next-apollo/apolloClient.ts index b2eca62d..4ece0984 100644 --- a/packages/@vulcan/next-apollo/apolloClient.ts +++ b/packages/@vulcan/next-apollo/apolloClient.ts @@ -8,13 +8,16 @@ import { NormalizedCacheObject } from "@apollo/client"; */ -import { ApolloClient } from "@apollo/client"; +import { IncomingHttpHeaders } from "http"; +import { ApolloClient, from, createHttpLink } from "@apollo/client"; import { InMemoryCache, NormalizedCacheObject } from "@apollo/client/cache"; -import { createHttpLink } from "apollo-link-http"; -import { from } from "apollo-link"; -import fetch from "isomorphic-unfetch"; +// TODO: Isomorphic-unfetch will produce a window not defined after a Webpack build for unknow reason "isomorphic-unfetch"; +// next-with-apollo depends on it already internally, so we had to add a Webpack alias too to bypass it +import fetch from "cross-fetch"; import { NextPageContext } from "next"; import { isServerRenderCtx } from "@vulcan/next-utils"; +import debug from "debug"; +const debugApollo = debug("vn:apollo"); import errorLink from "./links/error"; @@ -28,19 +31,61 @@ const httpLink = (graphqlUri: string, ctx?: NextPageContext) => fetch, // pass our custom fetch (here we need an isomorphic call) }); +export interface CreateApolloClientArgs { + graphqlUri: string; + ctx?: NextPageContext; + initialState?: NormalizedCacheObject; + headers?: IncomingHttpHeaders; +} + // graphqlUri must be specified at apollo client initialization -export default function createApolloClient( - graphqlUri: string, - initialState: NormalizedCacheObject, - ctx?: NextPageContext -) { +export default function createApolloClient({ + graphqlUri, + initialState, + ctx, +}: CreateApolloClientArgs) { // The `ctx` (NextPageContext) will only be present on the server. // use it to extract auth headers (ctx.req) or similar. - return new ApolloClient({ + debugApollo("Creating an Apollo client"); + const client = new ApolloClient({ name: "default-client", connectToDevTools: !Boolean(ctx), ssrMode: Boolean(ctx), link: from([errorLink, httpLink(graphqlUri, ctx)]), cache: new InMemoryCache().restore(initialState), }); + if (!ctx) { + // client-side, store the Apollo client as the default upon creation + debugApollo("Storing new Apollo client as the default client"); + if (!defaultApolloClient) { + defaultApolloClient = client; + } else { + debugApollo("Default apollo client already initialized, doing nothing"); + } + } + return client; } + +// Create client-side Apollo client once +// We want this initialization to happen once for all +let defaultApolloClient; + +/** + * Get apollo client, either in the context of SSR rendering + * or client side + * @param params + */ +export const getApolloClient = (params?: CreateApolloClientArgs) => { + if (params && isServerRenderCtx(params.ctx)) { + // TODO: get client from request if any instead of creating it systematically + return createApolloClient(params); + } + // default apolloClient, note that it won't have any caching + // to be used in services for example, outside of React + if (!defaultApolloClient) { + throw new Error( + "Apollo client not initialized, did you wrap your page with `withApollo?`" + ); + } + return defaultApolloClient; +}; diff --git a/packages/@vulcan/next-apollo/index.ts b/packages/@vulcan/next-apollo/index.ts index d1acaf2a..e36cc27f 100644 --- a/packages/@vulcan/next-apollo/index.ts +++ b/packages/@vulcan/next-apollo/index.ts @@ -1 +1,2 @@ -export { default as withApollo } from "./withApollo" \ No newline at end of file +export { default as withApollo } from "./withApollo"; +export { getApolloClient } from "./apolloClient"; diff --git a/packages/@vulcan/next-apollo/links/error.ts b/packages/@vulcan/next-apollo/links/error.ts index 2e4369b0..03d9cafb 100644 --- a/packages/@vulcan/next-apollo/links/error.ts +++ b/packages/@vulcan/next-apollo/links/error.ts @@ -1,5 +1,4 @@ -// import { onError } from "@apollo/link-error"; -import { onError } from "apollo-link-error"; +import { onError } from "@apollo/client/link/error"; import { GraphQLError } from "graphql"; const locationsToStr = (locations: GraphQLError["locations"] = []) => diff --git a/packages/@vulcan/next-apollo/package.json b/packages/@vulcan/next-apollo/package.json new file mode 100644 index 00000000..cfd87611 --- /dev/null +++ b/packages/@vulcan/next-apollo/package.json @@ -0,0 +1,25 @@ +{ + "name": "@vulcan/next-apollo", + "version": "0.0.1", + "description": "Vulcan Next Apollo bindings", + "main": "./dist/index.js", + "author": "eric-burel ", + "homepage": "https://github.com/VulcanJS/vulcan-npm#readme", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/VulcanJS/vulcan-npm.git" + }, + "scripts": { + "test": "echo \"Error: run tests from root\" && exit 1", + "build": "webpack --config ./webpack.config.js" + }, + "bugs": { + "url": "https://github.com/VulcanJS/vulcan-npm/issues" + }, + "dependencies": { + "@apollo/client": "^3.2.0", + "@vulcan/next-utils": "^0.0.1", + "next-with-apollo": "^5.1.0" + } +} diff --git a/packages/@vulcan/next-apollo/tsconfig.json b/packages/@vulcan/next-apollo/tsconfig.json new file mode 100644 index 00000000..e5a518ed --- /dev/null +++ b/packages/@vulcan/next-apollo/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./dist" + }, + "include": ["*.ts"] +} diff --git a/packages/@vulcan/next-apollo/webpack.config.js b/packages/@vulcan/next-apollo/webpack.config.js new file mode 100644 index 00000000..af370835 --- /dev/null +++ b/packages/@vulcan/next-apollo/webpack.config.js @@ -0,0 +1,10 @@ +const merge = require("webpack-merge"); +const path = require("path"); +const baseConfig = require("../../webpack/webpack.config.base.common.prod"); +//const merge = require('webpack-merge') +module.exports = merge(baseConfig, { + entry: path.resolve(__dirname, "./index.ts"), + output: { + path: path.resolve(__dirname, "dist"), + }, +}); diff --git a/packages/@vulcan/next-apollo/withApollo.tsx b/packages/@vulcan/next-apollo/withApollo.tsx index 1eb7fb91..75d7f54b 100644 --- a/packages/@vulcan/next-apollo/withApollo.tsx +++ b/packages/@vulcan/next-apollo/withApollo.tsx @@ -4,6 +4,7 @@ * - you can pass "ssr: true" instead of directly passing "getDataFromTree" * - you can change the graphqlUri */ +import React from "react"; import withApollo, { WithApolloOptions } from "next-with-apollo"; import createApolloClient from "./apolloClient"; import { NextPage } from "next"; @@ -12,9 +13,9 @@ import { NextPage } from "next"; // ApolloProvider, // NormalizedCacheObject //} from "@apollo/client"; -import { ApolloProvider } from "@apollo/react-hooks"; -import { NormalizedCacheObject } from "apollo-cache-inmemory"; -import { getDataFromTree as getDataFromTreeDefault } from "@apollo/react-ssr"; +import { ApolloProvider } from "@apollo/client"; +import { NormalizedCacheObject } from "@apollo/client/cache"; +import { getDataFromTree as getDataFromTreeDefault } from "@apollo/client/react/ssr"; // support the same options as next-with-apollo, but also additional client config + ssr activation export interface VulcanWithApolloOptions extends WithApolloOptions { @@ -26,7 +27,7 @@ const defaultOptions: Partial = { ssr: true, }; const initApolloClient = (graphqlUri: string) => ({ initialState, ctx }) => { - return createApolloClient(graphqlUri, initialState, ctx); + return createApolloClient({ graphqlUri, initialState, ctx }); }; const renderWithApolloProvider = ({ Page, props }) => { return ( @@ -35,7 +36,10 @@ const renderWithApolloProvider = ({ Page, props }) => { ); }; -const vulcanWithApollo = (Page: NextPage, options: VulcanWithApolloOptions = {}) => { +const vulcanWithApollo = ( + Page: NextPage, + options: VulcanWithApolloOptions = {} +) => { const mergedOptions = { ...defaultOptions, ...options }; const { graphqlUri, @@ -49,9 +53,11 @@ const vulcanWithApollo = (Page: NextPage, options: VulcanWithApolloOptions = {}) const withApolloOptions = { getDataFromTree, renderFromOption }; + // next-with-apollo is using typings from Apollo v2, we need to ignore the error until it's updated 2654 + // @ts-ignore return withApollo(initApolloClient(graphqlUri), { render: renderWithApolloProvider, })(Page, withApolloOptions); }; -export default vulcanWithApollo; \ No newline at end of file +export default vulcanWithApollo; diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 742a16cf..5fe9901b 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -17,7 +17,7 @@ export function reportWebVitals(metric) { // Uncomment to enable app-wide Apollo SSR // Otherwise you'll need to call withApollo on each page import { withApollo } from "@vulcan/next-apollo"; -import { getDataFromTree } from "@apollo/react-ssr"; +import { getDataFromTree } from "@apollo/client/react/ssr"; */ // import environment from '@vulcan/multi-env-demo'; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 0b6310ab..e63a6df3 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,4 +1,4 @@ -import { useQuery /*, useMutation*/ } from "@apollo/react-hooks"; +import { useQuery /*, useMutation*/ } from "@apollo/client"; import gql from "graphql-tag"; import Home from "~/components/home"; //import { useForm } from "react-hook-form"; diff --git a/src/pages/vns/debug/apolloSsr.tsx b/src/pages/vns/debug/apolloSsr.tsx index 7da5902f..7e23477c 100644 --- a/src/pages/vns/debug/apolloSsr.tsx +++ b/src/pages/vns/debug/apolloSsr.tsx @@ -1,4 +1,4 @@ -import { useQuery /*, useMutation*/ } from "@apollo/react-hooks"; +import { useQuery /*, useMutation*/ } from "@apollo/client"; import gql from "graphql-tag"; import { withApollo } from "@vulcan/next-apollo"; diff --git a/src/pages/vns/debug/mongo.tsx b/src/pages/vns/debug/mongo.tsx index cbcd9e0b..7958b812 100644 --- a/src/pages/vns/debug/mongo.tsx +++ b/src/pages/vns/debug/mongo.tsx @@ -1,4 +1,4 @@ -import { useQuery } from "@apollo/react-hooks"; +import { useQuery } from "@apollo/client"; import gql from "graphql-tag"; import { withApollo } from "@vulcan/next-apollo"; const MongoDebugPage = () => { diff --git a/yarn.lock b/yarn.lock index b758bd53..14cdd809 100644 --- a/yarn.lock +++ b/yarn.lock @@ -53,6 +53,26 @@ dependencies: cross-fetch "3.0.5" +"@apollo/client@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.2.0.tgz#d16ea4384a2126bf60e7d87b0a6c6df00382220b" + integrity sha512-6ISMYW9QpEykJAkN6ZZteTkXXwtYSPGbh+4iBZ478p/Eox1JOMGYlqosGgMGv2oduug9SnsR65y0iCAxKOFGiQ== + dependencies: + "@graphql-typed-document-node/core" "^3.0.0" + "@types/zen-observable" "^0.8.0" + "@wry/context" "^0.5.2" + "@wry/equality" "^0.2.0" + fast-json-stable-stringify "^2.0.0" + graphql-tag "^2.11.0" + hoist-non-react-statics "^3.3.2" + optimism "^0.12.1" + prop-types "^15.7.2" + symbol-observable "^2.0.0" + terser "^5.2.0" + ts-invariant "^0.4.4" + tslib "^1.10.0" + zen-observable "^0.8.14" + "@apollo/protobufjs@^1.0.3": version "1.0.5" resolved "https://registry.yarnpkg.com/@apollo/protobufjs/-/protobufjs-1.0.5.tgz#a78b726147efc0795e74c8cb8a11aafc6e02f773" @@ -72,52 +92,6 @@ "@types/node" "^10.1.0" long "^4.0.0" -"@apollo/react-common@^3.1.3", "@apollo/react-common@^3.1.4": - version "3.1.4" - resolved "https://registry.yarnpkg.com/@apollo/react-common/-/react-common-3.1.4.tgz#ec13c985be23ea8e799c9ea18e696eccc97be345" - integrity sha512-X5Kyro73bthWSCBJUC5XYQqMnG0dLWuDZmVkzog9dynovhfiVCV4kPSdgSIkqnb++cwCzOVuQ4rDKVwo2XRzQA== - dependencies: - ts-invariant "^0.4.4" - tslib "^1.10.0" - -"@apollo/react-hooks@3.1.3": - version "3.1.3" - resolved "https://registry.yarnpkg.com/@apollo/react-hooks/-/react-hooks-3.1.3.tgz#ad42c7af78e81fee0f30e53242640410d5bd0293" - integrity sha512-reIRO9xKdfi+B4gT/o/hnXuopUnm7WED/ru8VQydPw+C/KG/05Ssg1ZdxFKHa3oxwiTUIDnevtccIH35POanbA== - dependencies: - "@apollo/react-common" "^3.1.3" - "@wry/equality" "^0.1.9" - ts-invariant "^0.4.4" - tslib "^1.10.0" - -"@apollo/react-hooks@^3.1.3": - version "3.1.5" - resolved "https://registry.yarnpkg.com/@apollo/react-hooks/-/react-hooks-3.1.5.tgz#7e710be52461255ae7fc0b3b9c2ece64299c10e6" - integrity sha512-y0CJ393DLxIIkksRup4nt+vSjxalbZBXnnXxYbviq/woj+zKa431zy0yT4LqyRKpFy9ahMIwxBnBwfwIoupqLQ== - dependencies: - "@apollo/react-common" "^3.1.4" - "@wry/equality" "^0.1.9" - ts-invariant "^0.4.4" - tslib "^1.10.0" - -"@apollo/react-ssr@3.1.3": - version "3.1.3" - resolved "https://registry.yarnpkg.com/@apollo/react-ssr/-/react-ssr-3.1.3.tgz#0791280d5b735f42f87dbfe849564e78843045bc" - integrity sha512-fUTmEYHxSTX1GA43B8vICxXXplpcEBnDwn0IgdAc3eG0p2YK97ZrJDRFCJ5vD7fyDZsrYhMf+rAI3sd+H2SS+A== - dependencies: - "@apollo/react-common" "^3.1.3" - "@apollo/react-hooks" "^3.1.3" - tslib "^1.10.0" - -"@apollo/react-testing@3.1.4": - version "3.1.4" - resolved "https://registry.yarnpkg.com/@apollo/react-testing/-/react-testing-3.1.4.tgz#f2e1b9b65a0bd773facf54db4fdb5995d162a72a" - integrity sha512-1eKjN36UfIAnBVmfLbl12vQ/eCjTqYdaU95chGIQzT2uHd5BnasJu0z+MwXBrEs57A9WY9mFvLZxdjzQJXaacA== - dependencies: - "@apollo/react-common" "^3.1.4" - fast-json-stable-stringify "^2.0.0" - tslib "^1.10.0" - "@apollographql/apollo-tools@^0.4.3": version "0.4.8" resolved "https://registry.yarnpkg.com/@apollographql/apollo-tools/-/apollo-tools-0.4.8.tgz#d81da89ee880c2345eb86bddb92b35291f6135ed" @@ -1792,6 +1766,11 @@ dependencies: "@f/map-obj" "^1.2.2" +"@graphql-typed-document-node/core@^3.0.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.1.0.tgz#0eee6373e11418bfe0b5638f654df7a4ca6a3950" + integrity sha512-wYn6r8zVZyQJ6rQaALBEln5B1pzxb9shV5Ef97kTvn6yVGrqyXVnDqnU24MXnFubR+rZjBY9NWuxX3FB2sTsjg== + "@hapi/address@^4.1.0": version "4.1.0" resolved "https://registry.yarnpkg.com/@hapi/address/-/address-4.1.0.tgz#d60c5c0d930e77456fdcde2598e77302e2955e1d" @@ -3418,7 +3397,7 @@ "@types/node" "*" form-data "^3.0.0" -"@types/node@*", "@types/node@>=6": +"@types/node@*": version "14.6.4" resolved "https://registry.yarnpkg.com/@types/node/-/node-14.6.4.tgz#a145cc0bb14ef9c4777361b7bbafa5cf8e3acb5a" integrity sha512-Wk7nG1JSaMfMpoMJDKUsWYugliB2Vy55pdjLpmLixeyMi7HizW2I/9QoxsPCkXl3dO+ZOVqPumKaDUv5zJu2uQ== @@ -3901,21 +3880,27 @@ text-table "^0.2.0" webpack-log "^1.1.2" -"@wry/context@^0.4.0": - version "0.4.4" - resolved "https://registry.yarnpkg.com/@wry/context/-/context-0.4.4.tgz#e50f5fa1d6cfaabf2977d1fda5ae91717f8815f8" - integrity sha512-LrKVLove/zw6h2Md/KZyWxIkFM6AoyKp71OqpH9Hiip1csjPVoD3tPxlbQUNxEnHENks3UGgNpSBCAfq9KWuag== +"@wry/context@^0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@wry/context/-/context-0.5.2.tgz#f2a5d5ab9227343aa74c81e06533c1ef84598ec7" + integrity sha512-B/JLuRZ/vbEKHRUiGj6xiMojST1kHhu4WcreLfNN7q9DqQFrb97cWgf/kiYsPSUCAMVN0HzfFc8XjJdzgZzfjw== dependencies: - "@types/node" ">=6" tslib "^1.9.3" -"@wry/equality@^0.1.2", "@wry/equality@^0.1.9": +"@wry/equality@^0.1.2": version "0.1.11" resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.1.11.tgz#35cb156e4a96695aa81a9ecc4d03787bc17f1790" integrity sha512-mwEVBDUVODlsQQ5dfuLUS5/Tf7jqUKyhKYHmVi4fPB6bDMOfWvUPJmKgS1Z7Za/sOI3vzWt4+O7yCiL/70MogA== dependencies: tslib "^1.9.3" +"@wry/equality@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.2.0.tgz#a312d1b6a682d0909904c2bcd355b02303104fb7" + integrity sha512-Y4d+WH6hs+KZJUC8YKLYGarjGekBrhslDbf/R20oV+AakHPINSitHfDRQz3EGcEWc1luXYNUvMhawWtZVWNGvQ== + dependencies: + tslib "^1.9.3" + "@xtuc/ieee754@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" @@ -4183,39 +4168,6 @@ apollo-cache-control@^0.11.1: apollo-server-env "^2.4.5" apollo-server-plugin-base "^0.9.1" -apollo-cache-inmemory@1.6.6: - version "1.6.6" - resolved "https://registry.yarnpkg.com/apollo-cache-inmemory/-/apollo-cache-inmemory-1.6.6.tgz#56d1f2a463a6b9db32e9fa990af16d2a008206fd" - integrity sha512-L8pToTW/+Xru2FFAhkZ1OA9q4V4nuvfoPecBM34DecAugUZEBhI2Hmpgnzq2hTKZ60LAMrlqiASm0aqAY6F8/A== - dependencies: - apollo-cache "^1.3.5" - apollo-utilities "^1.3.4" - optimism "^0.10.0" - ts-invariant "^0.4.0" - tslib "^1.10.0" - -apollo-cache@^1.3.5: - version "1.3.5" - resolved "https://registry.yarnpkg.com/apollo-cache/-/apollo-cache-1.3.5.tgz#9dbebfc8dbe8fe7f97ba568a224bca2c5d81f461" - integrity sha512-1XoDy8kJnyWY/i/+gLTEbYLnoiVtS8y7ikBr/IfmML4Qb+CM7dEEbIUOjnY716WqmZ/UpXIxTfJsY7rMcqiCXA== - dependencies: - apollo-utilities "^1.3.4" - tslib "^1.10.0" - -apollo-client@2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/apollo-client/-/apollo-client-2.6.9.tgz#b04e4233972bb7cb8b2ad7a8c5901490fd50d476" - integrity sha512-l3z4Ddd82p5ezZWOlOd0TO+KyBh/EDZePNeB3fy3sjr/crvpCxNnQDdGfVadrzFX+DXRa8r8zSWANyWSDDUpdg== - dependencies: - "@types/zen-observable" "^0.8.0" - apollo-cache "^1.3.5" - apollo-link "^1.0.0" - apollo-utilities "^1.3.4" - symbol-observable "^1.0.2" - ts-invariant "^0.4.0" - tslib "^1.10.0" - zen-observable "^0.8.0" - apollo-datasource@^0.7.2: version "0.7.2" resolved "https://registry.yarnpkg.com/apollo-datasource/-/apollo-datasource-0.7.2.tgz#1662ee93453a9b89af6f73ce561bde46b41ebf31" @@ -4264,34 +4216,7 @@ apollo-graphql@^0.5.0: apollo-env "^0.6.5" lodash.sortby "^4.7.0" -apollo-link-error@^1.1.13: - version "1.1.13" - resolved "https://registry.yarnpkg.com/apollo-link-error/-/apollo-link-error-1.1.13.tgz#c1a1bb876ffe380802c8df0506a32c33aad284cd" - integrity sha512-jAZOOahJU6bwSqb2ZyskEK1XdgUY9nkmeclCrW7Gddh1uasHVqmoYc4CKdb0/H0Y1J9lvaXKle2Wsw/Zx1AyUg== - dependencies: - apollo-link "^1.2.14" - apollo-link-http-common "^0.2.16" - tslib "^1.9.3" - -apollo-link-http-common@^0.2.16: - version "0.2.16" - resolved "https://registry.yarnpkg.com/apollo-link-http-common/-/apollo-link-http-common-0.2.16.tgz#756749dafc732792c8ca0923f9a40564b7c59ecc" - integrity sha512-2tIhOIrnaF4UbQHf7kjeQA/EmSorB7+HyJIIrUjJOKBgnXwuexi8aMecRlqTIDWcyVXCeqLhUnztMa6bOH/jTg== - dependencies: - apollo-link "^1.2.14" - ts-invariant "^0.4.0" - tslib "^1.9.3" - -apollo-link-http@1.5.17: - version "1.5.17" - resolved "https://registry.yarnpkg.com/apollo-link-http/-/apollo-link-http-1.5.17.tgz#499e9f1711bf694497f02c51af12d82de5d8d8ba" - integrity sha512-uWcqAotbwDEU/9+Dm9e1/clO7hTB2kQ/94JYcGouBVLjoKmTeJTUPQKcJGpPwUjZcSqgYicbFqQSoJIW0yrFvg== - dependencies: - apollo-link "^1.2.14" - apollo-link-http-common "^0.2.16" - tslib "^1.9.3" - -apollo-link@1.2.14, apollo-link@^1.0.0, apollo-link@^1.2.14: +apollo-link@^1.2.14: version "1.2.14" resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.14.tgz#3feda4b47f9ebba7f4160bef8b977ba725b684d9" integrity sha512-p67CMEFP7kOG1JZ0ZkYZwRDa369w5PIjtMjvrQd/HnIV8FRsHRqLqK+oAZQnFa1DDdZtOtHTi+aMIW6EatC2jg== @@ -4395,7 +4320,7 @@ apollo-tracing@^0.11.2: apollo-server-env "^2.4.5" apollo-server-plugin-base "^0.9.1" -apollo-utilities@^1.0.1, apollo-utilities@^1.3.0, apollo-utilities@^1.3.4: +apollo-utilities@^1.0.1, apollo-utilities@^1.3.0: version "1.3.4" resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.3.4.tgz#6129e438e8be201b6c55b0f13ce49d2c7175c9cf" integrity sha512-pk2hiWrCXMAy2fRPwEyhvka+mqwzeP60Jr1tRYi5xru+3ko94HI9o6lK0CT33/w4RDlxWchmdhDCrvdr+pHCig== @@ -8791,7 +8716,7 @@ graphql-tag@2.10.3: resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.10.3.tgz#ea1baba5eb8fc6339e4c4cf049dabe522b0edf03" integrity sha512-4FOv3ZKfA4WdOKJeHdz6B3F/vxBLSgmBcGeAFPf4n1F64ltJUvOOerNj0rsJxONQGdhUMynQIvd6LzB+1J5oKA== -graphql-tag@^2.9.2: +graphql-tag@^2.11.0, graphql-tag@^2.9.2: version "2.11.0" resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.11.0.tgz#1deb53a01c46a7eb401d6cb59dec86fa1cccbffd" integrity sha512-VmsD5pJqWJnQZMUeRwrDhfgoyqcfwEkvtpANqcoUG8/tOLkwNgU9mzub/Mc78OJMhHjx7gfAMTxzdG43VGg3bA== @@ -12167,12 +12092,12 @@ opener@^1.5.1: resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== -optimism@^0.10.0: - version "0.10.3" - resolved "https://registry.yarnpkg.com/optimism/-/optimism-0.10.3.tgz#163268fdc741dea2fb50f300bedda80356445fd7" - integrity sha512-9A5pqGoQk49H6Vhjb9kPgAeeECfUDF6aIICbMDL23kDLStBn1MWk3YvcZ4xWF9CsSf6XEgvRLkXy4xof/56vVw== +optimism@^0.12.1: + version "0.12.1" + resolved "https://registry.yarnpkg.com/optimism/-/optimism-0.12.1.tgz#933f9467b9aef0e601655adb9638f893e486ad02" + integrity sha512-t8I7HM1dw0SECitBYAqFOVHoBAHEQBTeKjIL9y9ImHzAVkdyPK4ifTgM4VJRDtTUY4r/u5Eqxs4XcGPHaoPkeQ== dependencies: - "@wry/context" "^0.4.0" + "@wry/context" "^0.5.2" optionator@^0.8.1, optionator@^0.8.3: version "0.8.3" @@ -14914,11 +14839,16 @@ svgo@^1.2.2: unquote "~1.1.1" util.promisify "~1.0.0" -symbol-observable@1.2.0, symbol-observable@^1.0.2, symbol-observable@^1.0.4, symbol-observable@^1.1.0: +symbol-observable@1.2.0, symbol-observable@^1.0.4, symbol-observable@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== +symbol-observable@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-2.0.1.tgz#ce66c36a04ed0f3056e7293184749a6fdd7063ea" + integrity sha512-QrfHrrEUMadQCgMijc3YpfA4ncwgqGv58Xgvdu3JZVQB7iY7cAkiqobZEZbaA863jof8AdpR01CPnZ5UWeqZBQ== + symbol-tree@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" @@ -15032,6 +14962,15 @@ terser@4.8.0, terser@^4.1.2, terser@^4.6.3, terser@^4.8.0: source-map "~0.6.1" source-map-support "~0.5.12" +terser@^5.2.0: + version "5.3.2" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.3.2.tgz#f4bea90eb92945b2a028ceef79181b9bb586e7af" + integrity sha512-H67sydwBz5jCUA32ZRL319ULu+Su1cAoZnnc+lXnenGRYWyLE3Scgkt8mNoAsMx0h5kdo758zdoS0LG9rYZXDQ== + dependencies: + commander "^2.20.0" + source-map "~0.6.1" + source-map-support "~0.5.12" + test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" @@ -16236,7 +16175,7 @@ zen-observable-ts@^0.8.21: tslib "^1.9.3" zen-observable "^0.8.0" -zen-observable@^0.8.0: +zen-observable@^0.8.0, zen-observable@^0.8.14: version "0.8.15" resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz#96415c512d8e3ffd920afd3889604e30b9eaac15" integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==