Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Conversation

@mattjohnsonpint
Copy link
Contributor

@mattjohnsonpint mattjohnsonpint commented Mar 20, 2025

Description

Fixes HYP-3154 to address #797

Checklist

All PRs should check the following boxes:

  • I have given this PR a title using the
    Conventional Commits syntax, leading with fix:,
    feat:, chore:, ci:, etc.
    • The title should also be used for the commit message when the PR is squashed and merged.
  • I have formatted and linted my code with Trunk, per the instructions in
    the contributing guide.

If the PR includes a code change, then also check the following boxes. (If not, then delete the
next section.)

  • I have added an entry to the CHANGELOG.md file.
    • Add to the "UNRELEASED" section at the top of the file, creating one if it doesn't yet exist.
    • Be sure to include the link to this PR, and please sort the section numerically by PR number.
  • I have manually tested the new or modified code, and it appears to behave correctly.
  • I have added or updated unit tests where appropriate, if applicable.

@mattjohnsonpint mattjohnsonpint requested review from a team and Copilot March 20, 2025 16:32
@linear
Copy link

linear bot commented Mar 20, 2025

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 fixes the JSON output in introspection query results for GraphQL endpoints and updates the changelog accordingly.

  • Corrects the condition to handle JSON null values in the GraphQL response.
  • Updates the changelog entry to reflect the fix.

Reviewed Changes

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

File Description
CHANGELOG.md Added a new changelog entry for the JSON introspection fix
runtime/graphql/graphql.go Modified condition for handling a null "fields" value in the introspection query results
Comments suppressed due to low confidence (1)

runtime/graphql/graphql.go:172

  • [nitpick] Consider renaming the variable 'f' to a more descriptive name (e.g., 'fields') to improve code clarity.
if f := q.Get("fields"); f.Exists() && f.Type == gjson.Null {

@mattjohnsonpint mattjohnsonpint merged commit fe1119c into main Mar 20, 2025
54 checks passed
@mattjohnsonpint mattjohnsonpint deleted the mjp/hyp-3154-graphql-introspection-incorrect-json-return branch March 20, 2025 16:36
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