GraphQL-Ruby
Installation
gem install graphql-hive
Integration Guide
Publishing Schemas
Please use the Hive CLI to publish your GraphQL schema. Follow the CI/CD instructions for automating the process.
Usage Reporting
Add collect_usage: true
to your GraphQL::Hive
configuration.
Optionally, you can pass an optional proc that will help identify the client that performed the query:
class Schema < GraphQL::Schema
query QueryType
use(
GraphQL::Hive,
{
token: '<YOUR_TOKEN>',
# add this one for usage reporting
collect_usage: true,
# This option will be removed in a future release. Please report schemas using the Hive CLI.
report_schema: false,
# for clients reporting
client_info: Proc.new { |context| { name: context.client_name, version: context.client_version } },
reporting: {
# feel free to set dummy values here, or real runtime values if you have them
author: 'Author of the schema version',
commit: 'git sha or any identifier'
},
}
)
end