Commit 812eff7
committed
Make Schema#as_json return an instance of Hash
Certain JSON encoders (namely, Oj) were previously serializing `GraphQL::Query::Result`
incorrectly. Instead of returning a schema definition, it would return serialize
the output of `GraphQL::Query::Result#inspect` as a string. In order to have better
compatibility, this patch opts to represent the schema as a Hash when calling `#as_json`.1 parent 6e24f61 commit 812eff7
2 files changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
557 | | - | |
| 557 | + | |
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
428 | 435 | | |
429 | 436 | | |
430 | 437 | | |
| |||
0 commit comments