craft-jason icon indicating copy to clipboard operation
craft-jason copied to clipboard

Graphql support

Open jjohnlaw opened this issue 4 years ago • 3 comments

Hi,

Im attempting to update your jason field with my JSON data (stringified) through graphql, but Im receiving the (unhelpful) error "Error: GraphQL error: Internal server error" when i call the mutation.

Do you know of any reason why the JASON field will not accept a string type when populated using graphql?

Additional info:

If i change the fieldtype from Jason to a Plain Text field the mutation runs successfully (as expected) and the field is populated:

Screenshot 2021-02-04 at 17 16 10

and then when i change the fieldtype back to Jason the data is displayed correctly:

image

So we know the data ima attempting to send is valid for your fieldtype.

jjohnlaw avatar Feb 04 '21 17:02 jjohnlaw

@jlaughton87 You're correct that Graphql support hasn't been added. I'm not familiar enough with Graphql to add it myself, but PRs are welcome.

chasegiunta avatar Feb 04 '21 17:02 chasegiunta

No worries, thanks for letting me know

jjohnlaw avatar Feb 08 '21 17:02 jjohnlaw

@jlaughton87 maybe this will help you https://github.com/chasegiunta/craft-jason/pull/136

approached avatar Jul 05 '21 14:07 approached