exploring-webapp-graphql-schema
Salesforce GraphQL Schema Exploration
Guidance for AI agents working with the Salesforce GraphQL API schema. GREP ONLY — the schema file is very large (~265,000+ lines). All lookups MUST use grep; do NOT open, read, stream, or parse the file.
Deployment Prerequisites
The schema reflects the current org state. Custom objects and fields appear only after metadata is deployed.
- Before running
npm run graphql:schema: Deploy all metadata (objects, permission sets, layouts) and assign the permission set to the target user. Invoke thedeploying-to-salesforceskill for the full sequence. - After any metadata deployment: Re-run
npm run graphql:schemaandnpm run graphql:codegenso types and queries stay in sync.
Schema File Location
Location: schema.graphql at the SFDX project root (NOT inside the webapp dir). All grep commands must be run from the project root where schema.graphql lives.
⚠️ Important (Access Policy - GREP ONLY): Do NOT open, view, stream, paginate, or parse the schema with any tool other than grep. All lookups MUST be done via grep using anchored patterns with minimal context as defined below.
If the file is not present, generate it by running (from the webapp dir, not the project root):