Skip to content
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
matthewmcneely/add-reverse-predicate-test
Jun 2, 2025
Merged

Add reverse edge query test and update README#100
matthewmcneely merged 7 commits intomainfrom
matthewmcneely/add-reverse-predicate-test

Conversation

@matthewmcneely
Copy link
Contributor

Description

This PR adds a reverse edge query test and updates the README

Checklist

  • Code compiles correctly and linting passes locally
  • For all code changes, an entry added to the CHANGELOG.md file describing and linking to
    this PR

@matthewmcneely matthewmcneely requested review from a team and Copilot May 29, 2025 22:00
@trunk-io
Copy link

trunk-io bot commented May 29, 2025

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 Student and Class types with reverse-edge tags and adds TestReverseEdgeQuery to verify reverse-edge behavior.
  • Extends the Client interface in client.go, adding methods like Insert, Upsert, Get, Query, UpdateSchema, and DgraphClient.

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_Class to TakesClass for clarity and consistency.
Takes_Class []*Class `json:"takes_class,omitempty" dgraph:"reverse"`

client.go:42

  • [nitpick] The Query method returns a query builder rather than executing immediately; consider renaming to NewQueryBuilder or adding an Execute method on the client for clarity.
Query(context.Context, any) *dg.Query

@matthewmcneely matthewmcneely force-pushed the matthewmcneely/add-reverse-predicate-test branch from 59ee87a to 8c29054 Compare May 29, 2025 22:22
@matthewmcneely matthewmcneely merged commit e83af4e into main Jun 2, 2025
9 checks passed
@matthewmcneely matthewmcneely deleted the matthewmcneely/add-reverse-predicate-test branch June 2, 2025 13:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants