Sha256: d0d263c03dc1cd39cacd3e57aab417e6351052d03186826db7ca90490488fcb6
Contents?: true
Size: 622 Bytes
Versions: 10
Compression:
Stored size: 622 Bytes
Contents
module GraphQL module StaticValidation class SubscriptionRootExists include GraphQL::StaticValidation::Message::MessageHelper def validate(context) return if context.schema.subscription visitor = context.visitor visitor[GraphQL::Language::Nodes::OperationDefinition].enter << ->(ast_node, prev_ast_node) { if ast_node.operation_type == 'subscription' context.errors << message('Schema is not configured for subscriptions', ast_node, context: context) return GraphQL::Language::Visitor::SKIP end } end end end end
Version data entries
10 entries across 10 versions & 1 rubygems