From 56239ad899d487448d31a1559ddaab96ef4fb5ff Mon Sep 17 00:00:00 2001 From: Devin Despain Date: Mon, 22 Nov 2021 18:08:43 -0700 Subject: [PATCH 1/3] Update README.md Updates readme to point to the latest @apollo package path --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5c74777..d607323 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,8 @@ This plugin adds the following options to the PostGraphile library options: * string, variables?: any, operationName?: string, extensions?: any}`, but * in the case of persisted operations it likely won't have a `query` * property), and must extract the hash to use to identify the persisted - * operation. For Apollo Client, this might be something like: + * operation. For + Client, this might be something like: * `request?.extensions?.persistedQuery?.sha256Hash`; for Relay something * like: `request?.documentId`. */ @@ -217,10 +218,10 @@ postgraphile \ #### Apollo Client You can configure Apollo Client to send the persisted operations generated by -`graphql-codegen` with `apollo-link-persisted-queries`: +`graphql-codegen` with `@apollo/link-persisted-queries`: ```ts -import { createPersistedQueryLink } from "apollo-link-persisted-queries"; +import { createPersistedQueryLink } from "@apollo/link-persisted-queries"; import { usePregeneratedHashes as withPregeneratedHashes } from "graphql-codegen-persisted-query-ids/lib/apollo"; import { hashes } from "./path/to/client.json"; From 7b0a3fb8fc3740e3b9218feebbb30082582bcb4e Mon Sep 17 00:00:00 2001 From: Devin Despain Date: Mon, 22 Nov 2021 18:12:18 -0700 Subject: [PATCH 2/3] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index d607323..95e99dd 100644 --- a/README.md +++ b/README.md @@ -74,8 +74,7 @@ This plugin adds the following options to the PostGraphile library options: * string, variables?: any, operationName?: string, extensions?: any}`, but * in the case of persisted operations it likely won't have a `query` * property), and must extract the hash to use to identify the persisted - * operation. For - Client, this might be something like: + * operation. For Apollo Client, this might be something like: * `request?.extensions?.persistedQuery?.sha256Hash`; for Relay something * like: `request?.documentId`. */ From e7c87cf7c68fedb5fc2ae0c34e42a7f39046372e Mon Sep 17 00:00:00 2001 From: Devin Despain Date: Wed, 24 Nov 2021 10:11:06 -0700 Subject: [PATCH 3/3] Update README.md Updates persisted queries import to correct @apollo/client package --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 95e99dd..45ee9df 100644 --- a/README.md +++ b/README.md @@ -220,7 +220,7 @@ You can configure Apollo Client to send the persisted operations generated by `graphql-codegen` with `@apollo/link-persisted-queries`: ```ts -import { createPersistedQueryLink } from "@apollo/link-persisted-queries"; +import { createPersistedQueryLink } from "@apollo/client/link/persisted-queries"; import { usePregeneratedHashes as withPregeneratedHashes } from "graphql-codegen-persisted-query-ids/lib/apollo"; import { hashes } from "./path/to/client.json";