-
Notifications
You must be signed in to change notification settings - Fork 0
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
Updates for DDN Alpha and TypeScript Deno connector compatibility #1
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
.vscode/ | ||
vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"recommendations": [ | ||
"HasuraHQ.hasura", | ||
"denoland.vscode-deno" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"deno.enable": true, | ||
"deno.lint": true, | ||
"deno.unstable": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
|
||
# See https://github.com/hasura/ndc-typescript-deno/tags for the latest tag to use via FROM | ||
# It is recommended that you pin a release tag rather than using `main` | ||
|
||
FROM ghcr.io/hasura/ndc-typescript-deno:main | ||
|
||
COPY ./functions:/functions | ||
RUN EARLY_ENTRYPOINT_EXIT=true ./entrypoint.sh /app/ndc-typescript-deno --configuration /placeholder-config.json | ||
COPY ./functions /functions/src | ||
|
||
# Pre-cache inference results and dependencies | ||
RUN PRECACHE_ONLY=true /app/entrypoint.sh | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
version: 2 | ||
spec: | ||
environment: default | ||
mode: replace | ||
supergraph: | ||
resources: | ||
- supergraph/* | ||
|
||
# Subgraphs can be used to group certain objects of your metadata | ||
# in a way that makes sense for you and your team | ||
# You can have multiple HML files belong to a subgraph | ||
# and you can have multiple subgraphs in a project | ||
# We have created a default subgraph for you, and added a HML file to it to get you started | ||
# Please note that default is a special subgraph that is created for every project | ||
# and it cannot be deleted | ||
subgraphs: | ||
- name: default | ||
resources: | ||
- subgraphs/default/**/*.hml |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
import { sendSimpleMail, IResult } from 'https://deno.land/x/[email protected]/mod.ts'; | ||
import { sendSimpleMail } from 'https://deno.land/x/[email protected]/mod.ts'; | ||
|
||
type Result = { | ||
success: boolean, | ||
errors: string[] | ||
} | ||
|
||
/** | ||
* Uses the SendGrid API to send an email. | ||
* | ||
* | ||
* @param subject The email subject | ||
* @param to The address to send the email to | ||
* @param from Who to list as the sender of the email | ||
* @param plain The plaintext content of the email | ||
* @param html The HTML content of the email | ||
* @returns Success or errors | ||
*/ | ||
export async function send(subject: string, to: string, from: string, plain: string, html: string ): Promise<IResult> { | ||
export async function send(subject: string, to: string, from: string, plain: string, html: string ): Promise<Result> { | ||
const API_KEY = Deno.env.get("SENDGRID_API_KEY"); | ||
|
||
if(! API_KEY) { | ||
|
@@ -32,5 +37,8 @@ export async function send(subject: string, to: string, from: string, plain: str | |
}, | ||
); | ||
|
||
return response; | ||
return { | ||
success: response.success, | ||
errors: response.errors ?? [] | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: 1 | ||
# TODO: Put your project name here | ||
project: your-project-name | ||
|
||
# A build profile specifies your projects environment | ||
# and the association of subgraphs to HML files | ||
# You can create different build profiles for different environments, | ||
# like production and staging, which may reference environment specific auth configs | ||
# We have created one for you to get you started | ||
buildProfiles: | ||
- build-profile.yaml | ||
|
||
# Default build profile refers to build profile | ||
# that is used when you create a build and don't specify the build profile | ||
defaultBuildProfile: build-profile.yaml |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
kind: DataConnector | ||
version: v1 | ||
definition: | ||
name: sendgrid | ||
url: | ||
singleUrl: 'http://my-connector-url' | ||
headers: | ||
Authentication: | ||
value: Bearer MY-PRESHARED-HASURA-TOKEN | ||
|
||
# Run> Hasura: Refresh data connector | ||
# Run> Hasura: Track all collections... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
kind: AuthConfig | ||
version: v1 | ||
definition: | ||
allowRoleEmulationBy: admin | ||
mode: | ||
webhook: | ||
method: Post | ||
url: https://auth.pro.hasura.io/webhook/ddn?role=admin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
kind: CompatibilityConfig | ||
date: 2023-11-29 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We're using unstable features in the connector to support the NPM modules so should we try to match this with the dev tools?
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.
I'm not sure that refers to that, I think this enables access to Deno's unstable APIs. I've used an NPM package (for testing) in this project with that set to false and it works just fine.