Skip to content

Conversation

mangalaman93
Copy link
Member

No description provided.

@Copilot Copilot AI review requested due to automatic review settings April 3, 2025 07:15
@mangalaman93 mangalaman93 requested a review from a team as a code owner April 3, 2025 07:15
Copy link

@Copilot 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 updates the API version flag used in the Dgraph client to reflect the use of the v1 dgo API rather than the now-unused v24 API, and adjusts the ping handling logic accordingly.

  • Renamed all instances of "useV24" to "useV1".
  • Updated the ping method to determine which API to use based on the server’s support.
  • Modified the signInUser and doWithRetryLogin functions to rely on the updated v1 flag.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
ns_v25.go Changed flag condition from d.useV24 to d.useV1 in retry login logic.
client_v25.go Updated signInUser condition and ping logic to reflect the new v1 usage.
client.go Renamed the internal flag from useV24 to useV1 and updated its initialization.
Comments suppressed due to low confidence (1)

client_v25.go:284

  • [nitpick] The use of the d.useV1 flag is slightly counterintuitive since a successful ping sets it to false. Consider renaming the flag or adding a clarifying comment to indicate that 'false' indicates the preferred API is available.
// By default, we assume the server is using v1 API

@mangalaman93 mangalaman93 merged commit 4ecd733 into main Apr 3, 2025
4 checks passed
@mangalaman93 mangalaman93 deleted the aman/ping branch April 3, 2025 17:19
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.

2 participants