Skip to content

Return a CSV instead of JSON #1163

Closed Answered by tyranron
twiclo asked this question in Q&A
May 8, 2023 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

@twiclo thus, there is no way to expose the inner juniper::Value from GraphQLResponse, the latest implements serde::Serialize. So, you either need a serde-compatible CSV serializer, or, at least, serialize it into a serde_json::Value (or similar) and then use it for your custom serialization, which won't differ much from serializaing juniper::Value directly.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@twiclo
Comment options

@tyranron
Comment options

Answer selected by twiclo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants