-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat(graphql): output translated DQL query when the graphql debug superflag is set #9280
Merged
matthewmcneely
merged 5 commits into
main
from
matthewmcneely/output-translated-dqlquery-when-in-debug-mode
Jan 27, 2025
Merged
feat(graphql): output translated DQL query when the graphql debug superflag is set #9280
matthewmcneely
merged 5 commits into
main
from
matthewmcneely/output-translated-dqlquery-when-in-debug-mode
Jan 27, 2025
Conversation
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
github-actions
bot
added
area/testing
Testing related issues
area/graphql
Issues related to GraphQL support on Dgraph.
area/core
internal mechanisms
go
Pull requests that update Go code
labels
Jan 17, 2025
matthewmcneely
changed the title
feature(graphql): output translated DQL query when the graphql debug superflag is set
feat(graphql): output translated DQL query when the graphql debug superflag is set
Jan 17, 2025
matthewmcneely
added
area/dql-graphql-interop
DQL interoperability with GraphQL
and removed
area/testing
Testing related issues
area/core
internal mechanisms
labels
Jan 17, 2025
# Conflicts: # graphql/e2e/normal/docker-compose.yml
matthewmcneely
force-pushed
the
matthewmcneely/output-translated-dqlquery-when-in-debug-mode
branch
from
January 22, 2025 19:16
2bdc510
to
d31b798
Compare
github-actions
bot
added
area/testing
Testing related issues
area/documentation
Documentation related issues.
area/core
internal mechanisms
labels
Jan 22, 2025
harshil-goel
approved these changes
Jan 27, 2025
matthewmcneely
deleted the
matthewmcneely/output-translated-dqlquery-when-in-debug-mode
branch
January 27, 2025 23:17
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
area/core
internal mechanisms
area/documentation
Documentation related issues.
area/dql-graphql-interop
DQL interoperability with GraphQL
area/graphql
Issues related to GraphQL support on Dgraph.
area/testing
Testing related issues
go
Pull requests that update Go code
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.
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:
Note: this is for queries (reads) only. Mutations in DQL are pretty straightforward, but support for them could be added in the future.
Checklist
CHANGELOG.md
file describing and linking tothis PR