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

Commit fe1119c

Browse files
fix: correct json in introspection query results (#798)
1 parent 4d1aa83 commit fe1119c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
# Change Log
44

5+
## 2025-03-20 - Runtime 0.17.6
6+
7+
- fix: correct json in introspection query results [#798](https://github.com/hypermodeinc/modus/pull/798)
8+
59
## 2025-03-19 - Runtime 0.17.5
610

711
- fix: embed runtime version with correct path [#796](https://github.com/hypermodeinc/modus/pull/796)

runtime/graphql/graphql.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ func handleGraphQLRequest(w http.ResponseWriter, r *http.Request) {
169169
// to replace the null with an empty array.
170170
if ok, _ := gqlRequest.IsIntrospectionQuery(); ok {
171171
if q := gjson.GetBytes(response, `data.__schema.types.#(name="Query")`); q.Exists() {
172-
if f := q.Get("fields"); f.Type == gjson.Null {
172+
if f := q.Get("fields"); f.Exists() && f.Type == gjson.Null {
173173
response[f.Index] = '['
174174
response[f.Index+1] = ']'
175175
response = append(response[:f.Index+2], response[f.Index+4:]...)

0 commit comments

Comments
 (0)