Skip to content

feat: Add Payload CMS connector (API Key + GraphQL) - #82

Open
major-connector-creator[bot] wants to merge 1 commit into
mainfrom
claude/payloadcms-connector-7b6de
Open

major-connector-creator[bot] wants to merge 1 commit into
mainfrom
claude/payloadcms-connector-7b6de

Conversation

@major-connector-creator

Copy link
Copy Markdown

Payload CMS Connector — npm package changes

Adds TypeScript client, schemas, and payload builders for the Payload CMS connector.

New Files

  • src/schemas/api-payloadcms.tsApiPayloadCMSPayload interface (type/subtype/query/variables/operationName/timeoutMs)
  • src/clients/payloadcms.tsPayloadCMSResourceClient with query() and mutate() methods
  • src/payload-builders/payloadcms.tsbuildPayloadCMSQueryPayload and buildPayloadCMSMutatePayload functions

Modified Files

  • src/schemas/index.ts — Export ApiPayloadCMSPayload, add to ResourceInvokePayload union
  • src/schemas/response.ts — Add PayloadCMSInvokeResponse type alias
  • src/index.ts — Export PayloadCMSResourceClient and PayloadCMSInvokeResponse
  • src/payload-builders/index.ts — Export payload builders
  • src/payload-builders/from-extracted-params.ts — Add payloadcms routing case for query/mutate
  • bin/generate-clients.mjs — Add payloadcmsPayloadCMSResourceClient mapping, add to valid types and help text

Why a dedicated subtype?

Payload CMS uses a unique Authorization header format: {collectionSlug} API-Key {apiKey}. A dedicated connector auto-constructs this header, giving a cleaner UX than the generic GraphQL connector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant