A Deno wrapper for @apollo/generate-persisted-query-manifest that allows you to generate trusted documents for GraphQL.
- 🦕 Pure Deno implementation - no local npm install required in your projects
- 🚀 Simple CLI interface
- 🔧 Customizable document patterns and output paths
- 🧹 Automatic cleanup of temporary config files
- ✨ Works across all repositories
deno run -A https://raw.githubusercontent.com/pantheon-systems/apollo-manifest-generator/main/mod.tsThis will:
- Look for GraphQL operations in
src/**/*.{graphql,gql,js,jsx,ts,tsx} - Generate
persisted-query-manifest.jsonin the current directory
deno run -A https://raw.githubusercontent.com/pantheon-systems/apollo-manifest-generator/main/mod.ts \
--dir=./my-app \
--output=trusted-documents.jsondeno run -A https://raw.githubusercontent.com/pantheon-systems/apollo-manifest-generator/main/mod.ts \
--documents="app/**/*.graphql,queries/**/*.ts"deno run -A https://raw.githubusercontent.com/pantheon-systems/apollo-manifest-generator/main/mod.ts \
--dir=./packages/frontend \
--output=custom-manifest.json \
--documents="src/**/*.{graphql,ts},lib/**/*.gql"--dir, -d: Working directory (default:.)--output, -o: Output file name (default:persisted-query-manifest.json)--documents: Comma-separated glob patterns for document discovery (default:src/**/*.{graphql,gql,js,jsx,ts,tsx})
- Deno 1.37 or higher
- Node.js and npm (must be available in PATH for npx)
- Creates a temporary
persisted-query-manifest.config.jsonin your target directory - Installs
@apollo/generate-persisted-query-manifestif needed (via npm) - Runs the Apollo generator using npx
- Cleans up the temporary config file
- Leaves you with your generated manifest file
.
├── mod.ts # Main entry point
├── deno.json # Deno configuration
└── README.md # Documentation