Skip to content
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

docs(graphql): Update extensions description for new dql_query attribute #689

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

matthewmcneely
Copy link
Contributor

Updates docs to include dql_query output in the extensions when the graphql debug superflag is set to true.

Only merge when/if #9280 is released.

Copy link

netlify bot commented Jan 22, 2025

Deploy Preview for dgraph-docs-repo ready!

Name Link
🔨 Latest commit 3891824
🔍 Latest deploy log https://app.netlify.com/sites/dgraph-docs-repo/deploys/6791497b75ef2200088fb768
😎 Deploy Preview https://deploy-preview-689--dgraph-docs-repo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

matthewmcneely added a commit to hypermodeinc/dgraph that referenced this pull request Jan 27, 2025
…erflag is set (#9280)

**Description**

This change adds the translated DQL query to the GraphQL's `extension`
attribute set when the GraphQL debug superflag is set to true.

In Dgraph, GraphQL queries are translated to DQL before entering the
query system. This change allows for an inspection of what the
translator is doing behind the scenes.

Potential Use Cases:

* learning DQL
* aiding few shot prompting in LMs
* use in Dgraph "dashboards" or other helper apps

Note: this is for queries (reads) only. Mutations in DQL are pretty
straightforward, but support for them could be added in the future.


![image](https://github.com/user-attachments/assets/a818ef04-5189-4bc1-a3d7-7b7a5d2fbe70)

**Checklist**

- [x] Code compiles correctly and linting passes locally
- [x] For all _code_ changes, an entry added to the `CHANGELOG.md` file
describing and linking to
      this PR
- [x] Tests added for new functionality, or regression tests for bug
fixes added as applicable
- [x] [Docs PR](dgraph-io/dgraph-docs#689)
arturmelanchyk pushed a commit to arturmelanchyk/dgraph that referenced this pull request Feb 4, 2025
…erflag is set (hypermodeinc#9280)

**Description**

This change adds the translated DQL query to the GraphQL's `extension`
attribute set when the GraphQL debug superflag is set to true.

In Dgraph, GraphQL queries are translated to DQL before entering the
query system. This change allows for an inspection of what the
translator is doing behind the scenes.

Potential Use Cases:

* learning DQL
* aiding few shot prompting in LMs
* use in Dgraph "dashboards" or other helper apps

Note: this is for queries (reads) only. Mutations in DQL are pretty
straightforward, but support for them could be added in the future.


![image](https://github.com/user-attachments/assets/a818ef04-5189-4bc1-a3d7-7b7a5d2fbe70)

**Checklist**

- [x] Code compiles correctly and linting passes locally
- [x] For all _code_ changes, an entry added to the `CHANGELOG.md` file
describing and linking to
      this PR
- [x] Tests added for new functionality, or regression tests for bug
fixes added as applicable
- [x] [Docs PR](dgraph-io/dgraph-docs#689)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant