hasura / hasura/graphql-engine
MS SQL Server Subscription by pk data returned as string
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version: v2.33.4-cloud.1
CLI Version (for CLI related issue):
### Environment
Cloud and docker
### What is the current behaviour?
After installing the `Hello World` sample template in MS SQL Server and running the below query:
```graphql
subscription GetAuthorStreamingSubscription {
_helloworld_author_by_pk(id: 1) {
id
name
}
}
```
The following data is returned:
```json
{
"data": {
"_helloworld_author_by_pk": "{\"id\":1,\"name\":\"Coleman Spickett\"}"
}
}
```
### What is the expected behaviour?
The data should be returned like the below:
```json
{
"data": {
"_helloworld_author_by_pk": {
"id": 1,
"name": "Coleman Spickett"
}
}
}
```
### How to reproduce the issue?
1. Install the `Hello World` sample template in MS SQL server
2. Run the following query
```graphql
subscription GetAuthorStreamingSubscription {
_helloworld_author_by_pk(id: 1) {
id
name
}
}
```
### Screenshots or Screencast
### Please provide any traces or logs that could help here.
### Any possible solutions/workarounds you're aware of?
JSON parse the data returned by the query.
### Keywords
- MS SQL Server subscription
- subscription by id invalid data
Contributor guide
Research direction
Reproduce the Hello World subscription against MS SQL Server using the query and environment described in the issue, then trace the subscription response handling. The work is done when the by-primary-key result is returned as a JSON object with numeric and string fields rather than a serialized string.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, sql
- Domain
- api, backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100