Closed jackalcooper closed 7 years ago
Thanks, I think graphql-ruby is missing quirks_mode: true
somewhere!
I think this is fixed by https://github.com/rmosolgo/graphql-ruby/pull/316 , can you try master branch?
Since graphql-ruby
is heavy on JSON generation for obvious reasons, wouldn't it be cool to allow it to use other JSON serializers like Oj?
If it doesn't sound like a bad idea right away, I may give this a try and post some benchmarks soon π what do you say @rmosolgo?
heavy on JSON generation
I don't think of it as heavy on JSON generation. There are only a few places where we stringify Ruby values with JSON:
In general, graphql-ruby
returns a Hash to the user, and the user can serialize it however they want!
I don't expect a big difference in the benchmark, since JSON is used so sparingly in the gem itself, but you're welcome to give it a try. If it turns out to be a big improvement, I'm happy to look at supporting other JSON implementations!
You, unexpectedly, seem mostly right π somehow I was expecting more JSON magic to happen inside, but seems like the bulk of the work is indeed outside, in serializing the response.
Hi, guys. It is not a pain to me now. Well it could be just for now.
Here is my dirty walk around:
module JSON
def self.dump(raw)
raw.to_json
end
end
Glad you found something that works for you! I hope those changes to JSON
will fix this bug for others, too.
I got this when first open graphi page and failed to extend doc area but the query works fine.