·
62 commits
to main
since this release
Minor Changes
-
#414
b8b7d12
Thanks @jerelmiller! - Add ability to parse documents generated by GraphQL Codegen's persisted documents feature.// persisted-query-manifest.config.ts import { fromGraphQLCodegenPersistedDocuments } from "@apollo/generate-persisted-query-manifest"; const config = { documents: fromGraphQLCodegenPersistedDocuments( "./path/to/persisted-documents.json", ), }; export default config;
-
#412
c43f485
Thanks @jerelmiller! - Add ability to specify a custom document transform used during manifest generation.[!NOTE]
You must be running Apollo Client 3.8.0 or greater to use this feature.[!IMPORTANT]
This should be the same document transform that is passed to yourApolloClient
instance, otherwise you risk mismatches in the query output.// persisted-query-manifest.config.ts import { PersistedQueryManifestConfig } from "@apollo/generate-persisted-query-manifest"; import { DocumentTransform } from "@apollo/client/core"; const documentTransform = new DocumentTransform((document) => { // transform your document return transformedDocument; }); const config: PersistedQueryManifestConfig = { documentTransform, }; export default config;