Closed cjanietz closed 4 weeks ago
Hi @cjanietz I am a little busy now so I will be happy with your PR :) if you have time of course. Regards, Artur
I've encountered this and am willing to write a pr if this is reopened
Is there any news here? I am struggling with the same problem as I am using the open source headless CMS Strapi with associated Graphql plugins (strapi-plugin-graphql until version 3 and @strapi/plugin-graphql from version 4) which uses the mentioned above plugin. Now I would like to use Graphql Zeus in the frontend but it doesn't work, because zeus adds quotes to the JSON objects, e.g.
Gql('query')({ user: [ { where: { active: true, }, }, { id: true } ], });
results to
query { user(where: { "active": true }) { id } }
instead of
query { user(where: { active: true }) { id } }
Are there any workarounds?
Having the same problem, also trying to implement using StrapiCMS schema, any updates @Gozala @aexol? Lmk if u guys need any help, I'm not so experienced with GraphQL but I'm here if needed.
Thanks for the awesome work :)
Any updates here?
Got stuck on this too... Had to change my DB schema to work around this. No more JSONB for me...
I prefer to change my DB schema instead of working without graphql-zeus
. god bless this library - changed my life.
Use serializers check scalars section inside docs
@AsafKaravani
try
const $ = (t) => `ZEUS_VAR$${t.join('')}`
thunder.mutation(
{
insert_Jsonb_one: [
{
object: {
data: $`data`,
},
},
{
id: true,
},
],
},
{
variables: {
data: {...[your data object]},
},
}
)
Hi @aexol Still appreciating your great work on this lib I have come across a new issue unfortunately, which is a custom GraphQL Scalar.
The scalar in question is: https://github.com/taion/graphql-type-json While of course its arguably weird to be able to specify arbitrary objects in a GQL query, JSON and JSONObject are as of today valid usages. Would you mind extending the ScalarResolver to accommodate these types as well for input? Otherwise if okay with you I can also create a PR
Regards, Christopher