This repository was archived by the owner on Sep 5, 2025. It is now read-only.
Add reverse edge query test and update README#100
Merged
matthewmcneely merged 7 commits intomainfrom Jun 2, 2025
Merged
Conversation
|
Running Code Quality on PRs by uploading data to Trunk will soon be removed. You can still run checks on your PRs using trunk-action - see the migration guide for more information. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new integration test for Dgraph’s reverse-edge querying and expands the client interface with additional CRUD and schema methods.
- Defines
StudentandClasstypes with reverse-edge tags and addsTestReverseEdgeQueryto verify reverse-edge behavior. - Extends the
Clientinterface inclient.go, adding methods likeInsert,Upsert,Get,Query,UpdateSchema, andDgraphClient.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| query_test.go | Added Student/Class structs and TestReverseEdgeQuery to cover reverse-edge query functionality. |
| client.go | Updated Client interface by adding new CRUD, schema, and utility methods. |
Comments suppressed due to low confidence (2)
query_test.go:335
- [nitpick] Go naming conventions discourage underscores in exported field names; consider renaming
Takes_ClasstoTakesClassfor clarity and consistency.
Takes_Class []*Class `json:"takes_class,omitempty" dgraph:"reverse"`
client.go:42
- [nitpick] The
Querymethod returns a query builder rather than executing immediately; consider renaming toNewQueryBuilderor adding anExecutemethod on the client for clarity.
Query(context.Context, any) *dg.Query
59ee87a to
8c29054
Compare
ryanfoxtyler
approved these changes
Jun 1, 2025
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 PR adds a reverse edge query test and updates the README
Checklist
CHANGELOG.mdfile describing and linking tothis PR