Skip to content

Conversation

@matthewmcneely
Copy link
Collaborator

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.

@netlify
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 dgraph-io/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)
@ryanfoxtyler
Copy link
Contributor

addressed in hypermodeinc/docs#116

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.

3 participants