-
Notifications
You must be signed in to change notification settings - Fork 5
feature: update function to use admin server with headers #616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the send-email-link Knative function to support header-based routing for GraphQL requests to an admin server with API_IS_PUBLIC=false. The changes enable multi-tenant GraphQL access using custom headers (X-Database-Id, X-Meta-Schema, X-Api-Name, X-Schemata) instead of relying on hostname-based routing.
Changes:
- Enhanced
createGraphQLClientfunction to support additional header-based routing options for internal admin server communication - Updated Docker Compose configuration to use the new admin server setup with
API_IS_PUBLIC=false - Replaced outdated PostgreSQL image with newer version (
ghcr.io/constructive-io/docker/postgres-plus:17) - Removed
simple-emailfunction references from documentation and Docker Compose in favor ofsend-email-link
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
jobs/README.md |
Updated documentation to reflect send-email-link function usage with admin server header-based routing, removed simple-email references |
functions/send-email-link/src/index.ts |
Refactored createGraphQLClient to accept an options object with header-based routing parameters (databaseId, useMetaSchema, apiName, schemata) |
docker-compose.yml |
Updated PostgreSQL image from pyramation/pgvector:13.3-alpine to ghcr.io/constructive-io/docker/postgres-plus:17 |
docker-compose.jobs.yml |
Renamed service from constructive-server to constructive-admin-server, added API_IS_PUBLIC=false, removed simple-email service references |
Comments suppressed due to low confidence (1)
jobs/README.md:1
- Corrected malformed heading. There's an extra 'n' character before the '#' symbol.
n# Jobs (Knative)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this 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 7 out of 8 changed files in this pull request and generated 9 comments.
Comments suppressed due to low confidence (1)
jobs/README.md:2
- The line marker '----' (line 0 in diff) should be '---' (three hyphens) to match standard Markdown horizontal rule syntax used elsewhere in the document.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| nodes: schemata.map((schemaName: string) => ({ schemaName })), | ||
| }, | ||
| schemaNames: { nodes: [] as Array<{ schemaName: string }> }, | ||
| schemasByApiSchemaApiIdAndSchemaId: { nodes: [] as Array<{ schemaName: string }> }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was potentially the bug that lead to API not found html error.
Summary
Enable
send-email-linkfunction to work with jobs infrastructure via header-based GraphQL routing.Changes
schemaNamesFromExt→apiExtensions)apiByDatabaseIdAndNamequeryX-Database-Id,X-Api-Name, etc.)http://localhost:3000nothttp://app.localhost:3000)Testing
forgot_passwordandemail_verificationemail typesBreaking Changes
simple-emailfunction removed from docker-compose (usesend-email-linkinstead)constructive-tests-net