Skip to content

Parse for Hasura vs PromptQL Language #118

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

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

seanparkross
Copy link
Contributor

WIP

Quick Links 🚀

Assertion Tests 🤖

seanparkross and others added 6 commits May 22, 2025 19:12
- Changed `disableSwitch` from true to false to allow users to toggle between light and dark modes.
- Added `respectPrefersColorScheme` to ensure the theme respects the user's system color scheme preference.
## Description 📝

Bring back the kitchen sink page

## Quick Links 🚀

[Kitchen
Sink](https://sean-doc-2820-bring-back-the.promptql-docs.pages.dev/kitchen-sink/)
@hasura-bot
Copy link
Collaborator

@seanparkross Thanks for your PR! I've assigned @robertjdominguez to review it.

Copy link

cloudflare-workers-and-pages bot commented May 29, 2025

Deploying promptql-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: d90ecd7
Status:🚫  Build failed.

View logs

Copy link
Collaborator

@robertjdominguez robertjdominguez left a comment

Choose a reason for hiding this comment

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

More comments included in sync conversation 👍

@@ -19,7 +19,7 @@ keywords:

# JWT Mode

In JWT mode, session variables are passed to the Hasura Engine on each request in JSON Web Tokens (JWTs).
In JWT mode, session variables are passed to the engine on each request in JSON Web Tokens (JWTs).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Without more context from the page, my advice here is to be a bit more abstract:

Suggested change
In JWT mode, session variables are passed to the engine on each request in JSON Web Tokens (JWTs).
In JWT mode, session variables are passed to your application on each request in JSON Web Tokens (JWTs).

Copy link
Contributor Author

@seanparkross seanparkross May 29, 2025

Choose a reason for hiding this comment

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

I think this is too abstract as it doesn't have enough useful meaning.

@@ -324,8 +324,8 @@ Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWI...

#### Cookie

In the cookie mode, Hasura will try to parse the cookie header with the given cookie name. The value of the cookie
should be the exact JWT.
In the cookie mode, the DDN engine will try to parse the cookie header with the given cookie name. The value of the
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why would we make this different from the previous change on line 312?

In this mode, the engine expects an `Authorization` header with a `Bearer` token.

@@ -88,7 +88,7 @@ AuthConfig. Using `claims.jwt.hasura.io` will match our examples.
3. Add any other optional `x-hasura-*` claim fields (required as per your defined permissions) to the custom namespace.

To summarize, `x-hasura-allowed-roles` session variable contains a list of all the roles that the user can assume and
the `x-hasura-role` header tells the Hasura Engine which role to use for the request, and if that is missing then the
the `x-hasura-role` header tells the engine which role to use for the request, and if that is missing then the
Copy link
Collaborator

Choose a reason for hiding this comment

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

Similar to what we said earlier, in this context, I think we replaced Hasura engine with API. Why?

In context, we're referring to the behavior of the interface that receives and processes requests (the engine), which is equivalent to an API server.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This also isn't "correct enough" in my view. It isn't the API, (which is the endpoints, protocol and format) - it's the engine which uses them.

@@ -193,8 +193,8 @@ If `claimsFormat` is `StringifiedJson` then the JWT claims should look like:

#### locations {#jwt-claims-config-locations}

This `locations` option can be used when Hasura claims are not all present in the single object, but individual claims
are provided a JSON pointer within the decoded JWT. In this option, you can indicate:
This `locations` option can be used when DDN claims are not all present in the single object, but individual claims are
Copy link
Collaborator

Choose a reason for hiding this comment

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

Earlier, we called this PromptQL claims (line 143).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤷‍♂️ Dunno on this one.

Base automatically changed from sean/doc-2819-establish-a-mini-blitz-branch to main June 1, 2025 16:43
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.

3 participants