K-Sato
K-Sato

Reputation: 431

Generate a schema.json with graphql-ruby

How can I generate a schema.json like the code in the links?

https://github.com/exAspArk/graphql-on-rails/blob/master/schema.json https://github.com/Shopify/graphql-js-client/blob/master/schema.json

Upvotes: 5

Views: 3093

Answers (1)

K-Sato
K-Sato

Reputation: 431

Don't know if there is anyone who wants to know about this. But apparently, you can do it with GraphQL::RakeTask. I'll leave some links here as well.

https://graphql-ruby.org/api-doc/1.9.3/GraphQL/RakeTask#invoking-the-task-from-ruby https://github.com/rmosolgo/graphql-ruby/blob/master/lib/graphql/rake_task.rb

Upvotes: 7

Related Questions