Skip to content

feat(presets): add turnstile#21

Merged
dargmuesli merged 1 commit into
mainfrom
feat/presets/turnstile-add
May 27, 2026
Merged

feat(presets): add turnstile#21
dargmuesli merged 1 commit into
mainfrom
feat/presets/turnstile-add

Conversation

@dargmuesli
Copy link
Copy Markdown
Member

Now that we're forwarding graphql requests server-side, request validation needs to happen internally instead of in-transit by a traefik middleware.
The Nuxt endpoint is kept for now, as the frontend has information about the relevant request metadata that is not available to other services (yet).

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a Grafserv middleware preset intended to validate incoming GraphQL requests via a Turnstile-backed internal authentication endpoint, now that requests are being forwarded server-side instead of validated by an in-transit Traefik middleware.

Changes:

  • Introduces a new TurnstilePreset/plugin that intercepts GraphQL request bodies and calls an internal verification endpoint.
  • Wires the new preset into the main graphile.config.ts preset chain.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.

File Description
src/presets/turnstile.ts Adds a Grafserv middleware plugin that forwards request metadata/body to an internal Turnstile verification endpoint before continuing.
src/graphile.config.ts Enables the new Turnstile preset by extending the main PostGraphile preset chain.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/presets/turnstile.ts
Comment thread src/presets/turnstile.ts Outdated
Comment thread src/presets/turnstile.ts Outdated
Comment thread src/presets/turnstile.ts Outdated
Comment thread src/presets/turnstile.ts Outdated
Comment thread src/presets/turnstile.ts Outdated
Comment thread src/presets/turnstile.ts
Comment thread src/graphile.config.ts
@dargmuesli dargmuesli force-pushed the feat/presets/turnstile-add branch from 1744269 to 6de9968 Compare May 27, 2026 05:57
@dargmuesli dargmuesli requested a review from Copilot May 27, 2026 05:57
@dargmuesli dargmuesli force-pushed the feat/presets/turnstile-add branch from 6de9968 to 3d0f2b9 Compare May 27, 2026 05:59
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

Comment thread src/presets/turnstile.ts Outdated
Comment thread src/presets/turnstile.ts
Comment thread src/presets/turnstile.ts Outdated
Comment thread src/presets/turnstile.ts
Comment thread src/presets/turnstile.ts
Comment thread src/presets/turnstile.ts
@dargmuesli dargmuesli force-pushed the feat/presets/turnstile-add branch from 3d0f2b9 to a7306a0 Compare May 27, 2026 06:04
@dargmuesli dargmuesli force-pushed the feat/presets/turnstile-add branch from a7306a0 to 17c7b28 Compare May 27, 2026 06:09
@dargmuesli dargmuesli merged commit e099ace into main May 27, 2026
9 checks passed
@dargmuesli dargmuesli deleted the feat/presets/turnstile-add branch May 27, 2026 06:14
@maevsi-bot
Copy link
Copy Markdown

🎉 This PR is included in version 2.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants