Comments (2)
Hi @gmlion,
Can you please provide a subset of your schema or your full schema from which the types are generated? If they are generated as optional fields, it means the hasura backend annotated them as such.
In postgres databases, assuming that is what you are working with in hasura, jsonb fields are just strings so it makes sense that they are saved as escaped strings. Since the data of JSONB fields can be of any shape, they are always serialized as strings and you are expected to deserialize them on the client side yourself.
from snowflaqe.
This is the schema portion about a JSONB field
{
"name": "customData",
"description": null,
"args": [
{
"name": "path",
"description": "JSON select path",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
}
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "jsonb",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
}
Our issue is that inserting values using Snowflaqe they are inserted as json strings, and stored as such. Using other means, we can insert a string representing a json object and have it stored as such.
For example:
query {
entity {
json_data
}
}
// response
{
"data": {
"entity": [
{
"json_data": {
"mean": "not-snowflaqe"
}
},
{
"json_data": "{\"mean\":\"snowflaqe\"}"
}
]
}
}
from snowflaqe.
Related Issues (20)
- Extensions of a response HOT 1
- Handling of double-quoted Descriptions in SDL HOT 6
- Schema with unions throws NullReferenceException HOT 5
- Exception when using custom scalars inside .graphql schema HOT 5
- Use Templatus for F# code generation HOT 1
- Problems when using generated input types from Hasura backend HOT 10
- GraphQLParser.dll is missing from Snowflaqe.Tasks nugget package HOT 7
- Publish packages to GitHub Packages and NuGet automatically HOT 3
- Escape F# keywords in output HOT 6
- Add support for `.graphql` extension files HOT 1
- Find graphql files under queries path recursively HOT 3
- Config options to set headers for introspection query HOT 5
- Escape reserved keywords with backticks HOT 2
- Hoist and reuse field types HOT 2
- The description of ENUM kind is not normalized.
- Adding new F# keyword "fixed" HOT 1
- Project file still gets created when "createProjectFile": false
- Bad API behaviour results in uncaught errors HOT 5
- Meta: Maintenance plans HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snowflaqe.